From e47faf74ca041e154d54cbb5f3ea2773f1ab2ec1 Mon Sep 17 00:00:00 2001 From: Jan Kadlec Date: Fri, 13 Mar 2026 10:48:19 +0100 Subject: [PATCH 1/3] build: regenerate api-client with result OpenAPI spec Add the `result` spec (`/api/v1/schemas/result`) to the Makefile download target and merge it into the combined api-client schema. Regenerate gooddata-api-client, which brings typed endpoints and models for CSV staging upload, CSV analysis, CSV import, file listing, file deletion, and CSV file manifest reading. jira: TRIVIAL risk: low --- Makefile | 1 + .../.github/workflows/python.yml | 31 + gooddata-api-client/.openapi-generator/FILES | 92 + gooddata-api-client/README.md | 57 + .../AacContainerWidgetAllOfDescription.md | 28 + .../docs/AacContainerWidgetAllOfTitle.md | 28 + .../docs/AacDashboardWithTabsAllOfPlugins.md | 30 + .../AacDashboardWithoutTabsAllOfPlugins.md | 30 + .../docs/AacRichTextWidgetAllOfDescription.md | 28 + .../docs/AacRichTextWidgetAllOfTitle.md | 28 + ...isualizationBasicBucketsAllOfAttributes.md | 28 + ...acVisualizationBasicBucketsAllOfColumns.md | 28 + ...acVisualizationBasicBucketsAllOfMetrics.md | 28 + .../AacVisualizationBasicBucketsAllOfRows.md | 28 + ...VisualizationBasicBucketsAllOfSegmentBy.md | 28 + ...AacVisualizationBasicBucketsAllOfSizeBy.md | 28 + ...acVisualizationBasicBucketsAllOfStackBy.md | 28 + ...acVisualizationBasicBucketsAllOfTrendBy.md | 28 + ...AacVisualizationBasicBucketsAllOfViewBy.md | 28 + ...sualizationBubbleBucketsAllOfAttributes.md | 28 + ...cVisualizationBubbleBucketsAllOfColumns.md | 28 + ...cVisualizationBubbleBucketsAllOfMetrics.md | 28 + .../AacVisualizationBubbleBucketsAllOfRows.md | 28 + ...isualizationBubbleBucketsAllOfSegmentBy.md | 28 + ...acVisualizationBubbleBucketsAllOfSizeBy.md | 28 + ...cVisualizationBubbleBucketsAllOfStackBy.md | 28 + ...cVisualizationBubbleBucketsAllOfTrendBy.md | 28 + ...acVisualizationBubbleBucketsAllOfViewBy.md | 28 + ...izationDependencyBucketsAllOfAttributes.md | 28 + ...ualizationDependencyBucketsAllOfColumns.md | 28 + ...ualizationDependencyBucketsAllOfMetrics.md | 28 + ...VisualizationDependencyBucketsAllOfRows.md | 28 + ...lizationDependencyBucketsAllOfSegmentBy.md | 28 + ...sualizationDependencyBucketsAllOfSizeBy.md | 28 + ...ualizationDependencyBucketsAllOfStackBy.md | 28 + ...ualizationDependencyBucketsAllOfTrendBy.md | 28 + ...sualizationDependencyBucketsAllOfViewBy.md | 28 + ...cVisualizationGeoBucketsAllOfAttributes.md | 28 + .../AacVisualizationGeoBucketsAllOfColumns.md | 28 + .../AacVisualizationGeoBucketsAllOfMetrics.md | 28 + .../AacVisualizationGeoBucketsAllOfRows.md | 28 + ...acVisualizationGeoBucketsAllOfSegmentBy.md | 28 + .../AacVisualizationGeoBucketsAllOfSizeBy.md | 28 + .../AacVisualizationGeoBucketsAllOfStackBy.md | 28 + .../AacVisualizationGeoBucketsAllOfTrendBy.md | 28 + .../AacVisualizationGeoBucketsAllOfViewBy.md | 28 + ...ualizationScatterBucketsAllOfAttributes.md | 28 + ...VisualizationScatterBucketsAllOfColumns.md | 28 + ...VisualizationScatterBucketsAllOfMetrics.md | 28 + ...AacVisualizationScatterBucketsAllOfRows.md | 28 + ...sualizationScatterBucketsAllOfSegmentBy.md | 28 + ...cVisualizationScatterBucketsAllOfSizeBy.md | 28 + ...VisualizationScatterBucketsAllOfStackBy.md | 28 + ...VisualizationScatterBucketsAllOfTrendBy.md | 28 + ...cVisualizationScatterBucketsAllOfViewBy.md | 28 + ...ualizationStackedBucketsAllOfAttributes.md | 28 + ...VisualizationStackedBucketsAllOfColumns.md | 28 + ...VisualizationStackedBucketsAllOfMetrics.md | 28 + ...AacVisualizationStackedBucketsAllOfRows.md | 28 + ...sualizationStackedBucketsAllOfSegmentBy.md | 28 + ...cVisualizationStackedBucketsAllOfSizeBy.md | 28 + ...VisualizationStackedBucketsAllOfStackBy.md | 28 + ...VisualizationStackedBucketsAllOfTrendBy.md | 28 + ...cVisualizationStackedBucketsAllOfViewBy.md | 28 + ...alizationSwitcherWidgetAllOfDescription.md | 28 + ...acVisualizationSwitcherWidgetAllOfTitle.md | 28 + ...isualizationTableBucketsAllOfAttributes.md | 28 + ...acVisualizationTableBucketsAllOfColumns.md | 28 + ...acVisualizationTableBucketsAllOfMetrics.md | 28 + .../AacVisualizationTableBucketsAllOfRows.md | 28 + ...VisualizationTableBucketsAllOfSegmentBy.md | 28 + ...AacVisualizationTableBucketsAllOfSizeBy.md | 28 + ...acVisualizationTableBucketsAllOfStackBy.md | 28 + ...acVisualizationTableBucketsAllOfTrendBy.md | 28 + ...AacVisualizationTableBucketsAllOfViewBy.md | 28 + ...isualizationTrendBucketsAllOfAttributes.md | 28 + ...acVisualizationTrendBucketsAllOfColumns.md | 28 + ...acVisualizationTrendBucketsAllOfMetrics.md | 28 + .../AacVisualizationTrendBucketsAllOfRows.md | 28 + ...VisualizationTrendBucketsAllOfSegmentBy.md | 28 + ...AacVisualizationTrendBucketsAllOfSizeBy.md | 28 + ...acVisualizationTrendBucketsAllOfStackBy.md | 28 + ...acVisualizationTrendBucketsAllOfTrendBy.md | 28 + ...AacVisualizationTrendBucketsAllOfViewBy.md | 28 + .../AacVisualizationWidgetAllOfDescription.md | 28 + .../docs/AacVisualizationWidgetAllOfTitle.md | 28 + gooddata-api-client/docs/ActionsApi.md | 876 ++++++++- .../docs/AnalyticalDashboardControllerApi.md | 673 +++++++ gooddata-api-client/docs/AnalyzeCsvRequest.md | 13 + .../docs/AnalyzeCsvRequestItem.md | 14 + .../docs/AnalyzeCsvRequestItemConfig.md | 16 + .../docs/AnalyzeCsvResponse.md | 16 + .../docs/AnalyzeCsvResponseColumn.md | 15 + .../docs/AnalyzeCsvResponseConfig.md | 15 + .../docs/ApiTokenControllerApi.md | 326 ++++ .../docs/AttributeControllerApi.md | 397 ++++ .../docs/AttributeHierarchyControllerApi.md | 670 +++++++ .../docs/AutomationControllerApi.md | 1441 +++++++++++++++ .../docs/CacheRemovalInterval.md | 15 + gooddata-api-client/docs/CacheUsageApi.md | 72 + gooddata-api-client/docs/CacheUsageData.md | 14 + .../docs/ConvertGeoFileRequest.md | 13 + .../docs/ConvertGeoFileResponse.md | 13 + ...ookieSecurityConfigurationControllerApi.md | 263 +++ gooddata-api-client/docs/CsvConvertOptions.md | 25 + .../docs/CsvConvertOptionsColumnType.md | 15 + gooddata-api-client/docs/CsvManifestBody.md | 17 + gooddata-api-client/docs/CsvParseOptions.md | 18 + gooddata-api-client/docs/CsvReadOptions.md | 19 + .../CustomApplicationSettingControllerApi.md | 635 +++++++ .../docs/CustomGeoCollectionControllerApi.md | 492 +++++ gooddata-api-client/docs/DashboardContext.md | 14 + .../docs/DashboardContextWidgetsInner.md | 18 + .../docs/DashboardPluginControllerApi.md | 670 +++++++ .../docs/DataSourceControllerApi.md | 572 ++++++ .../docs/DataSourceFilesAnalysisApi.md | 91 + .../docs/DataSourceFilesDeletionApi.md | 81 + .../docs/DataSourceFilesImportApi.md | 143 ++ .../docs/DataSourceFilesListingApi.md | 76 + .../docs/DataSourceFilesManifestReadApi.md | 86 + .../docs/DataSourceStagingLocationApi.md | 76 + .../docs/DatasetControllerApi.md | 392 ++++ .../docs/DeleteFilesRequest.md | 13 + .../docs/ExportDefinitionControllerApi.md | 694 +++++++ gooddata-api-client/docs/FactControllerApi.md | 392 ++++ .../docs/FilterContextControllerApi.md | 670 +++++++ .../docs/FilterViewControllerApi.md | 689 +++++++ gooddata-api-client/docs/GdStorageFile.md | 16 + gooddata-api-client/docs/GeoJsonFeature.md | 16 + .../docs/GeoJsonFeatureCollection.md | 15 + gooddata-api-client/docs/GeoJsonGeometry.md | 14 + .../docs/GetServiceStatusResponse.md | 13 + gooddata-api-client/docs/ImportCsvRequest.md | 13 + .../docs/ImportCsvRequestTable.md | 14 + .../docs/ImportCsvRequestTableSource.md | 14 + .../docs/ImportCsvRequestTableSourceConfig.md | 16 + gooddata-api-client/docs/ImportCsvResponse.md | 14 + .../docs/ImportGeoCollectionRequest.md | 13 + .../docs/ImportGeoCollectionResponse.md | 13 + .../docs/InsightWidgetDescriptor.md | 17 + .../docs/InsightWidgetDescriptorAllOf.md | 15 + gooddata-api-client/docs/JwkControllerApi.md | 501 +++++ .../docs/LabelControllerApi.md | 392 ++++ .../docs/ListLlmProviderModelsRequest.md | 12 + ...tLlmProviderModelsRequestProviderConfig.md | 17 + .../docs/ListLlmProviderModelsResponse.md | 14 + .../docs/MetricControllerApi.md | 688 +++++++ gooddata-api-client/docs/OGCAPIFeaturesApi.md | 180 ++ gooddata-api-client/docs/ObjectReference.md | 13 + .../docs/ObjectReferenceGroup.md | 13 + .../docs/OrganizationCacheSettings.md | 13 + .../docs/OrganizationCacheUsage.md | 15 + .../docs/OrganizationCurrentCacheUsage.md | 15 + .../docs/OrganizationEntityControllerApi.md | 303 +++ .../docs/ReadCsvFileManifestsRequest.md | 13 + .../docs/ReadCsvFileManifestsRequestItem.md | 14 + .../docs/ReadCsvFileManifestsResponse.md | 15 + .../docs/RichTextWidgetDescriptor.md | 15 + .../docs/RichTextWidgetDescriptorAllOf.md | 13 + .../docs/TestLlmProviderByIdRequest.md | 13 + .../docs/ToolCallEventResult.md | 15 + .../docs/TrendingObjectItem.md | 30 + .../docs/TrendingObjectsResult.md | 12 + gooddata-api-client/docs/UIContext.md | 13 + .../docs/UploadFileResponse.md | 13 + .../docs/UploadGeoCollectionFileResponse.md | 13 + .../docs/UserDataFilterControllerApi.md | 694 +++++++ .../docs/UserSettingControllerApi.md | 421 +++++ .../docs/VisualizationObjectControllerApi.md | 673 +++++++ .../VisualizationSwitcherWidgetDescriptor.md | 18 + ...ualizationSwitcherWidgetDescriptorAllOf.md | 16 + gooddata-api-client/docs/WidgetDescriptor.md | 15 + .../docs/WorkspaceCacheSettings.md | 13 + .../docs/WorkspaceCacheUsage.md | 15 + .../docs/WorkspaceCurrentCacheUsage.md | 16 + .../docs/WorkspaceDataFilterControllerApi.md | 688 +++++++ ...WorkspaceDataFilterSettingControllerApi.md | 679 +++++++ .../docs/WorkspaceSettingControllerApi.md | 635 +++++++ .../gooddata_api_client/api/actions_api.py | 1637 +++++++++++++++-- .../analytical_dashboard_controller_api.py | 1321 +++++++++++++ .../api/api_token_controller_api.py | 667 +++++++ .../api/attribute_controller_api.py | 782 ++++++++ .../api/attribute_hierarchy_controller_api.py | 1279 +++++++++++++ .../api/automation_controller_api.py | 1314 +++++++++++++ .../api/cache_usage_api.py | 159 ++ ...e_security_configuration_controller_api.py | 500 +++++ ...stom_application_setting_controller_api.py | 1200 ++++++++++++ .../custom_geo_collection_controller_api.py | 940 ++++++++++ .../api/dashboard_plugin_controller_api.py | 1275 +++++++++++++ .../api/data_source_controller_api.py | 983 ++++++++++ .../api/data_source_files_analysis_api.py | 173 ++ .../api/data_source_files_deletion_api.py | 180 ++ .../api/data_source_files_import_api.py | 183 ++ .../api/data_source_files_listing_api.py | 171 ++ .../data_source_files_manifest_read_api.py | 183 ++ .../api/data_source_staging_location_api.py | 173 ++ .../api/dataset_controller_api.py | 785 ++++++++ .../api/export_definition_controller_api.py | 1305 +++++++++++++ .../api/fact_controller_api.py | 773 ++++++++ .../api/filter_context_controller_api.py | 1275 +++++++++++++ .../api/filter_view_controller_api.py | 1242 +++++++++++++ .../api/jwk_controller_api.py | 946 ++++++++++ .../api/label_controller_api.py | 773 ++++++++ .../api/metric_controller_api.py | 1305 +++++++++++++ .../api/ogcapi_features_api.py | 353 ++++ .../api/organization_entity_controller_api.py | 572 ++++++ .../api/user_data_filter_controller_api.py | 1305 +++++++++++++ .../api/user_setting_controller_api.py | 834 +++++++++ .../visualization_object_controller_api.py | 1305 +++++++++++++ .../workspace_data_filter_controller_api.py | 1269 +++++++++++++ ...pace_data_filter_setting_controller_api.py | 1269 +++++++++++++ .../api/workspace_setting_controller_api.py | 1200 ++++++++++++ .../gooddata_api_client/api_response.py | 21 + .../gooddata_api_client/apis/__init__.py | 8 + .../model/analyze_csv_request.py | 276 +++ .../model/analyze_csv_request_item.py | 280 +++ .../model/analyze_csv_request_item_config.py | 276 +++ .../model/analyze_csv_response.py | 294 +++ .../model/analyze_csv_response_column.py | 280 +++ .../model/analyze_csv_response_config.py | 282 +++ .../model/cache_removal_interval.py | 282 +++ .../model/cache_usage_data.py | 284 +++ .../model/convert_geo_file_request.py | 270 +++ .../model/convert_geo_file_response.py | 270 +++ .../model/csv_convert_options.py | 318 ++++ .../model/csv_convert_options_column_type.py | 272 +++ .../model/csv_manifest_body.py | 290 +++ .../model/csv_parse_options.py | 284 +++ .../model/csv_read_options.py | 288 +++ .../model/dashboard_context.py | 282 +++ .../model/dashboard_context_widgets_inner.py | 360 ++++ .../model/declarative_column.py | 3 + .../model/delete_files_request.py | 270 +++ .../model/gd_storage_file.py | 293 +++ .../model/geo_json_feature.py | 290 +++ .../model/geo_json_feature_collection.py | 286 +++ .../model/geo_json_geometry.py | 276 +++ .../model/get_service_status_response.py | 276 +++ .../model/import_csv_request.py | 276 +++ .../model/import_csv_request_table.py | 282 +++ .../model/import_csv_request_table_source.py | 282 +++ .../import_csv_request_table_source_config.py | 286 +++ .../model/import_csv_response.py | 276 +++ .../model/import_geo_collection_request.py | 270 +++ .../model/import_geo_collection_response.py | 270 +++ .../model/insight_widget_descriptor.py | 342 ++++ .../model/insight_widget_descriptor_all_of.py | 276 +++ .../model/list_llm_provider_models_request.py | 276 +++ ...provider_models_request_provider_config.py | 363 ++++ .../list_llm_provider_models_response.py | 288 +++ .../model/object_reference.py | 282 +++ .../model/object_reference_group.py | 280 +++ .../model/organization_cache_settings.py | 270 +++ .../model/organization_cache_usage.py | 292 +++ .../model/organization_current_cache_usage.py | 280 +++ .../model/read_csv_file_manifests_request.py | 276 +++ .../read_csv_file_manifests_request_item.py | 274 +++ .../model/read_csv_file_manifests_response.py | 288 +++ .../model/rich_text_widget_descriptor.py | 334 ++++ .../rich_text_widget_descriptor_all_of.py | 268 +++ .../model/test_llm_provider_by_id_request.py | 276 +++ .../model/tool_call_event_result.py | 282 +++ .../model/trending_object_item.py | 348 ++++ .../model/trending_objects_result.py | 276 +++ .../gooddata_api_client/model/ui_context.py | 270 +++ .../model/upload_file_response.py | 270 +++ .../upload_geo_collection_file_response.py | 270 +++ ...isualization_switcher_widget_descriptor.py | 346 ++++ ...ation_switcher_widget_descriptor_all_of.py | 280 +++ .../model/widget_descriptor.py | 299 +++ .../model/workspace_cache_settings.py | 270 +++ .../model/workspace_cache_usage.py | 292 +++ .../model/workspace_current_cache_usage.py | 288 +++ .../gooddata_api_client/models/__init__.py | 38 + .../models/aac_analytics_model.py | 136 ++ .../models/aac_attribute_hierarchy.py | 98 + .../models/aac_container_widget.py | 112 ++ .../models/aac_dashboard.py | 145 ++ .../models/aac_dashboard_filter.py | 123 ++ .../models/aac_dashboard_filter_from.py | 147 ++ .../models/aac_dashboard_permissions.py | 102 + .../models/aac_dashboard_plugin_link.py | 95 + .../models/aac_dashboard_with_tabs.py | 93 + .../models/aac_dashboard_without_tabs.py | 106 ++ .../gooddata_api_client/models/aac_dataset.py | 145 ++ .../models/aac_dataset_primary_key.py | 147 ++ .../models/aac_date_dataset.py | 102 + .../gooddata_api_client/models/aac_field.py | 151 ++ .../models/aac_filter_state.py | 90 + .../models/aac_geo_area_config.py | 92 + .../models/aac_geo_collection_identifier.py | 101 + .../gooddata_api_client/models/aac_label.py | 131 ++ .../models/aac_label_translation.py | 90 + .../models/aac_logical_model.py | 106 ++ .../gooddata_api_client/models/aac_metric.py | 106 ++ .../models/aac_permission.py | 92 + .../gooddata_api_client/models/aac_plugin.py | 98 + .../gooddata_api_client/models/aac_query.py | 118 ++ .../models/aac_query_fields_value.py | 147 ++ .../models/aac_query_filter.py | 127 ++ .../models/aac_reference.py | 100 + .../models/aac_reference_source.py | 103 ++ .../models/aac_rich_text_widget.py | 112 ++ .../gooddata_api_client/models/aac_section.py | 104 ++ .../gooddata_api_client/models/aac_tab.py | 115 ++ .../models/aac_visualization.py | 234 +++ .../models/aac_visualization_basic_buckets.py | 118 ++ .../aac_visualization_bubble_buckets.py | 118 ++ .../aac_visualization_dependency_buckets.py | 118 ++ .../models/aac_visualization_geo_buckets.py | 118 ++ .../models/aac_visualization_layer.py | 146 ++ .../aac_visualization_scatter_buckets.py | 118 ++ .../aac_visualization_stacked_buckets.py | 118 ++ .../aac_visualization_switcher_widget.py | 112 ++ .../models/aac_visualization_table_buckets.py | 118 ++ .../models/aac_visualization_trend_buckets.py | 118 ++ .../models/aac_visualization_widget.py | 112 ++ .../gooddata_api_client/models/aac_widget.py | 173 ++ .../models/aac_widget_size.py | 92 + .../models/aac_workspace_data_filter.py | 100 + .../models/absolute_date_filter.py | 92 + ...solute_date_filter_absolute_date_filter.py | 128 ++ .../models/abstract_measure_value_filter.py | 171 ++ .../models/active_object_identification.py | 92 + .../models/ad_hoc_automation.py | 204 ++ .../gooddata_api_client/models/afm.py | 135 ++ .../models/afm_cancel_tokens.py | 88 + .../models/afm_execution.py | 104 ++ .../models/afm_execution_response.py | 92 + .../models/afm_filters_inner.py | 156 ++ .../models/afm_identifier.py | 141 ++ .../models/afm_local_identifier.py | 96 + .../models/afm_object_identifier.py | 92 + .../models/afm_object_identifier_attribute.py | 92 + ..._object_identifier_attribute_identifier.py | 106 ++ .../models/afm_object_identifier_core.py | 92 + .../afm_object_identifier_core_identifier.py | 106 ++ .../models/afm_object_identifier_dataset.py | 92 + ...fm_object_identifier_dataset_identifier.py | 106 ++ .../afm_object_identifier_identifier.py | 106 ++ .../models/afm_object_identifier_label.py | 92 + .../afm_object_identifier_label_identifier.py | 106 ++ .../models/afm_valid_descendants_query.py | 96 + .../models/afm_valid_descendants_response.py | 105 ++ .../models/afm_valid_objects_query.py | 102 + .../models/afm_valid_objects_response.py | 96 + .../gooddata_api_client/models/alert_afm.py | 125 ++ .../models/alert_condition.py | 171 ++ .../models/alert_condition_operand.py | 141 ++ .../models/alert_description.py | 136 ++ .../models/alert_evaluation_row.py | 104 ++ .../models/all_time_date_filter.py | 92 + ...l_time_date_filter_all_time_date_filter.py | 122 ++ .../models/allowed_relationship_type.py | 108 ++ .../models/analytics_catalog_created_by.py | 98 + .../models/analytics_catalog_tags.py | 88 + .../models/analytics_catalog_user.py | 92 + .../models/anomaly_detection.py | 118 ++ .../models/anomaly_detection_config.py | 96 + .../models/anomaly_detection_request.py | 88 + .../models/anomaly_detection_result.py | 92 + .../models/anomaly_detection_wrapper.py | 92 + .../models/api_entitlement.py | 101 + .../models/arithmetic_measure.py | 107 ++ .../models/arithmetic_measure_definition.py | 92 + ...c_measure_definition_arithmetic_measure.py | 106 ++ .../models/assignee_identifier.py | 98 + .../models/assignee_rule.py | 96 + .../models/attribute_elements.py | 141 ++ .../models/attribute_elements_by_ref.py | 88 + .../models/attribute_elements_by_value.py | 88 + .../attribute_execution_result_header.py | 92 + .../models/attribute_filter.py | 156 ++ .../models/attribute_filter_by_date.py | 90 + .../models/attribute_filter_elements.py | 88 + .../models/attribute_filter_parent.py | 94 + .../models/attribute_format.py | 92 + .../models/attribute_header.py | 92 + .../attribute_header_attribute_header.py | 154 ++ .../models/attribute_item.py | 104 ++ .../models/attribute_negative_filter.py | 90 + .../models/attribute_positive_filter.py | 90 + .../models/attribute_result_header.py | 90 + .../models/automation_alert.py | 124 ++ .../models/automation_alert_condition.py | 171 ++ .../automation_dashboard_tabular_export.py | 92 + .../models/automation_external_recipient.py | 88 + .../models/automation_image_export.py | 92 + .../models/automation_metadata.py | 111 ++ .../models/automation_notification.py | 94 + .../models/automation_raw_export.py | 92 + .../models/automation_schedule.py | 98 + .../models/automation_slides_export.py | 92 + .../models/automation_tabular_export.py | 92 + .../models/automation_visual_export.py | 92 + .../models/available_assignees.py | 106 ++ .../models/aws_bedrock_access_key_auth.py | 118 ++ .../models/aws_bedrock_provider_config.py | 105 ++ .../models/azure_foundry_api_key_auth.py | 104 ++ .../models/azure_foundry_provider_auth.py | 126 ++ .../models/azure_foundry_provider_config.py | 105 ++ .../models/bedrock_provider_auth.py | 126 ++ .../models/bounded_filter.py | 110 ++ .../models/change_analysis_params.py | 125 ++ .../change_analysis_params_filters_inner.py | 156 ++ .../models/change_analysis_request.py | 136 ++ .../models/change_analysis_response.py | 92 + .../models/change_analysis_result.py | 96 + .../models/chat_history_interaction.py | 148 ++ .../models/chat_history_request.py | 126 ++ .../models/chat_history_result.py | 98 + .../models/chat_request.py | 134 ++ .../gooddata_api_client/models/chat_result.py | 130 ++ .../models/chat_usage_response.py | 92 + .../models/clustering_config.py | 90 + .../models/clustering_request.py | 91 + .../models/clustering_result.py | 98 + .../models/column_override.py | 116 ++ .../models/column_statistic.py | 98 + .../models/column_statistic_warning.py | 90 + .../models/column_statistics_request.py | 119 ++ .../models/column_statistics_request_from.py | 141 ++ .../models/column_statistics_response.py | 118 ++ .../models/column_warning.py | 90 + .../gooddata_api_client/models/comparison.py | 108 ++ .../models/comparison_condition.py | 92 + .../models/comparison_condition_comparison.py | 98 + .../models/comparison_measure_value_filter.py | 92 + ..._filter_comparison_measure_value_filter.py | 119 ++ .../models/comparison_wrapper.py | 92 + .../models/compound_measure_value_filter.py | 92 + ...ue_filter_compound_measure_value_filter.py | 117 ++ .../models/content_slide_template.py | 114 ++ .../models/cover_slide_template.py | 116 ++ .../create_knowledge_document_request_dto.py | 96 + .../create_knowledge_document_response_dto.py | 94 + .../models/created_visualization.py | 148 ++ .../created_visualization_filters_inner.py | 186 ++ .../models/created_visualizations.py | 108 ++ .../models/custom_label.py | 88 + .../models/custom_metric.py | 90 + .../models/custom_override.py | 116 ++ .../models/dashboard_attribute_filter.py | 92 + ...board_attribute_filter_attribute_filter.py | 146 ++ .../models/dashboard_date_filter.py | 92 + .../dashboard_date_filter_date_filter.py | 149 ++ .../models/dashboard_export_settings.py | 116 ++ .../models/dashboard_filter.py | 141 ++ .../models/dashboard_permissions.py | 116 ++ .../dashboard_permissions_assignment.py | 96 + .../models/dashboard_slides_template.py | 141 ++ .../dashboard_tabular_export_request.py | 135 ++ .../dashboard_tabular_export_request_v2.py | 137 ++ .../models/data_column_locator.py | 88 + .../models/data_column_locators.py | 101 + .../models/data_source_parameter.py | 90 + .../data_source_permission_assignment.py | 102 + .../models/data_source_schemata.py | 88 + .../models/data_source_table_identifier.py | 115 ++ .../models/database_instance.py | 92 + .../models/dataset_grain.py | 98 + .../models/dataset_reference_identifier.py | 98 + ...ataset_workspace_data_filter_identifier.py | 106 ++ .../models/date_absolute_filter.py | 92 + .../gooddata_api_client/models/date_filter.py | 156 ++ .../models/date_relative_filter.py | 102 + .../gooddata_api_client/models/date_value.py | 88 + .../models/declarative_aggregated_fact.py | 125 ++ .../declarative_analytical_dashboard.py | 214 +++ ...larative_analytical_dashboard_extension.py | 106 ++ ...arative_analytical_dashboard_identifier.py | 106 ++ ...lytical_dashboard_permission_assignment.py | 96 + ...tical_dashboard_permission_for_assignee.py | 102 + ..._dashboard_permission_for_assignee_rule.py | 102 + ..._analytical_dashboard_permissions_inner.py | 141 ++ .../models/declarative_analytics.py | 92 + .../models/declarative_analytics_layer.py | 176 ++ .../models/declarative_attribute.py | 156 ++ .../models/declarative_attribute_hierarchy.py | 158 ++ .../models/declarative_automation.py | 303 +++ .../models/declarative_color_palette.py | 98 + .../models/declarative_column.py | 109 ++ .../models/declarative_csp_directive.py | 91 + .../declarative_custom_application_setting.py | 105 ++ .../declarative_custom_geo_collection.py | 100 + .../declarative_custom_geo_collections.py | 96 + .../models/declarative_dashboard_plugin.py | 158 ++ .../models/declarative_data_source.py | 213 +++ .../declarative_data_source_permission.py | 102 + .../declarative_data_source_permissions.py | 96 + .../models/declarative_data_sources.py | 96 + .../models/declarative_dataset.py | 186 ++ .../models/declarative_dataset_extension.py | 106 ++ .../models/declarative_dataset_sql.py | 90 + .../models/declarative_date_dataset.py | 118 ++ .../models/declarative_export_definition.py | 157 ++ ...eclarative_export_definition_identifier.py | 106 ++ ...ative_export_definition_request_payload.py | 141 ++ .../models/declarative_export_template.py | 120 ++ .../models/declarative_export_templates.py | 96 + .../models/declarative_fact.py | 123 ++ .../models/declarative_filter_context.py | 109 ++ .../models/declarative_filter_view.py | 123 ++ .../models/declarative_identity_provider.py | 134 ++ ...eclarative_identity_provider_identifier.py | 106 ++ .../models/declarative_jwk.py | 102 + .../models/declarative_jwk_specification.py | 126 ++ .../models/declarative_label.py | 154 ++ .../models/declarative_label_translation.py | 90 + .../models/declarative_ldm.py | 116 ++ .../models/declarative_memory_item.py | 167 ++ .../models/declarative_metric.py | 206 +++ .../models/declarative_model.py | 92 + .../declarative_notification_channel.py | 169 ++ ...rative_notification_channel_destination.py | 171 ++ ...arative_notification_channel_identifier.py | 106 ++ .../declarative_notification_channels.py | 96 + .../models/declarative_organization.py | 192 ++ .../models/declarative_organization_info.py | 162 ++ .../declarative_organization_permission.py | 102 + .../models/declarative_reference.py | 119 ++ .../models/declarative_reference_source.py | 112 ++ .../models/declarative_rsa_specification.py | 134 ++ .../models/declarative_setting.py | 116 ++ ...declarative_single_workspace_permission.py | 102 + .../declarative_source_fact_reference.py | 102 + .../models/declarative_table.py | 112 ++ .../models/declarative_tables.py | 96 + .../models/declarative_theme.py | 98 + .../models/declarative_user.py | 134 ++ .../models/declarative_user_data_filter.py | 116 ++ .../models/declarative_user_data_filters.py | 96 + .../models/declarative_user_group.py | 118 ++ .../declarative_user_group_identifier.py | 106 ++ .../declarative_user_group_permission.py | 102 + .../declarative_user_group_permissions.py | 96 + .../models/declarative_user_groups.py | 96 + .../models/declarative_user_identifier.py | 106 ++ .../models/declarative_user_permission.py | 102 + .../models/declarative_user_permissions.py | 96 + .../models/declarative_users.py | 96 + .../models/declarative_users_user_groups.py | 106 ++ .../declarative_visualization_object.py | 204 ++ .../models/declarative_workspace.py | 206 +++ .../declarative_workspace_data_filter.py | 118 ++ ...eclarative_workspace_data_filter_column.py | 98 + ...rative_workspace_data_filter_references.py | 104 ++ ...clarative_workspace_data_filter_setting.py | 108 ++ .../declarative_workspace_data_filters.py | 96 + ...larative_workspace_hierarchy_permission.py | 102 + .../models/declarative_workspace_model.py | 98 + .../declarative_workspace_permissions.py | 106 ++ .../models/declarative_workspaces.py | 106 ++ .../models/default_smtp.py | 100 + .../delete_knowledge_document_response_dto.py | 90 + .../models/dependent_entities_graph.py | 111 ++ .../models/dependent_entities_node.py | 100 + .../models/dependent_entities_request.py | 109 ++ .../models/dependent_entities_response.py | 92 + .../gooddata_api_client/models/depends_on.py | 92 + .../models/depends_on_date_filter.py | 92 + .../models/dim_attribute.py | 100 + .../gooddata_api_client/models/dimension.py | 111 ++ .../models/dimension_header.py | 96 + .../gooddata_api_client/models/element.py | 90 + .../models/elements_request.py | 147 ++ .../elements_request_depends_on_inner.py | 141 ++ .../models/elements_response.py | 129 ++ .../models/entitlements_request.py | 96 + .../models/entity_identifier.py | 106 ++ .../models/entity_search_body.py | 128 ++ .../models/entity_search_page.py | 91 + .../models/entity_search_sort.py | 101 + .../models/execution_links.py | 88 + .../models/execution_response.py | 102 + .../models/execution_result.py | 120 ++ .../execution_result_data_source_message.py | 94 + .../models/execution_result_grand_total.py | 100 + .../models/execution_result_header.py | 197 ++ .../models/execution_result_metadata.py | 96 + .../models/execution_result_paging.py | 92 + .../models/execution_settings.py | 92 + .../models/export_request.py | 141 ++ .../models/export_response.py | 88 + .../models/export_result.py | 113 ++ .../models/fact_identifier.py | 106 ++ .../models/failed_operation.py | 96 + .../gooddata_api_client/models/file.py | 162 ++ .../gooddata_api_client/models/filter_by.py | 99 + .../models/filter_definition.py | 276 +++ .../filter_definition_for_simple_measure.py | 141 ++ .../models/forecast_config.py | 92 + .../models/forecast_request.py | 93 + .../models/forecast_result.py | 96 + .../models/found_objects.py | 98 + .../gooddata_api_client/models/frequency.py | 96 + .../models/frequency_bucket.py | 90 + .../models/frequency_properties.py | 88 + .../models/generate_description_request.py | 98 + .../models/generate_description_response.py | 90 + .../models/generate_ldm_request.py | 130 ++ .../models/generate_title_request.py | 98 + .../models/generate_title_response.py | 90 + .../models/geo_area_config.py | 92 + .../models/geo_collection_identifier.py | 102 + .../get_ai_lake_operation200_response.py | 159 ++ .../get_image_export202_response_inner.py | 102 + .../models/get_quality_issues_response.py | 108 ++ .../models/grain_identifier.py | 106 ++ .../models/granted_permission.py | 90 + .../models/granularities_formatting.py | 91 + .../models/header_group.py | 96 + .../models/hierarchy_object_identification.py | 98 + .../gooddata_api_client/models/histogram.py | 96 + .../models/histogram_bucket.py | 92 + .../models/histogram_properties.py | 88 + .../models/identifier_duplications.py | 100 + .../models/identifier_ref.py | 92 + .../models/identifier_ref_identifier.py | 98 + .../models/image_export_request.py | 110 ++ .../gooddata_api_client/models/in_platform.py | 96 + .../models/inline_filter_definition.py | 92 + .../models/inline_filter_definition_inline.py | 92 + .../models/inline_measure_definition.py | 92 + .../inline_measure_definition_inline.py | 88 + .../models/intro_slide_template.py | 123 ++ .../json_api_aggregated_fact_linkage.py | 98 + .../models/json_api_aggregated_fact_out.py | 124 ++ ...json_api_aggregated_fact_out_attributes.py | 122 ++ .../json_api_aggregated_fact_out_document.py | 108 ++ .../json_api_aggregated_fact_out_includes.py | 141 ++ .../json_api_aggregated_fact_out_list.py | 118 ++ .../json_api_aggregated_fact_out_list_meta.py | 92 + .../json_api_aggregated_fact_out_meta.py | 92 + ...son_api_aggregated_fact_out_meta_origin.py | 98 + ...n_api_aggregated_fact_out_relationships.py | 98 + ...gregated_fact_out_relationships_dataset.py | 97 + ...ated_fact_out_relationships_source_fact.py | 97 + ...json_api_aggregated_fact_out_with_links.py | 130 ++ .../json_api_analytical_dashboard_in.py | 112 ++ ..._api_analytical_dashboard_in_attributes.py | 99 + ...on_api_analytical_dashboard_in_document.py | 92 + .../json_api_analytical_dashboard_linkage.py | 98 + .../json_api_analytical_dashboard_out.py | 124 ++ ...api_analytical_dashboard_out_attributes.py | 177 ++ ...n_api_analytical_dashboard_out_document.py | 108 ++ ...n_api_analytical_dashboard_out_includes.py | 231 +++ .../json_api_analytical_dashboard_out_list.py | 118 ++ .../json_api_analytical_dashboard_out_meta.py | 111 ++ ...alytical_dashboard_out_meta_access_info.py | 88 + ..._analytical_dashboard_out_relationships.py | 144 ++ ...out_relationships_analytical_dashboards.py | 96 + ...ashboard_out_relationships_certified_by.py | 97 + ...ard_out_relationships_dashboard_plugins.py | 96 + ...al_dashboard_out_relationships_datasets.py | 96 + ...board_out_relationships_filter_contexts.py | 96 + ...ical_dashboard_out_relationships_labels.py | 96 + ...cal_dashboard_out_relationships_metrics.py | 96 + ...out_relationships_visualization_objects.py | 96 + ...api_analytical_dashboard_out_with_links.py | 130 ++ .../json_api_analytical_dashboard_patch.py | 112 ++ ...i_analytical_dashboard_patch_attributes.py | 99 + ...api_analytical_dashboard_patch_document.py | 92 + ...i_analytical_dashboard_post_optional_id.py | 115 ++ ...cal_dashboard_post_optional_id_document.py | 92 + ...api_analytical_dashboard_to_one_linkage.py | 132 ++ .../models/json_api_api_token_in.py | 106 ++ .../models/json_api_api_token_in_document.py | 92 + .../models/json_api_api_token_out.py | 112 ++ .../json_api_api_token_out_attributes.py | 88 + .../models/json_api_api_token_out_document.py | 98 + .../models/json_api_api_token_out_list.py | 108 ++ .../json_api_api_token_out_with_links.py | 118 ++ .../models/json_api_attribute_hierarchy_in.py | 112 ++ ...n_api_attribute_hierarchy_in_attributes.py | 97 + ...son_api_attribute_hierarchy_in_document.py | 92 + .../json_api_attribute_hierarchy_linkage.py | 98 + .../json_api_attribute_hierarchy_out.py | 124 ++ ..._api_attribute_hierarchy_out_attributes.py | 136 ++ ...on_api_attribute_hierarchy_out_document.py | 108 ++ ...on_api_attribute_hierarchy_out_includes.py | 141 ++ .../json_api_attribute_hierarchy_out_list.py | 118 ++ ...i_attribute_hierarchy_out_relationships.py | 103 ++ ..._hierarchy_out_relationships_attributes.py | 96 + ..._api_attribute_hierarchy_out_with_links.py | 130 ++ .../json_api_attribute_hierarchy_patch.py | 112 ++ ..._api_attribute_hierarchy_patch_document.py | 92 + .../models/json_api_attribute_linkage.py | 98 + .../models/json_api_attribute_out.py | 124 ++ .../json_api_attribute_out_attributes.py | 146 ++ .../models/json_api_attribute_out_document.py | 108 ++ .../models/json_api_attribute_out_includes.py | 156 ++ .../models/json_api_attribute_out_list.py | 118 ++ .../json_api_attribute_out_relationships.py | 110 ++ ...out_relationships_attribute_hierarchies.py | 96 + ...ttribute_out_relationships_default_view.py | 97 + .../json_api_attribute_out_with_links.py | 130 ++ .../models/json_api_attribute_patch.py | 118 ++ .../json_api_attribute_patch_attributes.py | 93 + .../json_api_attribute_patch_document.py | 92 + .../json_api_attribute_patch_relationships.py | 92 + .../json_api_attribute_to_one_linkage.py | 132 ++ .../models/json_api_automation_in.py | 118 ++ .../json_api_automation_in_attributes.py | 216 +++ ...json_api_automation_in_attributes_alert.py | 124 ++ ...ributes_dashboard_tabular_exports_inner.py | 92 + ...in_attributes_external_recipients_inner.py | 88 + ...ation_in_attributes_image_exports_inner.py | 92 + ...n_api_automation_in_attributes_metadata.py | 111 ++ ...omation_in_attributes_raw_exports_inner.py | 92 + ...n_api_automation_in_attributes_schedule.py | 98 + ...tion_in_attributes_slides_exports_inner.py | 92 + ...ion_in_attributes_tabular_exports_inner.py | 92 + ...tion_in_attributes_visual_exports_inner.py | 92 + .../models/json_api_automation_in_document.py | 92 + .../json_api_automation_in_relationships.py | 110 ++ ...n_in_relationships_analytical_dashboard.py | 97 + ...ion_in_relationships_export_definitions.py | 96 + ...n_in_relationships_notification_channel.py | 97 + ..._automation_in_relationships_recipients.py | 96 + .../models/json_api_automation_linkage.py | 98 + .../models/json_api_automation_out.py | 124 ++ .../json_api_automation_out_attributes.py | 255 +++ .../json_api_automation_out_document.py | 108 ++ .../json_api_automation_out_includes.py | 201 ++ .../models/json_api_automation_out_list.py | 118 ++ .../json_api_automation_out_relationships.py | 127 ++ ...on_out_relationships_automation_results.py | 96 + .../json_api_automation_out_with_links.py | 130 ++ .../models/json_api_automation_patch.py | 118 ++ .../json_api_automation_patch_document.py | 92 + .../json_api_automation_result_linkage.py | 98 + .../models/json_api_automation_result_out.py | 118 ++ ...on_api_automation_result_out_attributes.py | 104 ++ .../json_api_automation_result_out_list.py | 118 ++ ...api_automation_result_out_relationships.py | 92 + ...ion_result_out_relationships_automation.py | 97 + ...on_api_automation_result_out_with_links.py | 124 ++ .../json_api_automation_to_one_linkage.py | 132 ++ .../models/json_api_color_palette_in.py | 112 ++ .../json_api_color_palette_in_attributes.py | 91 + .../json_api_color_palette_in_document.py | 92 + .../models/json_api_color_palette_out.py | 112 ++ .../json_api_color_palette_out_document.py | 98 + .../models/json_api_color_palette_out_list.py | 108 ++ .../json_api_color_palette_out_with_links.py | 118 ++ .../models/json_api_color_palette_patch.py | 112 ++ ...json_api_color_palette_patch_attributes.py | 91 + .../json_api_color_palette_patch_document.py | 92 + ...on_api_cookie_security_configuration_in.py | 112 ++ ...ie_security_configuration_in_attributes.py | 91 + ...okie_security_configuration_in_document.py | 92 + ...n_api_cookie_security_configuration_out.py | 112 ++ ...kie_security_configuration_out_document.py | 98 + ...api_cookie_security_configuration_patch.py | 112 ++ ...e_security_configuration_patch_document.py | 92 + .../models/json_api_csp_directive_in.py | 112 ++ .../json_api_csp_directive_in_attributes.py | 88 + .../json_api_csp_directive_in_document.py | 92 + .../models/json_api_csp_directive_out.py | 112 ++ .../json_api_csp_directive_out_document.py | 98 + .../models/json_api_csp_directive_out_list.py | 108 ++ .../json_api_csp_directive_out_with_links.py | 118 ++ .../models/json_api_csp_directive_patch.py | 112 ++ ...json_api_csp_directive_patch_attributes.py | 88 + .../json_api_csp_directive_patch_document.py | 92 + .../json_api_custom_application_setting_in.py | 112 ++ ...ustom_application_setting_in_attributes.py | 91 + ..._custom_application_setting_in_document.py | 92 + ...json_api_custom_application_setting_out.py | 118 ++ ...custom_application_setting_out_document.py | 98 + ...api_custom_application_setting_out_list.py | 108 ++ ...stom_application_setting_out_with_links.py | 124 ++ ...on_api_custom_application_setting_patch.py | 112 ++ ...om_application_setting_patch_attributes.py | 91 + ...stom_application_setting_patch_document.py | 92 + ...om_application_setting_post_optional_id.py | 115 ++ ...ation_setting_post_optional_id_document.py | 92 + .../json_api_custom_geo_collection_in.py | 112 ++ ...api_custom_geo_collection_in_attributes.py | 101 + ...n_api_custom_geo_collection_in_document.py | 92 + .../json_api_custom_geo_collection_out.py | 112 ++ ..._api_custom_geo_collection_out_document.py | 98 + ...json_api_custom_geo_collection_out_list.py | 108 ++ ...pi_custom_geo_collection_out_with_links.py | 118 ++ .../json_api_custom_geo_collection_patch.py | 112 ++ ...pi_custom_geo_collection_patch_document.py | 92 + .../models/json_api_dashboard_plugin_in.py | 112 ++ ...json_api_dashboard_plugin_in_attributes.py | 97 + .../json_api_dashboard_plugin_in_document.py | 92 + .../json_api_dashboard_plugin_linkage.py | 98 + .../models/json_api_dashboard_plugin_out.py | 124 ++ ...son_api_dashboard_plugin_out_attributes.py | 136 ++ .../json_api_dashboard_plugin_out_document.py | 108 ++ .../json_api_dashboard_plugin_out_list.py | 118 ++ ..._api_dashboard_plugin_out_relationships.py | 97 + ...son_api_dashboard_plugin_out_with_links.py | 130 ++ .../models/json_api_dashboard_plugin_patch.py | 112 ++ ...son_api_dashboard_plugin_patch_document.py | 92 + ...n_api_dashboard_plugin_post_optional_id.py | 115 ++ ...hboard_plugin_post_optional_id_document.py | 92 + .../json_api_data_source_identifier_out.py | 118 ++ ...i_data_source_identifier_out_attributes.py | 101 + ...api_data_source_identifier_out_document.py | 98 + ...son_api_data_source_identifier_out_list.py | 108 ++ ...son_api_data_source_identifier_out_meta.py | 99 + ...i_data_source_identifier_out_with_links.py | 124 ++ .../models/json_api_data_source_in.py | 112 ++ .../json_api_data_source_in_attributes.py | 207 +++ ...a_source_in_attributes_parameters_inner.py | 90 + .../json_api_data_source_in_document.py | 92 + .../models/json_api_data_source_out.py | 118 ++ .../json_api_data_source_out_attributes.py | 204 ++ .../json_api_data_source_out_document.py | 98 + .../models/json_api_data_source_out_list.py | 108 ++ .../json_api_data_source_out_with_links.py | 124 ++ .../models/json_api_data_source_patch.py | 112 ++ .../json_api_data_source_patch_attributes.py | 210 +++ .../json_api_data_source_patch_document.py | 92 + .../models/json_api_dataset_linkage.py | 98 + .../models/json_api_dataset_out.py | 124 ++ .../models/json_api_dataset_out_attributes.py | 157 ++ ..._api_dataset_out_attributes_grain_inner.py | 98 + ...t_attributes_reference_properties_inner.py | 119 ++ .../json_api_dataset_out_attributes_sql.py | 90 + ...tes_workspace_data_filter_columns_inner.py | 98 + ..._workspace_data_filter_references_inner.py | 104 ++ .../models/json_api_dataset_out_document.py | 108 ++ .../models/json_api_dataset_out_includes.py | 186 ++ .../models/json_api_dataset_out_list.py | 118 ++ .../json_api_dataset_out_relationships.py | 116 ++ ...aset_out_relationships_aggregated_facts.py | 96 + ...son_api_dataset_out_relationships_facts.py | 96 + ...ut_relationships_workspace_data_filters.py | 96 + .../models/json_api_dataset_out_with_links.py | 130 ++ .../models/json_api_dataset_patch.py | 112 ++ .../models/json_api_dataset_patch_document.py | 92 + .../models/json_api_dataset_to_one_linkage.py | 132 ++ .../models/json_api_entitlement_out.py | 112 ++ .../json_api_entitlement_out_attributes.py | 92 + .../json_api_entitlement_out_document.py | 98 + .../models/json_api_entitlement_out_list.py | 108 ++ .../json_api_entitlement_out_with_links.py | 118 ++ .../models/json_api_export_definition_in.py | 118 ++ ...son_api_export_definition_in_attributes.py | 101 + ...efinition_in_attributes_request_payload.py | 141 ++ .../json_api_export_definition_in_document.py | 92 + ..._api_export_definition_in_relationships.py | 98 + ...n_in_relationships_visualization_object.py | 97 + .../json_api_export_definition_linkage.py | 98 + .../models/json_api_export_definition_out.py | 124 ++ ...on_api_export_definition_out_attributes.py | 140 ++ ...json_api_export_definition_out_document.py | 108 ++ ...json_api_export_definition_out_includes.py | 171 ++ .../json_api_export_definition_out_list.py | 118 ++ ...api_export_definition_out_relationships.py | 115 ++ ...on_api_export_definition_out_with_links.py | 130 ++ .../json_api_export_definition_patch.py | 118 ++ ...on_api_export_definition_patch_document.py | 92 + ..._api_export_definition_post_optional_id.py | 121 ++ ...rt_definition_post_optional_id_document.py | 92 + .../models/json_api_export_template_in.py | 112 ++ .../json_api_export_template_in_attributes.py | 111 ++ ...in_attributes_dashboard_slides_template.py | 141 ++ ...te_in_attributes_widget_slides_template.py | 108 ++ .../json_api_export_template_in_document.py | 92 + .../models/json_api_export_template_out.py | 112 ++ .../json_api_export_template_out_document.py | 98 + .../json_api_export_template_out_list.py | 108 ++ ...json_api_export_template_out_with_links.py | 118 ++ .../models/json_api_export_template_patch.py | 112 ++ ...on_api_export_template_patch_attributes.py | 111 ++ ...json_api_export_template_patch_document.py | 92 + ...on_api_export_template_post_optional_id.py | 115 ++ ...port_template_post_optional_id_document.py | 92 + .../models/json_api_fact_linkage.py | 98 + .../models/json_api_fact_out.py | 124 ++ .../models/json_api_fact_out_attributes.py | 116 ++ .../models/json_api_fact_out_document.py | 108 ++ .../models/json_api_fact_out_list.py | 118 ++ .../models/json_api_fact_out_relationships.py | 92 + .../models/json_api_fact_out_with_links.py | 130 ++ .../models/json_api_fact_patch.py | 112 ++ .../models/json_api_fact_patch_document.py | 92 + .../models/json_api_fact_to_one_linkage.py | 132 ++ .../models/json_api_filter_context_in.py | 112 ++ .../json_api_filter_context_in_attributes.py | 97 + .../json_api_filter_context_in_document.py | 92 + .../models/json_api_filter_context_linkage.py | 98 + .../models/json_api_filter_context_out.py | 124 ++ .../json_api_filter_context_out_document.py | 108 ++ .../json_api_filter_context_out_includes.py | 156 ++ .../json_api_filter_context_out_list.py | 118 ++ ...on_api_filter_context_out_relationships.py | 104 ++ .../json_api_filter_context_out_with_links.py | 130 ++ .../models/json_api_filter_context_patch.py | 112 ++ ...son_api_filter_context_patch_attributes.py | 97 + .../json_api_filter_context_patch_document.py | 92 + ...son_api_filter_context_post_optional_id.py | 115 ++ ...ilter_context_post_optional_id_document.py | 92 + .../models/json_api_filter_view_in.py | 118 ++ .../json_api_filter_view_in_attributes.py | 99 + .../json_api_filter_view_in_document.py | 92 + .../json_api_filter_view_in_relationships.py | 98 + ...n_api_filter_view_in_relationships_user.py | 97 + .../models/json_api_filter_view_out.py | 118 ++ .../json_api_filter_view_out_document.py | 108 ++ .../json_api_filter_view_out_includes.py | 141 ++ .../models/json_api_filter_view_out_list.py | 118 ++ .../json_api_filter_view_out_with_links.py | 124 ++ .../models/json_api_filter_view_patch.py | 118 ++ .../json_api_filter_view_patch_attributes.py | 99 + .../json_api_filter_view_patch_document.py | 92 + .../models/json_api_identity_provider_in.py | 112 ++ ...son_api_identity_provider_in_attributes.py | 125 ++ .../json_api_identity_provider_in_document.py | 92 + .../json_api_identity_provider_linkage.py | 98 + .../models/json_api_identity_provider_out.py | 112 ++ ...on_api_identity_provider_out_attributes.py | 121 ++ ...json_api_identity_provider_out_document.py | 98 + .../json_api_identity_provider_out_list.py | 108 ++ ...on_api_identity_provider_out_with_links.py | 118 ++ .../json_api_identity_provider_patch.py | 112 ++ ...on_api_identity_provider_patch_document.py | 92 + ...on_api_identity_provider_to_one_linkage.py | 132 ++ .../models/json_api_jwk_in.py | 112 ++ .../models/json_api_jwk_in_attributes.py | 92 + .../json_api_jwk_in_attributes_content.py | 126 ++ .../models/json_api_jwk_in_document.py | 92 + .../models/json_api_jwk_out.py | 112 ++ .../models/json_api_jwk_out_document.py | 98 + .../models/json_api_jwk_out_list.py | 108 ++ .../models/json_api_jwk_out_with_links.py | 118 ++ .../models/json_api_jwk_patch.py | 112 ++ .../models/json_api_jwk_patch_document.py | 92 + .../json_api_knowledge_recommendation_in.py | 118 ++ ..._knowledge_recommendation_in_attributes.py | 152 ++ ...pi_knowledge_recommendation_in_document.py | 92 + ...owledge_recommendation_in_relationships.py | 98 + ..._recommendation_in_relationships_metric.py | 97 + .../json_api_knowledge_recommendation_out.py | 124 ++ ...knowledge_recommendation_out_attributes.py | 155 ++ ...i_knowledge_recommendation_out_document.py | 108 ++ ...i_knowledge_recommendation_out_includes.py | 141 ++ ...n_api_knowledge_recommendation_out_list.py | 118 ++ ...wledge_recommendation_out_relationships.py | 98 + ...knowledge_recommendation_out_with_links.py | 130 ++ ...json_api_knowledge_recommendation_patch.py | 118 ++ ...owledge_recommendation_patch_attributes.py | 158 ++ ...knowledge_recommendation_patch_document.py | 92 + ...owledge_recommendation_post_optional_id.py | 121 ++ ...ecommendation_post_optional_id_document.py | 92 + .../models/json_api_label_linkage.py | 98 + .../models/json_api_label_out.py | 124 ++ .../models/json_api_label_out_attributes.py | 149 ++ ...pi_label_out_attributes_geo_area_config.py | 92 + ...label_out_attributes_translations_inner.py | 90 + .../models/json_api_label_out_document.py | 108 ++ .../models/json_api_label_out_list.py | 118 ++ .../json_api_label_out_relationships.py | 92 + ...n_api_label_out_relationships_attribute.py | 97 + .../models/json_api_label_out_with_links.py | 130 ++ .../models/json_api_label_patch.py | 112 ++ .../models/json_api_label_patch_document.py | 92 + .../models/json_api_label_to_one_linkage.py | 132 ++ .../models/json_api_llm_endpoint_in.py | 112 ++ .../json_api_llm_endpoint_in_attributes.py | 120 ++ .../json_api_llm_endpoint_in_document.py | 92 + .../models/json_api_llm_endpoint_out.py | 112 ++ .../json_api_llm_endpoint_out_attributes.py | 118 ++ .../json_api_llm_endpoint_out_document.py | 98 + .../models/json_api_llm_endpoint_out_list.py | 108 ++ .../json_api_llm_endpoint_out_with_links.py | 118 ++ .../models/json_api_llm_endpoint_patch.py | 112 ++ .../json_api_llm_endpoint_patch_attributes.py | 120 ++ .../json_api_llm_endpoint_patch_document.py | 92 + .../models/json_api_llm_provider_in.py | 112 ++ .../json_api_llm_provider_in_attributes.py | 129 ++ ...llm_provider_in_attributes_models_inner.py | 99 + ..._provider_in_attributes_provider_config.py | 156 ++ .../json_api_llm_provider_in_document.py | 92 + .../models/json_api_llm_provider_out.py | 112 ++ .../json_api_llm_provider_out_document.py | 98 + .../models/json_api_llm_provider_out_list.py | 108 ++ .../json_api_llm_provider_out_with_links.py | 118 ++ .../models/json_api_llm_provider_patch.py | 112 ++ .../json_api_llm_provider_patch_attributes.py | 129 ++ .../json_api_llm_provider_patch_document.py | 92 + .../models/json_api_memory_item_in.py | 112 ++ .../json_api_memory_item_in_attributes.py | 111 ++ .../json_api_memory_item_in_document.py | 92 + .../models/json_api_memory_item_out.py | 124 ++ .../json_api_memory_item_out_attributes.py | 150 ++ .../json_api_memory_item_out_document.py | 108 ++ .../models/json_api_memory_item_out_list.py | 118 ++ .../json_api_memory_item_out_with_links.py | 130 ++ .../models/json_api_memory_item_patch.py | 112 ++ .../json_api_memory_item_patch_attributes.py | 114 ++ .../json_api_memory_item_patch_document.py | 92 + .../json_api_memory_item_post_optional_id.py | 115 ++ ...i_memory_item_post_optional_id_document.py | 92 + .../models/json_api_metric_in.py | 112 ++ .../models/json_api_metric_in_attributes.py | 105 ++ .../json_api_metric_in_attributes_content.py | 109 ++ .../models/json_api_metric_in_document.py | 92 + .../models/json_api_metric_linkage.py | 98 + .../models/json_api_metric_out.py | 124 ++ .../models/json_api_metric_out_attributes.py | 183 ++ .../models/json_api_metric_out_document.py | 108 ++ .../models/json_api_metric_out_includes.py | 201 ++ .../models/json_api_metric_out_list.py | 118 ++ .../json_api_metric_out_relationships.py | 132 ++ .../models/json_api_metric_out_with_links.py | 130 ++ .../models/json_api_metric_patch.py | 112 ++ .../json_api_metric_patch_attributes.py | 105 ++ .../models/json_api_metric_patch_document.py | 92 + .../json_api_metric_post_optional_id.py | 115 ++ ...on_api_metric_post_optional_id_document.py | 92 + .../models/json_api_metric_to_one_linkage.py | 132 ++ ...api_notification_channel_identifier_out.py | 112 ++ ...ation_channel_identifier_out_attributes.py | 127 ++ ...ication_channel_identifier_out_document.py | 98 + ...otification_channel_identifier_out_list.py | 108 ++ ...ation_channel_identifier_out_with_links.py | 118 ++ .../json_api_notification_channel_in.py | 112 ++ ..._api_notification_channel_in_attributes.py | 150 ++ ...ation_channel_in_attributes_destination.py | 171 ++ ...on_api_notification_channel_in_document.py | 92 + .../json_api_notification_channel_linkage.py | 98 + .../json_api_notification_channel_out.py | 112 ++ ...api_notification_channel_out_attributes.py | 168 ++ ...n_api_notification_channel_out_document.py | 98 + .../json_api_notification_channel_out_list.py | 108 ++ ...api_notification_channel_out_with_links.py | 118 ++ .../json_api_notification_channel_patch.py | 112 ++ ...api_notification_channel_patch_document.py | 92 + ...i_notification_channel_post_optional_id.py | 115 ++ ...ation_channel_post_optional_id_document.py | 92 + ...api_notification_channel_to_one_linkage.py | 132 ++ .../models/json_api_organization_in.py | 118 ++ .../json_api_organization_in_attributes.py | 112 ++ .../json_api_organization_in_document.py | 92 + .../json_api_organization_in_relationships.py | 92 + ...tion_in_relationships_identity_provider.py | 97 + .../models/json_api_organization_out.py | 124 ++ .../json_api_organization_out_attributes.py | 132 ++ ...anization_out_attributes_cache_settings.py | 102 + .../json_api_organization_out_document.py | 108 ++ .../json_api_organization_out_includes.py | 156 ++ .../models/json_api_organization_out_meta.py | 99 + ...json_api_organization_out_relationships.py | 104 ++ ..._out_relationships_bootstrap_user_group.py | 97 + .../models/json_api_organization_patch.py | 118 ++ .../json_api_organization_patch_document.py | 92 + .../json_api_organization_setting_in.py | 112 ++ ..._api_organization_setting_in_attributes.py | 101 + ...on_api_organization_setting_in_document.py | 92 + .../json_api_organization_setting_out.py | 112 ++ ...n_api_organization_setting_out_document.py | 98 + .../json_api_organization_setting_out_list.py | 108 ++ ...api_organization_setting_out_with_links.py | 118 ++ .../json_api_organization_setting_patch.py | 112 ++ ...api_organization_setting_patch_document.py | 92 + .../models/json_api_theme_in.py | 112 ++ .../models/json_api_theme_in_document.py | 92 + .../models/json_api_theme_out.py | 112 ++ .../models/json_api_theme_out_document.py | 98 + .../models/json_api_theme_out_list.py | 108 ++ .../models/json_api_theme_out_with_links.py | 118 ++ .../models/json_api_theme_patch.py | 112 ++ .../models/json_api_theme_patch_document.py | 92 + .../models/json_api_user_data_filter_in.py | 118 ++ ...json_api_user_data_filter_in_attributes.py | 97 + .../json_api_user_data_filter_in_document.py | 92 + ...n_api_user_data_filter_in_relationships.py | 98 + .../models/json_api_user_data_filter_out.py | 124 ++ .../json_api_user_data_filter_out_document.py | 108 ++ .../json_api_user_data_filter_out_includes.py | 216 +++ .../json_api_user_data_filter_out_list.py | 118 ++ ..._api_user_data_filter_out_relationships.py | 128 ++ ...son_api_user_data_filter_out_with_links.py | 130 ++ .../models/json_api_user_data_filter_patch.py | 118 ++ ...n_api_user_data_filter_patch_attributes.py | 97 + ...son_api_user_data_filter_patch_document.py | 92 + ...n_api_user_data_filter_post_optional_id.py | 121 ++ ...r_data_filter_post_optional_id_document.py | 92 + .../models/json_api_user_group_in.py | 118 ++ .../json_api_user_group_in_attributes.py | 89 + .../models/json_api_user_group_in_document.py | 92 + .../json_api_user_group_in_relationships.py | 92 + ...api_user_group_in_relationships_parents.py | 96 + .../models/json_api_user_group_linkage.py | 98 + .../models/json_api_user_group_out.py | 118 ++ .../json_api_user_group_out_document.py | 108 ++ .../models/json_api_user_group_out_list.py | 117 ++ .../json_api_user_group_out_with_links.py | 124 ++ .../models/json_api_user_group_patch.py | 118 ++ .../json_api_user_group_patch_document.py | 92 + .../json_api_user_group_to_one_linkage.py | 132 ++ .../json_api_user_identifier_linkage.py | 98 + .../models/json_api_user_identifier_out.py | 112 ++ ...json_api_user_identifier_out_attributes.py | 93 + .../json_api_user_identifier_out_document.py | 98 + .../json_api_user_identifier_out_list.py | 108 ++ ...json_api_user_identifier_out_with_links.py | 118 ++ ...json_api_user_identifier_to_one_linkage.py | 132 ++ .../models/json_api_user_in.py | 118 ++ .../models/json_api_user_in_attributes.py | 95 + .../models/json_api_user_in_document.py | 92 + .../models/json_api_user_in_relationships.py | 92 + .../models/json_api_user_linkage.py | 98 + .../models/json_api_user_out.py | 118 ++ .../models/json_api_user_out_document.py | 108 ++ .../models/json_api_user_out_list.py | 118 ++ .../models/json_api_user_out_with_links.py | 124 ++ .../models/json_api_user_patch.py | 118 ++ .../models/json_api_user_patch_document.py | 92 + .../models/json_api_user_setting_in.py | 112 ++ .../json_api_user_setting_in_document.py | 92 + .../models/json_api_user_setting_out.py | 112 ++ .../json_api_user_setting_out_document.py | 98 + .../models/json_api_user_setting_out_list.py | 108 ++ .../json_api_user_setting_out_with_links.py | 118 ++ .../models/json_api_user_to_one_linkage.py | 132 ++ .../json_api_visualization_object_in.py | 112 ++ ..._api_visualization_object_in_attributes.py | 99 + ...on_api_visualization_object_in_document.py | 92 + .../json_api_visualization_object_linkage.py | 98 + .../json_api_visualization_object_out.py | 124 ++ ...api_visualization_object_out_attributes.py | 177 ++ ...n_api_visualization_object_out_document.py | 108 ++ .../json_api_visualization_object_out_list.py | 118 ++ ...api_visualization_object_out_with_links.py | 130 ++ .../json_api_visualization_object_patch.py | 112 ++ ...i_visualization_object_patch_attributes.py | 99 + ...api_visualization_object_patch_document.py | 92 + ...i_visualization_object_post_optional_id.py | 115 ++ ...zation_object_post_optional_id_document.py | 92 + ...api_visualization_object_to_one_linkage.py | 132 ++ .../json_api_workspace_automation_out.py | 118 ++ ...api_workspace_automation_out_attributes.py | 221 +++ ...n_api_workspace_automation_out_includes.py | 216 +++ .../json_api_workspace_automation_out_list.py | 118 ++ ..._workspace_automation_out_relationships.py | 133 ++ ..._automation_out_relationships_workspace.py | 97 + ...api_workspace_automation_out_with_links.py | 124 ++ .../json_api_workspace_data_filter_in.py | 118 ++ ...api_workspace_data_filter_in_attributes.py | 93 + ...n_api_workspace_data_filter_in_document.py | 92 + ..._workspace_data_filter_in_relationships.py | 92 + ...filter_in_relationships_filter_settings.py | 96 + .../json_api_workspace_data_filter_linkage.py | 98 + .../json_api_workspace_data_filter_out.py | 124 ++ ..._api_workspace_data_filter_out_document.py | 108 ++ ...json_api_workspace_data_filter_out_list.py | 118 ++ ...pi_workspace_data_filter_out_with_links.py | 130 ++ .../json_api_workspace_data_filter_patch.py | 118 ++ ...pi_workspace_data_filter_patch_document.py | 92 + ...on_api_workspace_data_filter_setting_in.py | 118 ++ ...space_data_filter_setting_in_attributes.py | 93 + ...rkspace_data_filter_setting_in_document.py | 92 + ...ce_data_filter_setting_in_relationships.py | 92 + ..._in_relationships_workspace_data_filter.py | 97 + ...i_workspace_data_filter_setting_linkage.py | 98 + ...n_api_workspace_data_filter_setting_out.py | 124 ++ ...kspace_data_filter_setting_out_document.py | 108 ++ ..._workspace_data_filter_setting_out_list.py | 118 ++ ...pace_data_filter_setting_out_with_links.py | 130 ++ ...api_workspace_data_filter_setting_patch.py | 118 ++ ...pace_data_filter_setting_patch_document.py | 92 + ...pi_workspace_data_filter_to_one_linkage.py | 132 ++ .../models/json_api_workspace_in.py | 118 ++ .../json_api_workspace_in_attributes.py | 140 ++ ...api_workspace_in_attributes_data_source.py | 90 + .../models/json_api_workspace_in_document.py | 92 + .../json_api_workspace_in_relationships.py | 92 + .../models/json_api_workspace_linkage.py | 98 + .../models/json_api_workspace_out.py | 124 ++ .../models/json_api_workspace_out_document.py | 108 ++ .../models/json_api_workspace_out_list.py | 117 ++ .../models/json_api_workspace_out_meta.py | 117 ++ .../json_api_workspace_out_meta_config.py | 92 + .../json_api_workspace_out_meta_data_model.py | 88 + .../json_api_workspace_out_meta_hierarchy.py | 88 + .../json_api_workspace_out_with_links.py | 130 ++ .../models/json_api_workspace_patch.py | 118 ++ .../json_api_workspace_patch_document.py | 92 + .../models/json_api_workspace_setting_in.py | 112 ++ .../json_api_workspace_setting_in_document.py | 92 + .../models/json_api_workspace_setting_out.py | 118 ++ ...json_api_workspace_setting_out_document.py | 98 + .../json_api_workspace_setting_out_list.py | 108 ++ ...on_api_workspace_setting_out_with_links.py | 124 ++ .../json_api_workspace_setting_patch.py | 112 ++ ...on_api_workspace_setting_patch_document.py | 92 + ..._api_workspace_setting_post_optional_id.py | 115 ++ ...space_setting_post_optional_id_document.py | 92 + .../json_api_workspace_to_one_linkage.py | 132 ++ .../models/key_drivers_dimension.py | 133 ++ .../models/key_drivers_request.py | 114 ++ .../models/key_drivers_response.py | 102 + .../models/key_drivers_result.py | 88 + .../models/knowledge_document_metadata_dto.py | 106 ++ .../models/knowledge_search_result_dto.py | 104 ++ .../models/label_identifier.py | 106 ++ .../list_database_instances_response.py | 98 + .../list_knowledge_documents_response_dto.py | 100 + .../gooddata_api_client/models/list_links.py | 90 + .../models/list_services_response.py | 98 + .../gooddata_api_client/models/llm_model.py | 99 + .../models/llm_provider_auth.py | 88 + .../models/llm_provider_config.py | 156 ++ .../models/local_identifier.py | 103 ++ .../models/locale_request.py | 88 + ...age_dashboard_permissions_request_inner.py | 141 ++ .../models/match_attribute_filter.py | 92 + ...attribute_filter_match_attribute_filter.py | 112 ++ .../models/measure_definition.py | 171 ++ .../models/measure_execution_result_header.py | 92 + .../models/measure_group_headers.py | 96 + .../models/measure_header.py | 92 + .../models/measure_item.py | 102 + .../models/measure_item_definition.py | 201 ++ .../models/measure_result_header.py | 88 + .../models/measure_value_condition.py | 141 ++ .../models/measure_value_filter.py | 156 ++ .../models/memory_item_created_by_users.py | 98 + .../models/memory_item_user.py | 92 + .../gooddata_api_client/models/metric.py | 113 ++ .../models/metric_definition_override.py | 98 + .../models/metric_record.py | 90 + .../models/metric_value_change.py | 108 ++ .../models/model_test_result.py | 92 + .../models/negative_attribute_filter.py | 92 + ...ribute_filter_negative_attribute_filter.py | 102 + .../gooddata_api_client/models/note.py | 109 ++ .../gooddata_api_client/models/notes.py | 96 + .../models/notification.py | 103 ++ .../notification_channel_destination.py | 171 ++ .../models/notification_content.py | 111 ++ .../models/notification_data.py | 144 ++ .../models/notification_filter.py | 90 + .../models/notifications.py | 102 + .../models/notifications_meta.py | 92 + .../models/notifications_meta_total.py | 90 + .../models/object_links.py | 88 + .../models/object_links_container.py | 92 + .../models/open_ai_api_key_auth.py | 104 ++ .../models/open_ai_provider_auth.py | 126 ++ .../models/open_ai_provider_config.py | 117 ++ .../gooddata_api_client/models/operation.py | 124 ++ .../models/operation_error.py | 92 + .../organization_automation_identifier.py | 90 + ...tion_automation_management_bulk_request.py | 96 + .../organization_permission_assignment.py | 102 + .../models/outlier_detection_request.py | 146 ++ .../models/outlier_detection_response.py | 92 + .../models/outlier_detection_result.py | 100 + .../gooddata_api_client/models/over.py | 96 + .../models/page_metadata.py | 94 + .../gooddata_api_client/models/paging.py | 94 + .../gooddata_api_client/models/parameter.py | 90 + .../patch_knowledge_document_request_dto.py | 92 + .../models/pdf_table_style.py | 98 + .../models/pdf_table_style_property.py | 90 + .../models/pdm_ldm_request.py | 116 ++ .../gooddata_api_client/models/pdm_sql.py | 100 + .../models/pending_operation.py | 90 + .../models/permissions_assignment.py | 116 ++ .../models/permissions_for_assignee.py | 102 + .../models/permissions_for_assignee_rule.py | 102 + .../models/platform_usage.py | 98 + .../models/platform_usage_request.py | 96 + .../gooddata_api_client/models/pop_dataset.py | 94 + .../models/pop_dataset_measure_definition.py | 92 + ...sure_definition_previous_period_measure.py | 102 + .../gooddata_api_client/models/pop_date.py | 94 + .../models/pop_date_measure_definition.py | 92 + ..._measure_definition_over_period_measure.py | 102 + .../models/pop_measure_definition.py | 141 ++ .../models/positive_attribute_filter.py | 92 + ...ribute_filter_positive_attribute_filter.py | 102 + .../provision_database_instance_request.py | 90 + .../models/quality_issue.py | 112 ++ .../models/quality_issue_object.py | 94 + ...lity_issues_calculation_status_response.py | 108 ++ .../gooddata_api_client/models/range.py | 113 ++ .../models/range_condition.py | 92 + .../models/range_condition_range.py | 100 + .../models/range_measure_value_filter.py | 92 + ...value_filter_range_measure_value_filter.py | 121 ++ .../models/range_wrapper.py | 92 + .../models/ranking_filter.py | 92 + .../models/ranking_filter_ranking_filter.py | 121 ++ .../models/raw_custom_label.py | 88 + .../models/raw_custom_metric.py | 88 + .../models/raw_custom_override.py | 116 ++ .../models/raw_export_automation_request.py | 136 ++ .../models/raw_export_request.py | 129 ++ .../gooddata_api_client/models/reasoning.py | 98 + .../models/reasoning_step.py | 98 + .../models/reference_identifier.py | 106 ++ .../models/reference_source_column.py | 111 ++ .../gooddata_api_client/models/relative.py | 108 ++ .../models/relative_bounded_date_filter.py | 100 + .../models/relative_date_filter.py | 92 + ...lative_date_filter_relative_date_filter.py | 129 ++ .../models/relative_wrapper.py | 92 + .../models/resolve_settings_request.py | 88 + .../models/resolved_llm_endpoint.py | 90 + .../models/resolved_llm_endpoints.py | 96 + .../models/resolved_setting.py | 108 ++ .../models/rest_api_identifier.py | 98 + .../models/result_cache_metadata.py | 106 ++ .../models/result_dimension.py | 98 + .../models/result_dimension_header.py | 173 ++ .../gooddata_api_client/models/result_spec.py | 106 ++ .../models/route_result.py | 98 + .../models/rsa_specification.py | 134 ++ .../models/rule_permission.py | 98 + .../models/run_service_command_request.py | 100 + .../models/running_section.py | 100 + .../models/saved_visualization.py | 90 + .../models/scan_request.py | 98 + .../models/scan_result_pdm.py | 102 + .../models/scan_sql_request.py | 88 + .../models/scan_sql_response.py | 98 + .../models/search_knowledge_response_dto.py | 102 + .../models/search_relationship_object.py | 102 + .../models/search_request.py | 128 ++ .../models/search_result.py | 108 ++ .../models/search_result_object.py | 115 ++ .../models/search_statistics_dto.py | 90 + .../models/section_slide_template.py | 109 ++ .../models/service_info.py | 90 + .../models/set_certification_request.py | 123 ++ .../gooddata_api_client/models/settings.py | 147 ++ .../models/simple_measure_definition.py | 92 + .../simple_measure_definition_measure.py | 117 ++ .../gooddata_api_client/models/skeleton.py | 90 + .../models/slides_export_request.py | 119 ++ .../models/smart_function_response.py | 92 + .../gooddata_api_client/models/smtp.py | 119 ++ .../gooddata_api_client/models/sort_key.py | 156 ++ .../models/sort_key_attribute.py | 92 + .../models/sort_key_attribute_attribute.py | 114 ++ .../models/sort_key_total.py | 92 + .../models/sort_key_total_total.py | 107 ++ .../models/sort_key_value.py | 92 + .../models/sort_key_value_value.py | 105 ++ .../gooddata_api_client/models/sql_column.py | 100 + .../gooddata_api_client/models/sql_query.py | 88 + .../models/succeeded_operation.py | 92 + .../gooddata_api_client/models/suggestion.py | 90 + .../switch_identity_provider_request.py | 88 + .../gooddata_api_client/models/table.py | 88 + .../models/table_override.py | 98 + .../models/table_warning.py | 100 + .../models/tabular_export_request.py | 125 ++ .../models/test_definition_request.py | 124 ++ .../models/test_destination_request.py | 108 ++ .../test_llm_provider_definition_request.py | 102 + ...ider_definition_request_provider_config.py | 156 ++ .../models/test_llm_provider_response.py | 100 + .../models/test_notification.py | 90 + .../models/test_query_duration.py | 90 + .../models/test_request.py | 114 ++ .../models/test_response.py | 96 + .../gooddata_api_client/models/thought.py | 88 + .../gooddata_api_client/models/total.py | 110 ++ .../models/total_dimension.py | 98 + .../models/total_execution_result_header.py | 92 + .../models/total_result_header.py | 88 + .../models/trigger_automation_request.py | 92 + ...ger_quality_issues_calculation_response.py | 98 + .../upsert_knowledge_document_request_dto.py | 96 + .../upsert_knowledge_document_response_dto.py | 94 + .../models/user_assignee.py | 92 + .../models/user_context.py | 92 + .../models/user_group_assignee.py | 90 + .../models/user_group_identifier.py | 90 + .../models/user_group_permission.py | 100 + ...ement_data_source_permission_assignment.py | 102 + .../user_management_permission_assignments.py | 106 ++ .../user_management_user_group_member.py | 92 + .../user_management_user_group_members.py | 96 + .../models/user_management_user_groups.py | 98 + .../user_management_user_groups_item.py | 114 ++ .../models/user_management_users.py | 98 + .../models/user_management_users_item.py | 124 ++ ...agement_workspace_permission_assignment.py | 112 ++ .../models/user_permission.py | 102 + .../models/validate_by_item.py | 98 + .../validate_llm_endpoint_by_id_request.py | 96 + .../models/validate_llm_endpoint_request.py | 96 + .../models/validate_llm_endpoint_response.py | 90 + .../gooddata_api_client/models/value.py | 88 + .../models/visible_filter.py | 92 + .../models/visual_export_request.py | 92 + .../models/visualization_config.py | 110 ++ .../gooddata_api_client/models/webhook.py | 141 ++ .../models/webhook_automation_info.py | 96 + .../models/webhook_message.py | 105 ++ .../models/webhook_message_data.py | 179 ++ .../models/webhook_recipient.py | 90 + .../what_if_measure_adjustment_config.py | 92 + .../models/what_if_scenario_config.py | 98 + .../models/what_if_scenario_item.py | 98 + .../models/widget_slides_template.py | 108 ++ .../models/workspace_automation_identifier.py | 88 + ...pace_automation_management_bulk_request.py | 96 + .../models/workspace_data_source.py | 90 + .../models/workspace_identifier.py | 106 ++ .../models/workspace_permission_assignment.py | 118 ++ .../models/workspace_user.py | 92 + .../models/workspace_user_group.py | 90 + .../models/workspace_user_groups.py | 98 + .../models/workspace_users.py | 98 + .../gooddata_api_client/models/xliff.py | 106 ++ .../gooddata_api_client/py.typed | 0 gooddata-api-client/pyproject.toml | 22 + schemas/gooddata-api-client.json | 1486 +++++++++++++++ schemas/gooddata-result-client.json | 1514 +++++++++++++++ uv.lock | 8 +- 1424 files changed, 195685 insertions(+), 182 deletions(-) create mode 100644 gooddata-api-client/.github/workflows/python.yml create mode 100644 gooddata-api-client/docs/AacContainerWidgetAllOfDescription.md create mode 100644 gooddata-api-client/docs/AacContainerWidgetAllOfTitle.md create mode 100644 gooddata-api-client/docs/AacDashboardWithTabsAllOfPlugins.md create mode 100644 gooddata-api-client/docs/AacDashboardWithoutTabsAllOfPlugins.md create mode 100644 gooddata-api-client/docs/AacRichTextWidgetAllOfDescription.md create mode 100644 gooddata-api-client/docs/AacRichTextWidgetAllOfTitle.md create mode 100644 gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfAttributes.md create mode 100644 gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfColumns.md create mode 100644 gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfMetrics.md create mode 100644 gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfRows.md create mode 100644 gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfSegmentBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfSizeBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfStackBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfTrendBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfViewBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfAttributes.md create mode 100644 gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfColumns.md create mode 100644 gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfMetrics.md create mode 100644 gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfRows.md create mode 100644 gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfSegmentBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfSizeBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfStackBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfTrendBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfViewBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfAttributes.md create mode 100644 gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfColumns.md create mode 100644 gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfMetrics.md create mode 100644 gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfRows.md create mode 100644 gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfSegmentBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfSizeBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfStackBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfTrendBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfViewBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfAttributes.md create mode 100644 gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfColumns.md create mode 100644 gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfMetrics.md create mode 100644 gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfRows.md create mode 100644 gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfSegmentBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfSizeBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfStackBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfTrendBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfViewBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfAttributes.md create mode 100644 gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfColumns.md create mode 100644 gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfMetrics.md create mode 100644 gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfRows.md create mode 100644 gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfSegmentBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfSizeBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfStackBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfTrendBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfViewBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfAttributes.md create mode 100644 gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfColumns.md create mode 100644 gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfMetrics.md create mode 100644 gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfRows.md create mode 100644 gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfSegmentBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfSizeBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfStackBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfTrendBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfViewBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationSwitcherWidgetAllOfDescription.md create mode 100644 gooddata-api-client/docs/AacVisualizationSwitcherWidgetAllOfTitle.md create mode 100644 gooddata-api-client/docs/AacVisualizationTableBucketsAllOfAttributes.md create mode 100644 gooddata-api-client/docs/AacVisualizationTableBucketsAllOfColumns.md create mode 100644 gooddata-api-client/docs/AacVisualizationTableBucketsAllOfMetrics.md create mode 100644 gooddata-api-client/docs/AacVisualizationTableBucketsAllOfRows.md create mode 100644 gooddata-api-client/docs/AacVisualizationTableBucketsAllOfSegmentBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationTableBucketsAllOfSizeBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationTableBucketsAllOfStackBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationTableBucketsAllOfTrendBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationTableBucketsAllOfViewBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfAttributes.md create mode 100644 gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfColumns.md create mode 100644 gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfMetrics.md create mode 100644 gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfRows.md create mode 100644 gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfSegmentBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfSizeBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfStackBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfTrendBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfViewBy.md create mode 100644 gooddata-api-client/docs/AacVisualizationWidgetAllOfDescription.md create mode 100644 gooddata-api-client/docs/AacVisualizationWidgetAllOfTitle.md create mode 100644 gooddata-api-client/docs/AnalyticalDashboardControllerApi.md create mode 100644 gooddata-api-client/docs/AnalyzeCsvRequest.md create mode 100644 gooddata-api-client/docs/AnalyzeCsvRequestItem.md create mode 100644 gooddata-api-client/docs/AnalyzeCsvRequestItemConfig.md create mode 100644 gooddata-api-client/docs/AnalyzeCsvResponse.md create mode 100644 gooddata-api-client/docs/AnalyzeCsvResponseColumn.md create mode 100644 gooddata-api-client/docs/AnalyzeCsvResponseConfig.md create mode 100644 gooddata-api-client/docs/ApiTokenControllerApi.md create mode 100644 gooddata-api-client/docs/AttributeControllerApi.md create mode 100644 gooddata-api-client/docs/AttributeHierarchyControllerApi.md create mode 100644 gooddata-api-client/docs/AutomationControllerApi.md create mode 100644 gooddata-api-client/docs/CacheRemovalInterval.md create mode 100644 gooddata-api-client/docs/CacheUsageApi.md create mode 100644 gooddata-api-client/docs/CacheUsageData.md create mode 100644 gooddata-api-client/docs/ConvertGeoFileRequest.md create mode 100644 gooddata-api-client/docs/ConvertGeoFileResponse.md create mode 100644 gooddata-api-client/docs/CookieSecurityConfigurationControllerApi.md create mode 100644 gooddata-api-client/docs/CsvConvertOptions.md create mode 100644 gooddata-api-client/docs/CsvConvertOptionsColumnType.md create mode 100644 gooddata-api-client/docs/CsvManifestBody.md create mode 100644 gooddata-api-client/docs/CsvParseOptions.md create mode 100644 gooddata-api-client/docs/CsvReadOptions.md create mode 100644 gooddata-api-client/docs/CustomApplicationSettingControllerApi.md create mode 100644 gooddata-api-client/docs/CustomGeoCollectionControllerApi.md create mode 100644 gooddata-api-client/docs/DashboardContext.md create mode 100644 gooddata-api-client/docs/DashboardContextWidgetsInner.md create mode 100644 gooddata-api-client/docs/DashboardPluginControllerApi.md create mode 100644 gooddata-api-client/docs/DataSourceControllerApi.md create mode 100644 gooddata-api-client/docs/DataSourceFilesAnalysisApi.md create mode 100644 gooddata-api-client/docs/DataSourceFilesDeletionApi.md create mode 100644 gooddata-api-client/docs/DataSourceFilesImportApi.md create mode 100644 gooddata-api-client/docs/DataSourceFilesListingApi.md create mode 100644 gooddata-api-client/docs/DataSourceFilesManifestReadApi.md create mode 100644 gooddata-api-client/docs/DataSourceStagingLocationApi.md create mode 100644 gooddata-api-client/docs/DatasetControllerApi.md create mode 100644 gooddata-api-client/docs/DeleteFilesRequest.md create mode 100644 gooddata-api-client/docs/ExportDefinitionControllerApi.md create mode 100644 gooddata-api-client/docs/FactControllerApi.md create mode 100644 gooddata-api-client/docs/FilterContextControllerApi.md create mode 100644 gooddata-api-client/docs/FilterViewControllerApi.md create mode 100644 gooddata-api-client/docs/GdStorageFile.md create mode 100644 gooddata-api-client/docs/GeoJsonFeature.md create mode 100644 gooddata-api-client/docs/GeoJsonFeatureCollection.md create mode 100644 gooddata-api-client/docs/GeoJsonGeometry.md create mode 100644 gooddata-api-client/docs/GetServiceStatusResponse.md create mode 100644 gooddata-api-client/docs/ImportCsvRequest.md create mode 100644 gooddata-api-client/docs/ImportCsvRequestTable.md create mode 100644 gooddata-api-client/docs/ImportCsvRequestTableSource.md create mode 100644 gooddata-api-client/docs/ImportCsvRequestTableSourceConfig.md create mode 100644 gooddata-api-client/docs/ImportCsvResponse.md create mode 100644 gooddata-api-client/docs/ImportGeoCollectionRequest.md create mode 100644 gooddata-api-client/docs/ImportGeoCollectionResponse.md create mode 100644 gooddata-api-client/docs/InsightWidgetDescriptor.md create mode 100644 gooddata-api-client/docs/InsightWidgetDescriptorAllOf.md create mode 100644 gooddata-api-client/docs/JwkControllerApi.md create mode 100644 gooddata-api-client/docs/LabelControllerApi.md create mode 100644 gooddata-api-client/docs/ListLlmProviderModelsRequest.md create mode 100644 gooddata-api-client/docs/ListLlmProviderModelsRequestProviderConfig.md create mode 100644 gooddata-api-client/docs/ListLlmProviderModelsResponse.md create mode 100644 gooddata-api-client/docs/MetricControllerApi.md create mode 100644 gooddata-api-client/docs/OGCAPIFeaturesApi.md create mode 100644 gooddata-api-client/docs/ObjectReference.md create mode 100644 gooddata-api-client/docs/ObjectReferenceGroup.md create mode 100644 gooddata-api-client/docs/OrganizationCacheSettings.md create mode 100644 gooddata-api-client/docs/OrganizationCacheUsage.md create mode 100644 gooddata-api-client/docs/OrganizationCurrentCacheUsage.md create mode 100644 gooddata-api-client/docs/OrganizationEntityControllerApi.md create mode 100644 gooddata-api-client/docs/ReadCsvFileManifestsRequest.md create mode 100644 gooddata-api-client/docs/ReadCsvFileManifestsRequestItem.md create mode 100644 gooddata-api-client/docs/ReadCsvFileManifestsResponse.md create mode 100644 gooddata-api-client/docs/RichTextWidgetDescriptor.md create mode 100644 gooddata-api-client/docs/RichTextWidgetDescriptorAllOf.md create mode 100644 gooddata-api-client/docs/TestLlmProviderByIdRequest.md create mode 100644 gooddata-api-client/docs/ToolCallEventResult.md create mode 100644 gooddata-api-client/docs/TrendingObjectItem.md create mode 100644 gooddata-api-client/docs/TrendingObjectsResult.md create mode 100644 gooddata-api-client/docs/UIContext.md create mode 100644 gooddata-api-client/docs/UploadFileResponse.md create mode 100644 gooddata-api-client/docs/UploadGeoCollectionFileResponse.md create mode 100644 gooddata-api-client/docs/UserDataFilterControllerApi.md create mode 100644 gooddata-api-client/docs/UserSettingControllerApi.md create mode 100644 gooddata-api-client/docs/VisualizationObjectControllerApi.md create mode 100644 gooddata-api-client/docs/VisualizationSwitcherWidgetDescriptor.md create mode 100644 gooddata-api-client/docs/VisualizationSwitcherWidgetDescriptorAllOf.md create mode 100644 gooddata-api-client/docs/WidgetDescriptor.md create mode 100644 gooddata-api-client/docs/WorkspaceCacheSettings.md create mode 100644 gooddata-api-client/docs/WorkspaceCacheUsage.md create mode 100644 gooddata-api-client/docs/WorkspaceCurrentCacheUsage.md create mode 100644 gooddata-api-client/docs/WorkspaceDataFilterControllerApi.md create mode 100644 gooddata-api-client/docs/WorkspaceDataFilterSettingControllerApi.md create mode 100644 gooddata-api-client/docs/WorkspaceSettingControllerApi.md create mode 100644 gooddata-api-client/gooddata_api_client/api/analytical_dashboard_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/api_token_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/attribute_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/attribute_hierarchy_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/automation_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/cache_usage_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/cookie_security_configuration_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/custom_application_setting_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/custom_geo_collection_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/dashboard_plugin_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/data_source_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/data_source_files_analysis_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/data_source_files_deletion_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/data_source_files_import_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/data_source_files_listing_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/data_source_files_manifest_read_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/data_source_staging_location_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/dataset_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/export_definition_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/fact_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/filter_context_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/filter_view_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/jwk_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/label_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/metric_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/ogcapi_features_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/organization_entity_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/user_data_filter_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/user_setting_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/visualization_object_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/workspace_data_filter_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/workspace_data_filter_setting_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api/workspace_setting_controller_api.py create mode 100644 gooddata-api-client/gooddata_api_client/api_response.py create mode 100644 gooddata-api-client/gooddata_api_client/model/analyze_csv_request.py create mode 100644 gooddata-api-client/gooddata_api_client/model/analyze_csv_request_item.py create mode 100644 gooddata-api-client/gooddata_api_client/model/analyze_csv_request_item_config.py create mode 100644 gooddata-api-client/gooddata_api_client/model/analyze_csv_response.py create mode 100644 gooddata-api-client/gooddata_api_client/model/analyze_csv_response_column.py create mode 100644 gooddata-api-client/gooddata_api_client/model/analyze_csv_response_config.py create mode 100644 gooddata-api-client/gooddata_api_client/model/cache_removal_interval.py create mode 100644 gooddata-api-client/gooddata_api_client/model/cache_usage_data.py create mode 100644 gooddata-api-client/gooddata_api_client/model/convert_geo_file_request.py create mode 100644 gooddata-api-client/gooddata_api_client/model/convert_geo_file_response.py create mode 100644 gooddata-api-client/gooddata_api_client/model/csv_convert_options.py create mode 100644 gooddata-api-client/gooddata_api_client/model/csv_convert_options_column_type.py create mode 100644 gooddata-api-client/gooddata_api_client/model/csv_manifest_body.py create mode 100644 gooddata-api-client/gooddata_api_client/model/csv_parse_options.py create mode 100644 gooddata-api-client/gooddata_api_client/model/csv_read_options.py create mode 100644 gooddata-api-client/gooddata_api_client/model/dashboard_context.py create mode 100644 gooddata-api-client/gooddata_api_client/model/dashboard_context_widgets_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/model/delete_files_request.py create mode 100644 gooddata-api-client/gooddata_api_client/model/gd_storage_file.py create mode 100644 gooddata-api-client/gooddata_api_client/model/geo_json_feature.py create mode 100644 gooddata-api-client/gooddata_api_client/model/geo_json_feature_collection.py create mode 100644 gooddata-api-client/gooddata_api_client/model/geo_json_geometry.py create mode 100644 gooddata-api-client/gooddata_api_client/model/get_service_status_response.py create mode 100644 gooddata-api-client/gooddata_api_client/model/import_csv_request.py create mode 100644 gooddata-api-client/gooddata_api_client/model/import_csv_request_table.py create mode 100644 gooddata-api-client/gooddata_api_client/model/import_csv_request_table_source.py create mode 100644 gooddata-api-client/gooddata_api_client/model/import_csv_request_table_source_config.py create mode 100644 gooddata-api-client/gooddata_api_client/model/import_csv_response.py create mode 100644 gooddata-api-client/gooddata_api_client/model/import_geo_collection_request.py create mode 100644 gooddata-api-client/gooddata_api_client/model/import_geo_collection_response.py create mode 100644 gooddata-api-client/gooddata_api_client/model/insight_widget_descriptor.py create mode 100644 gooddata-api-client/gooddata_api_client/model/insight_widget_descriptor_all_of.py create mode 100644 gooddata-api-client/gooddata_api_client/model/list_llm_provider_models_request.py create mode 100644 gooddata-api-client/gooddata_api_client/model/list_llm_provider_models_request_provider_config.py create mode 100644 gooddata-api-client/gooddata_api_client/model/list_llm_provider_models_response.py create mode 100644 gooddata-api-client/gooddata_api_client/model/object_reference.py create mode 100644 gooddata-api-client/gooddata_api_client/model/object_reference_group.py create mode 100644 gooddata-api-client/gooddata_api_client/model/organization_cache_settings.py create mode 100644 gooddata-api-client/gooddata_api_client/model/organization_cache_usage.py create mode 100644 gooddata-api-client/gooddata_api_client/model/organization_current_cache_usage.py create mode 100644 gooddata-api-client/gooddata_api_client/model/read_csv_file_manifests_request.py create mode 100644 gooddata-api-client/gooddata_api_client/model/read_csv_file_manifests_request_item.py create mode 100644 gooddata-api-client/gooddata_api_client/model/read_csv_file_manifests_response.py create mode 100644 gooddata-api-client/gooddata_api_client/model/rich_text_widget_descriptor.py create mode 100644 gooddata-api-client/gooddata_api_client/model/rich_text_widget_descriptor_all_of.py create mode 100644 gooddata-api-client/gooddata_api_client/model/test_llm_provider_by_id_request.py create mode 100644 gooddata-api-client/gooddata_api_client/model/tool_call_event_result.py create mode 100644 gooddata-api-client/gooddata_api_client/model/trending_object_item.py create mode 100644 gooddata-api-client/gooddata_api_client/model/trending_objects_result.py create mode 100644 gooddata-api-client/gooddata_api_client/model/ui_context.py create mode 100644 gooddata-api-client/gooddata_api_client/model/upload_file_response.py create mode 100644 gooddata-api-client/gooddata_api_client/model/upload_geo_collection_file_response.py create mode 100644 gooddata-api-client/gooddata_api_client/model/visualization_switcher_widget_descriptor.py create mode 100644 gooddata-api-client/gooddata_api_client/model/visualization_switcher_widget_descriptor_all_of.py create mode 100644 gooddata-api-client/gooddata_api_client/model/widget_descriptor.py create mode 100644 gooddata-api-client/gooddata_api_client/model/workspace_cache_settings.py create mode 100644 gooddata-api-client/gooddata_api_client/model/workspace_cache_usage.py create mode 100644 gooddata-api-client/gooddata_api_client/model/workspace_current_cache_usage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_analytics_model.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_attribute_hierarchy.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_container_widget.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_dashboard.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_dashboard_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_dashboard_filter_from.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_dashboard_permissions.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_dashboard_plugin_link.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_dashboard_with_tabs.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_dashboard_without_tabs.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_dataset.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_dataset_primary_key.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_date_dataset.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_field.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_filter_state.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_geo_area_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_geo_collection_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_label.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_label_translation.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_logical_model.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_metric.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_permission.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_plugin.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_query.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_query_fields_value.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_query_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_reference.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_reference_source.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_rich_text_widget.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_section.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_tab.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_visualization.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_visualization_basic_buckets.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_visualization_bubble_buckets.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_visualization_dependency_buckets.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_visualization_geo_buckets.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_visualization_layer.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_visualization_scatter_buckets.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_visualization_stacked_buckets.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_visualization_switcher_widget.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_visualization_table_buckets.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_visualization_trend_buckets.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_visualization_widget.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_widget.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_widget_size.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aac_workspace_data_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/absolute_date_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/absolute_date_filter_absolute_date_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/abstract_measure_value_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/active_object_identification.py create mode 100644 gooddata-api-client/gooddata_api_client/models/ad_hoc_automation.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_cancel_tokens.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_execution.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_execution_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_filters_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_local_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_object_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_object_identifier_attribute.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_object_identifier_attribute_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_object_identifier_core.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_object_identifier_core_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_object_identifier_dataset.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_object_identifier_dataset_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_object_identifier_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_object_identifier_label.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_object_identifier_label_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_valid_descendants_query.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_valid_descendants_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_valid_objects_query.py create mode 100644 gooddata-api-client/gooddata_api_client/models/afm_valid_objects_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/alert_afm.py create mode 100644 gooddata-api-client/gooddata_api_client/models/alert_condition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/alert_condition_operand.py create mode 100644 gooddata-api-client/gooddata_api_client/models/alert_description.py create mode 100644 gooddata-api-client/gooddata_api_client/models/alert_evaluation_row.py create mode 100644 gooddata-api-client/gooddata_api_client/models/all_time_date_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/all_time_date_filter_all_time_date_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/allowed_relationship_type.py create mode 100644 gooddata-api-client/gooddata_api_client/models/analytics_catalog_created_by.py create mode 100644 gooddata-api-client/gooddata_api_client/models/analytics_catalog_tags.py create mode 100644 gooddata-api-client/gooddata_api_client/models/analytics_catalog_user.py create mode 100644 gooddata-api-client/gooddata_api_client/models/anomaly_detection.py create mode 100644 gooddata-api-client/gooddata_api_client/models/anomaly_detection_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/anomaly_detection_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/anomaly_detection_result.py create mode 100644 gooddata-api-client/gooddata_api_client/models/anomaly_detection_wrapper.py create mode 100644 gooddata-api-client/gooddata_api_client/models/api_entitlement.py create mode 100644 gooddata-api-client/gooddata_api_client/models/arithmetic_measure.py create mode 100644 gooddata-api-client/gooddata_api_client/models/arithmetic_measure_definition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/arithmetic_measure_definition_arithmetic_measure.py create mode 100644 gooddata-api-client/gooddata_api_client/models/assignee_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/assignee_rule.py create mode 100644 gooddata-api-client/gooddata_api_client/models/attribute_elements.py create mode 100644 gooddata-api-client/gooddata_api_client/models/attribute_elements_by_ref.py create mode 100644 gooddata-api-client/gooddata_api_client/models/attribute_elements_by_value.py create mode 100644 gooddata-api-client/gooddata_api_client/models/attribute_execution_result_header.py create mode 100644 gooddata-api-client/gooddata_api_client/models/attribute_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/attribute_filter_by_date.py create mode 100644 gooddata-api-client/gooddata_api_client/models/attribute_filter_elements.py create mode 100644 gooddata-api-client/gooddata_api_client/models/attribute_filter_parent.py create mode 100644 gooddata-api-client/gooddata_api_client/models/attribute_format.py create mode 100644 gooddata-api-client/gooddata_api_client/models/attribute_header.py create mode 100644 gooddata-api-client/gooddata_api_client/models/attribute_header_attribute_header.py create mode 100644 gooddata-api-client/gooddata_api_client/models/attribute_item.py create mode 100644 gooddata-api-client/gooddata_api_client/models/attribute_negative_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/attribute_positive_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/attribute_result_header.py create mode 100644 gooddata-api-client/gooddata_api_client/models/automation_alert.py create mode 100644 gooddata-api-client/gooddata_api_client/models/automation_alert_condition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/automation_dashboard_tabular_export.py create mode 100644 gooddata-api-client/gooddata_api_client/models/automation_external_recipient.py create mode 100644 gooddata-api-client/gooddata_api_client/models/automation_image_export.py create mode 100644 gooddata-api-client/gooddata_api_client/models/automation_metadata.py create mode 100644 gooddata-api-client/gooddata_api_client/models/automation_notification.py create mode 100644 gooddata-api-client/gooddata_api_client/models/automation_raw_export.py create mode 100644 gooddata-api-client/gooddata_api_client/models/automation_schedule.py create mode 100644 gooddata-api-client/gooddata_api_client/models/automation_slides_export.py create mode 100644 gooddata-api-client/gooddata_api_client/models/automation_tabular_export.py create mode 100644 gooddata-api-client/gooddata_api_client/models/automation_visual_export.py create mode 100644 gooddata-api-client/gooddata_api_client/models/available_assignees.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aws_bedrock_access_key_auth.py create mode 100644 gooddata-api-client/gooddata_api_client/models/aws_bedrock_provider_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/azure_foundry_api_key_auth.py create mode 100644 gooddata-api-client/gooddata_api_client/models/azure_foundry_provider_auth.py create mode 100644 gooddata-api-client/gooddata_api_client/models/azure_foundry_provider_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/bedrock_provider_auth.py create mode 100644 gooddata-api-client/gooddata_api_client/models/bounded_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/change_analysis_params.py create mode 100644 gooddata-api-client/gooddata_api_client/models/change_analysis_params_filters_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/change_analysis_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/change_analysis_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/change_analysis_result.py create mode 100644 gooddata-api-client/gooddata_api_client/models/chat_history_interaction.py create mode 100644 gooddata-api-client/gooddata_api_client/models/chat_history_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/chat_history_result.py create mode 100644 gooddata-api-client/gooddata_api_client/models/chat_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/chat_result.py create mode 100644 gooddata-api-client/gooddata_api_client/models/chat_usage_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/clustering_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/clustering_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/clustering_result.py create mode 100644 gooddata-api-client/gooddata_api_client/models/column_override.py create mode 100644 gooddata-api-client/gooddata_api_client/models/column_statistic.py create mode 100644 gooddata-api-client/gooddata_api_client/models/column_statistic_warning.py create mode 100644 gooddata-api-client/gooddata_api_client/models/column_statistics_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/column_statistics_request_from.py create mode 100644 gooddata-api-client/gooddata_api_client/models/column_statistics_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/column_warning.py create mode 100644 gooddata-api-client/gooddata_api_client/models/comparison.py create mode 100644 gooddata-api-client/gooddata_api_client/models/comparison_condition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/comparison_condition_comparison.py create mode 100644 gooddata-api-client/gooddata_api_client/models/comparison_measure_value_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/comparison_measure_value_filter_comparison_measure_value_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/comparison_wrapper.py create mode 100644 gooddata-api-client/gooddata_api_client/models/compound_measure_value_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/compound_measure_value_filter_compound_measure_value_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/content_slide_template.py create mode 100644 gooddata-api-client/gooddata_api_client/models/cover_slide_template.py create mode 100644 gooddata-api-client/gooddata_api_client/models/create_knowledge_document_request_dto.py create mode 100644 gooddata-api-client/gooddata_api_client/models/create_knowledge_document_response_dto.py create mode 100644 gooddata-api-client/gooddata_api_client/models/created_visualization.py create mode 100644 gooddata-api-client/gooddata_api_client/models/created_visualization_filters_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/created_visualizations.py create mode 100644 gooddata-api-client/gooddata_api_client/models/custom_label.py create mode 100644 gooddata-api-client/gooddata_api_client/models/custom_metric.py create mode 100644 gooddata-api-client/gooddata_api_client/models/custom_override.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dashboard_attribute_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dashboard_attribute_filter_attribute_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dashboard_date_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dashboard_date_filter_date_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dashboard_export_settings.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dashboard_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dashboard_permissions.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dashboard_permissions_assignment.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dashboard_slides_template.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dashboard_tabular_export_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dashboard_tabular_export_request_v2.py create mode 100644 gooddata-api-client/gooddata_api_client/models/data_column_locator.py create mode 100644 gooddata-api-client/gooddata_api_client/models/data_column_locators.py create mode 100644 gooddata-api-client/gooddata_api_client/models/data_source_parameter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/data_source_permission_assignment.py create mode 100644 gooddata-api-client/gooddata_api_client/models/data_source_schemata.py create mode 100644 gooddata-api-client/gooddata_api_client/models/data_source_table_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/database_instance.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dataset_grain.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dataset_reference_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dataset_workspace_data_filter_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/date_absolute_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/date_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/date_relative_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/date_value.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_aggregated_fact.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_extension.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permission_assignment.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permission_for_assignee.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permission_for_assignee_rule.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permissions_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_analytics.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_analytics_layer.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_attribute.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_attribute_hierarchy.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_automation.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_color_palette.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_column.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_csp_directive.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_custom_application_setting.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_custom_geo_collection.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_custom_geo_collections.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_dashboard_plugin.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_data_source.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_data_source_permission.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_data_source_permissions.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_data_sources.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_dataset.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_dataset_extension.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_dataset_sql.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_date_dataset.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_export_definition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_export_definition_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_export_definition_request_payload.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_export_template.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_export_templates.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_fact.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_filter_context.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_filter_view.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_identity_provider.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_identity_provider_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_jwk.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_jwk_specification.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_label.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_label_translation.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_ldm.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_memory_item.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_metric.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_model.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_notification_channel.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_notification_channel_destination.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_notification_channel_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_notification_channels.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_organization.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_organization_info.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_organization_permission.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_reference.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_reference_source.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_rsa_specification.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_setting.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_single_workspace_permission.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_source_fact_reference.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_table.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_tables.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_theme.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_user.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_user_data_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_user_data_filters.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_user_group.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_user_group_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_user_group_permission.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_user_group_permissions.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_user_groups.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_user_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_user_permission.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_user_permissions.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_users.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_users_user_groups.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_visualization_object.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_workspace.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter_column.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter_references.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter_setting.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filters.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_workspace_hierarchy_permission.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_workspace_model.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_workspace_permissions.py create mode 100644 gooddata-api-client/gooddata_api_client/models/declarative_workspaces.py create mode 100644 gooddata-api-client/gooddata_api_client/models/default_smtp.py create mode 100644 gooddata-api-client/gooddata_api_client/models/delete_knowledge_document_response_dto.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dependent_entities_graph.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dependent_entities_node.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dependent_entities_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dependent_entities_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/depends_on.py create mode 100644 gooddata-api-client/gooddata_api_client/models/depends_on_date_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dim_attribute.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dimension.py create mode 100644 gooddata-api-client/gooddata_api_client/models/dimension_header.py create mode 100644 gooddata-api-client/gooddata_api_client/models/element.py create mode 100644 gooddata-api-client/gooddata_api_client/models/elements_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/elements_request_depends_on_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/elements_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/entitlements_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/entity_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/entity_search_body.py create mode 100644 gooddata-api-client/gooddata_api_client/models/entity_search_page.py create mode 100644 gooddata-api-client/gooddata_api_client/models/entity_search_sort.py create mode 100644 gooddata-api-client/gooddata_api_client/models/execution_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/execution_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/execution_result.py create mode 100644 gooddata-api-client/gooddata_api_client/models/execution_result_data_source_message.py create mode 100644 gooddata-api-client/gooddata_api_client/models/execution_result_grand_total.py create mode 100644 gooddata-api-client/gooddata_api_client/models/execution_result_header.py create mode 100644 gooddata-api-client/gooddata_api_client/models/execution_result_metadata.py create mode 100644 gooddata-api-client/gooddata_api_client/models/execution_result_paging.py create mode 100644 gooddata-api-client/gooddata_api_client/models/execution_settings.py create mode 100644 gooddata-api-client/gooddata_api_client/models/export_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/export_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/export_result.py create mode 100644 gooddata-api-client/gooddata_api_client/models/fact_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/failed_operation.py create mode 100644 gooddata-api-client/gooddata_api_client/models/file.py create mode 100644 gooddata-api-client/gooddata_api_client/models/filter_by.py create mode 100644 gooddata-api-client/gooddata_api_client/models/filter_definition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/filter_definition_for_simple_measure.py create mode 100644 gooddata-api-client/gooddata_api_client/models/forecast_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/forecast_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/forecast_result.py create mode 100644 gooddata-api-client/gooddata_api_client/models/found_objects.py create mode 100644 gooddata-api-client/gooddata_api_client/models/frequency.py create mode 100644 gooddata-api-client/gooddata_api_client/models/frequency_bucket.py create mode 100644 gooddata-api-client/gooddata_api_client/models/frequency_properties.py create mode 100644 gooddata-api-client/gooddata_api_client/models/generate_description_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/generate_description_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/generate_ldm_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/generate_title_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/generate_title_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/geo_area_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/geo_collection_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/get_ai_lake_operation200_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/get_image_export202_response_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/get_quality_issues_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/grain_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/granted_permission.py create mode 100644 gooddata-api-client/gooddata_api_client/models/granularities_formatting.py create mode 100644 gooddata-api-client/gooddata_api_client/models/header_group.py create mode 100644 gooddata-api-client/gooddata_api_client/models/hierarchy_object_identification.py create mode 100644 gooddata-api-client/gooddata_api_client/models/histogram.py create mode 100644 gooddata-api-client/gooddata_api_client/models/histogram_bucket.py create mode 100644 gooddata-api-client/gooddata_api_client/models/histogram_properties.py create mode 100644 gooddata-api-client/gooddata_api_client/models/identifier_duplications.py create mode 100644 gooddata-api-client/gooddata_api_client/models/identifier_ref.py create mode 100644 gooddata-api-client/gooddata_api_client/models/identifier_ref_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/image_export_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/in_platform.py create mode 100644 gooddata-api-client/gooddata_api_client/models/inline_filter_definition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/inline_filter_definition_inline.py create mode 100644 gooddata-api-client/gooddata_api_client/models/inline_measure_definition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/inline_measure_definition_inline.py create mode 100644 gooddata-api-client/gooddata_api_client/models/intro_slide_template.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_includes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_list_meta.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_meta.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_meta_origin.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_relationships_dataset.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_relationships_source_fact.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_includes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_meta.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_meta_access_info.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_analytical_dashboards.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_certified_by.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_dashboard_plugins.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_datasets.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_filter_contexts.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_labels.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_metrics.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_visualization_objects.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_post_optional_id.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_post_optional_id_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_to_one_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_api_token_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_api_token_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_api_token_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_includes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_relationships_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_includes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_relationships_attribute_hierarchies.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_relationships_default_view.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_attribute_to_one_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_alert.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_dashboard_tabular_exports_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_external_recipients_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_image_exports_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_metadata.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_raw_exports_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_schedule.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_slides_exports_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_tabular_exports_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_visual_exports_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_analytical_dashboard.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_export_definitions.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_notification_channel.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_recipients.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_out_includes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_out_relationships_automation_results.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_result_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_relationships_automation.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_automation_to_one_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_color_palette_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_color_palette_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_color_palette_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_color_palette_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_color_palette_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_color_palette_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_post_optional_id.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_post_optional_id_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_post_optional_id.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_post_optional_id_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_meta.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_in_attributes_parameters_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_data_source_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_grain_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_reference_properties_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_sql.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_workspace_data_filter_columns_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_workspace_data_filter_references_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_includes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships_aggregated_facts.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships_facts.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships_workspace_data_filters.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_dataset_to_one_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_attributes_request_payload.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_relationships_visualization_object.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_includes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_post_optional_id.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_definition_post_optional_id_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_template_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_attributes_dashboard_slides_template.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_attributes_widget_slides_template.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_template_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_template_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_template_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_template_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_template_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_template_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_template_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_template_post_optional_id.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_export_template_post_optional_id_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_fact_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_fact_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_fact_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_fact_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_fact_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_fact_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_fact_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_fact_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_fact_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_fact_to_one_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_context_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_context_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_context_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_context_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_includes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_context_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_context_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_context_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_context_post_optional_id.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_context_post_optional_id_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_relationships_user.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_includes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_view_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_view_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_filter_view_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_to_one_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_jwk_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_jwk_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_jwk_in_attributes_content.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_jwk_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_jwk_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_jwk_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_jwk_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_jwk_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_jwk_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_jwk_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_relationships_metric.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_includes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_post_optional_id.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_post_optional_id_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_label_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_label_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_label_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_label_out_attributes_geo_area_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_label_out_attributes_translations_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_label_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_label_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_label_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_label_out_relationships_attribute.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_label_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_label_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_label_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_label_to_one_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_attributes_models_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_attributes_provider_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_memory_item_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_memory_item_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_memory_item_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_memory_item_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_memory_item_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_memory_item_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_memory_item_post_optional_id.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_memory_item_post_optional_id_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_in_attributes_content.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_out_includes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_post_optional_id.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_post_optional_id_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_metric_to_one_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in_attributes_destination.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_post_optional_id.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_post_optional_id_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_to_one_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_in_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_in_relationships_identity_provider.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_out_attributes_cache_settings.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_out_includes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_out_meta.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_out_relationships_bootstrap_user_group.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_theme_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_theme_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_theme_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_theme_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_theme_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_theme_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_theme_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_theme_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_includes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_post_optional_id.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_post_optional_id_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_group_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_relationships_parents.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_group_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_group_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_group_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_group_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_group_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_group_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_group_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_group_to_one_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_to_one_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_in_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_setting_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_setting_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_user_to_one_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_patch_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_post_optional_id.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_post_optional_id_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_to_one_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_includes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_relationships_workspace.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_relationships_filter_settings.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_relationships_workspace_data_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_to_one_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_attributes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_attributes_data_source.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_relationships.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta_data_model.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta_hierarchy.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_in.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_in_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out_list.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out_with_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_patch.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_patch_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_post_optional_id.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_post_optional_id_document.py create mode 100644 gooddata-api-client/gooddata_api_client/models/json_api_workspace_to_one_linkage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/key_drivers_dimension.py create mode 100644 gooddata-api-client/gooddata_api_client/models/key_drivers_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/key_drivers_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/key_drivers_result.py create mode 100644 gooddata-api-client/gooddata_api_client/models/knowledge_document_metadata_dto.py create mode 100644 gooddata-api-client/gooddata_api_client/models/knowledge_search_result_dto.py create mode 100644 gooddata-api-client/gooddata_api_client/models/label_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/list_database_instances_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/list_knowledge_documents_response_dto.py create mode 100644 gooddata-api-client/gooddata_api_client/models/list_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/list_services_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/llm_model.py create mode 100644 gooddata-api-client/gooddata_api_client/models/llm_provider_auth.py create mode 100644 gooddata-api-client/gooddata_api_client/models/llm_provider_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/local_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/locale_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/manage_dashboard_permissions_request_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/models/match_attribute_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/match_attribute_filter_match_attribute_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/measure_definition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/measure_execution_result_header.py create mode 100644 gooddata-api-client/gooddata_api_client/models/measure_group_headers.py create mode 100644 gooddata-api-client/gooddata_api_client/models/measure_header.py create mode 100644 gooddata-api-client/gooddata_api_client/models/measure_item.py create mode 100644 gooddata-api-client/gooddata_api_client/models/measure_item_definition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/measure_result_header.py create mode 100644 gooddata-api-client/gooddata_api_client/models/measure_value_condition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/measure_value_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/memory_item_created_by_users.py create mode 100644 gooddata-api-client/gooddata_api_client/models/memory_item_user.py create mode 100644 gooddata-api-client/gooddata_api_client/models/metric.py create mode 100644 gooddata-api-client/gooddata_api_client/models/metric_definition_override.py create mode 100644 gooddata-api-client/gooddata_api_client/models/metric_record.py create mode 100644 gooddata-api-client/gooddata_api_client/models/metric_value_change.py create mode 100644 gooddata-api-client/gooddata_api_client/models/model_test_result.py create mode 100644 gooddata-api-client/gooddata_api_client/models/negative_attribute_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/negative_attribute_filter_negative_attribute_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/note.py create mode 100644 gooddata-api-client/gooddata_api_client/models/notes.py create mode 100644 gooddata-api-client/gooddata_api_client/models/notification.py create mode 100644 gooddata-api-client/gooddata_api_client/models/notification_channel_destination.py create mode 100644 gooddata-api-client/gooddata_api_client/models/notification_content.py create mode 100644 gooddata-api-client/gooddata_api_client/models/notification_data.py create mode 100644 gooddata-api-client/gooddata_api_client/models/notification_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/notifications.py create mode 100644 gooddata-api-client/gooddata_api_client/models/notifications_meta.py create mode 100644 gooddata-api-client/gooddata_api_client/models/notifications_meta_total.py create mode 100644 gooddata-api-client/gooddata_api_client/models/object_links.py create mode 100644 gooddata-api-client/gooddata_api_client/models/object_links_container.py create mode 100644 gooddata-api-client/gooddata_api_client/models/open_ai_api_key_auth.py create mode 100644 gooddata-api-client/gooddata_api_client/models/open_ai_provider_auth.py create mode 100644 gooddata-api-client/gooddata_api_client/models/open_ai_provider_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/operation.py create mode 100644 gooddata-api-client/gooddata_api_client/models/operation_error.py create mode 100644 gooddata-api-client/gooddata_api_client/models/organization_automation_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/organization_automation_management_bulk_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/organization_permission_assignment.py create mode 100644 gooddata-api-client/gooddata_api_client/models/outlier_detection_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/outlier_detection_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/outlier_detection_result.py create mode 100644 gooddata-api-client/gooddata_api_client/models/over.py create mode 100644 gooddata-api-client/gooddata_api_client/models/page_metadata.py create mode 100644 gooddata-api-client/gooddata_api_client/models/paging.py create mode 100644 gooddata-api-client/gooddata_api_client/models/parameter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/patch_knowledge_document_request_dto.py create mode 100644 gooddata-api-client/gooddata_api_client/models/pdf_table_style.py create mode 100644 gooddata-api-client/gooddata_api_client/models/pdf_table_style_property.py create mode 100644 gooddata-api-client/gooddata_api_client/models/pdm_ldm_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/pdm_sql.py create mode 100644 gooddata-api-client/gooddata_api_client/models/pending_operation.py create mode 100644 gooddata-api-client/gooddata_api_client/models/permissions_assignment.py create mode 100644 gooddata-api-client/gooddata_api_client/models/permissions_for_assignee.py create mode 100644 gooddata-api-client/gooddata_api_client/models/permissions_for_assignee_rule.py create mode 100644 gooddata-api-client/gooddata_api_client/models/platform_usage.py create mode 100644 gooddata-api-client/gooddata_api_client/models/platform_usage_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/pop_dataset.py create mode 100644 gooddata-api-client/gooddata_api_client/models/pop_dataset_measure_definition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/pop_dataset_measure_definition_previous_period_measure.py create mode 100644 gooddata-api-client/gooddata_api_client/models/pop_date.py create mode 100644 gooddata-api-client/gooddata_api_client/models/pop_date_measure_definition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/pop_date_measure_definition_over_period_measure.py create mode 100644 gooddata-api-client/gooddata_api_client/models/pop_measure_definition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/positive_attribute_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/positive_attribute_filter_positive_attribute_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/provision_database_instance_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/quality_issue.py create mode 100644 gooddata-api-client/gooddata_api_client/models/quality_issue_object.py create mode 100644 gooddata-api-client/gooddata_api_client/models/quality_issues_calculation_status_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/range.py create mode 100644 gooddata-api-client/gooddata_api_client/models/range_condition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/range_condition_range.py create mode 100644 gooddata-api-client/gooddata_api_client/models/range_measure_value_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/range_measure_value_filter_range_measure_value_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/range_wrapper.py create mode 100644 gooddata-api-client/gooddata_api_client/models/ranking_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/ranking_filter_ranking_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/raw_custom_label.py create mode 100644 gooddata-api-client/gooddata_api_client/models/raw_custom_metric.py create mode 100644 gooddata-api-client/gooddata_api_client/models/raw_custom_override.py create mode 100644 gooddata-api-client/gooddata_api_client/models/raw_export_automation_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/raw_export_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/reasoning.py create mode 100644 gooddata-api-client/gooddata_api_client/models/reasoning_step.py create mode 100644 gooddata-api-client/gooddata_api_client/models/reference_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/reference_source_column.py create mode 100644 gooddata-api-client/gooddata_api_client/models/relative.py create mode 100644 gooddata-api-client/gooddata_api_client/models/relative_bounded_date_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/relative_date_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/relative_date_filter_relative_date_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/relative_wrapper.py create mode 100644 gooddata-api-client/gooddata_api_client/models/resolve_settings_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/resolved_llm_endpoint.py create mode 100644 gooddata-api-client/gooddata_api_client/models/resolved_llm_endpoints.py create mode 100644 gooddata-api-client/gooddata_api_client/models/resolved_setting.py create mode 100644 gooddata-api-client/gooddata_api_client/models/rest_api_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/result_cache_metadata.py create mode 100644 gooddata-api-client/gooddata_api_client/models/result_dimension.py create mode 100644 gooddata-api-client/gooddata_api_client/models/result_dimension_header.py create mode 100644 gooddata-api-client/gooddata_api_client/models/result_spec.py create mode 100644 gooddata-api-client/gooddata_api_client/models/route_result.py create mode 100644 gooddata-api-client/gooddata_api_client/models/rsa_specification.py create mode 100644 gooddata-api-client/gooddata_api_client/models/rule_permission.py create mode 100644 gooddata-api-client/gooddata_api_client/models/run_service_command_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/running_section.py create mode 100644 gooddata-api-client/gooddata_api_client/models/saved_visualization.py create mode 100644 gooddata-api-client/gooddata_api_client/models/scan_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/scan_result_pdm.py create mode 100644 gooddata-api-client/gooddata_api_client/models/scan_sql_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/scan_sql_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/search_knowledge_response_dto.py create mode 100644 gooddata-api-client/gooddata_api_client/models/search_relationship_object.py create mode 100644 gooddata-api-client/gooddata_api_client/models/search_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/search_result.py create mode 100644 gooddata-api-client/gooddata_api_client/models/search_result_object.py create mode 100644 gooddata-api-client/gooddata_api_client/models/search_statistics_dto.py create mode 100644 gooddata-api-client/gooddata_api_client/models/section_slide_template.py create mode 100644 gooddata-api-client/gooddata_api_client/models/service_info.py create mode 100644 gooddata-api-client/gooddata_api_client/models/set_certification_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/settings.py create mode 100644 gooddata-api-client/gooddata_api_client/models/simple_measure_definition.py create mode 100644 gooddata-api-client/gooddata_api_client/models/simple_measure_definition_measure.py create mode 100644 gooddata-api-client/gooddata_api_client/models/skeleton.py create mode 100644 gooddata-api-client/gooddata_api_client/models/slides_export_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/smart_function_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/smtp.py create mode 100644 gooddata-api-client/gooddata_api_client/models/sort_key.py create mode 100644 gooddata-api-client/gooddata_api_client/models/sort_key_attribute.py create mode 100644 gooddata-api-client/gooddata_api_client/models/sort_key_attribute_attribute.py create mode 100644 gooddata-api-client/gooddata_api_client/models/sort_key_total.py create mode 100644 gooddata-api-client/gooddata_api_client/models/sort_key_total_total.py create mode 100644 gooddata-api-client/gooddata_api_client/models/sort_key_value.py create mode 100644 gooddata-api-client/gooddata_api_client/models/sort_key_value_value.py create mode 100644 gooddata-api-client/gooddata_api_client/models/sql_column.py create mode 100644 gooddata-api-client/gooddata_api_client/models/sql_query.py create mode 100644 gooddata-api-client/gooddata_api_client/models/succeeded_operation.py create mode 100644 gooddata-api-client/gooddata_api_client/models/suggestion.py create mode 100644 gooddata-api-client/gooddata_api_client/models/switch_identity_provider_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/table.py create mode 100644 gooddata-api-client/gooddata_api_client/models/table_override.py create mode 100644 gooddata-api-client/gooddata_api_client/models/table_warning.py create mode 100644 gooddata-api-client/gooddata_api_client/models/tabular_export_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/test_definition_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/test_destination_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/test_llm_provider_definition_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/test_llm_provider_definition_request_provider_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/test_llm_provider_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/test_notification.py create mode 100644 gooddata-api-client/gooddata_api_client/models/test_query_duration.py create mode 100644 gooddata-api-client/gooddata_api_client/models/test_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/test_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/thought.py create mode 100644 gooddata-api-client/gooddata_api_client/models/total.py create mode 100644 gooddata-api-client/gooddata_api_client/models/total_dimension.py create mode 100644 gooddata-api-client/gooddata_api_client/models/total_execution_result_header.py create mode 100644 gooddata-api-client/gooddata_api_client/models/total_result_header.py create mode 100644 gooddata-api-client/gooddata_api_client/models/trigger_automation_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/trigger_quality_issues_calculation_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/upsert_knowledge_document_request_dto.py create mode 100644 gooddata-api-client/gooddata_api_client/models/upsert_knowledge_document_response_dto.py create mode 100644 gooddata-api-client/gooddata_api_client/models/user_assignee.py create mode 100644 gooddata-api-client/gooddata_api_client/models/user_context.py create mode 100644 gooddata-api-client/gooddata_api_client/models/user_group_assignee.py create mode 100644 gooddata-api-client/gooddata_api_client/models/user_group_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/user_group_permission.py create mode 100644 gooddata-api-client/gooddata_api_client/models/user_management_data_source_permission_assignment.py create mode 100644 gooddata-api-client/gooddata_api_client/models/user_management_permission_assignments.py create mode 100644 gooddata-api-client/gooddata_api_client/models/user_management_user_group_member.py create mode 100644 gooddata-api-client/gooddata_api_client/models/user_management_user_group_members.py create mode 100644 gooddata-api-client/gooddata_api_client/models/user_management_user_groups.py create mode 100644 gooddata-api-client/gooddata_api_client/models/user_management_user_groups_item.py create mode 100644 gooddata-api-client/gooddata_api_client/models/user_management_users.py create mode 100644 gooddata-api-client/gooddata_api_client/models/user_management_users_item.py create mode 100644 gooddata-api-client/gooddata_api_client/models/user_management_workspace_permission_assignment.py create mode 100644 gooddata-api-client/gooddata_api_client/models/user_permission.py create mode 100644 gooddata-api-client/gooddata_api_client/models/validate_by_item.py create mode 100644 gooddata-api-client/gooddata_api_client/models/validate_llm_endpoint_by_id_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/validate_llm_endpoint_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/validate_llm_endpoint_response.py create mode 100644 gooddata-api-client/gooddata_api_client/models/value.py create mode 100644 gooddata-api-client/gooddata_api_client/models/visible_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/models/visual_export_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/visualization_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/webhook.py create mode 100644 gooddata-api-client/gooddata_api_client/models/webhook_automation_info.py create mode 100644 gooddata-api-client/gooddata_api_client/models/webhook_message.py create mode 100644 gooddata-api-client/gooddata_api_client/models/webhook_message_data.py create mode 100644 gooddata-api-client/gooddata_api_client/models/webhook_recipient.py create mode 100644 gooddata-api-client/gooddata_api_client/models/what_if_measure_adjustment_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/what_if_scenario_config.py create mode 100644 gooddata-api-client/gooddata_api_client/models/what_if_scenario_item.py create mode 100644 gooddata-api-client/gooddata_api_client/models/widget_slides_template.py create mode 100644 gooddata-api-client/gooddata_api_client/models/workspace_automation_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/workspace_automation_management_bulk_request.py create mode 100644 gooddata-api-client/gooddata_api_client/models/workspace_data_source.py create mode 100644 gooddata-api-client/gooddata_api_client/models/workspace_identifier.py create mode 100644 gooddata-api-client/gooddata_api_client/models/workspace_permission_assignment.py create mode 100644 gooddata-api-client/gooddata_api_client/models/workspace_user.py create mode 100644 gooddata-api-client/gooddata_api_client/models/workspace_user_group.py create mode 100644 gooddata-api-client/gooddata_api_client/models/workspace_user_groups.py create mode 100644 gooddata-api-client/gooddata_api_client/models/workspace_users.py create mode 100644 gooddata-api-client/gooddata_api_client/models/xliff.py create mode 100644 gooddata-api-client/gooddata_api_client/py.typed create mode 100644 gooddata-api-client/pyproject.toml create mode 100644 schemas/gooddata-result-client.json diff --git a/Makefile b/Makefile index bbb2f2c6c..4a7d81a4f 100644 --- a/Makefile +++ b/Makefile @@ -66,6 +66,7 @@ download: $(call download_client,scan) $(call download_client,"export") $(call download_client,automation) + $(call download_client,result) .PHONY: type-check type-check: diff --git a/gooddata-api-client/.github/workflows/python.yml b/gooddata-api-client/.github/workflows/python.yml new file mode 100644 index 000000000..b6615b3eb --- /dev/null +++ b/gooddata-api-client/.github/workflows/python.yml @@ -0,0 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# +# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: gooddata_api_client Python package + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r test-requirements.txt + - name: Test with pytest + run: | + pytest --cov=gooddata_api_client diff --git a/gooddata-api-client/.openapi-generator/FILES b/gooddata-api-client/.openapi-generator/FILES index 07aa05f83..5a0352f58 100644 --- a/gooddata-api-client/.openapi-generator/FILES +++ b/gooddata-api-client/.openapi-generator/FILES @@ -91,6 +91,12 @@ docs/AnalyticsCatalogCreatedBy.md docs/AnalyticsCatalogTags.md docs/AnalyticsCatalogUser.md docs/AnalyticsModelApi.md +docs/AnalyzeCsvRequest.md +docs/AnalyzeCsvRequestItem.md +docs/AnalyzeCsvRequestItemConfig.md +docs/AnalyzeCsvResponse.md +docs/AnalyzeCsvResponseColumn.md +docs/AnalyzeCsvResponseConfig.md docs/AnomalyDetection.md docs/AnomalyDetectionConfig.md docs/AnomalyDetectionRequest.md @@ -150,6 +156,9 @@ docs/AzureFoundryProviderConfig.md docs/BedrockProviderAuth.md docs/BoundedFilter.md docs/CSPDirectivesApi.md +docs/CacheRemovalInterval.md +docs/CacheUsageApi.md +docs/CacheUsageData.md docs/CertificationApi.md docs/ChangeAnalysisParams.md docs/ChangeAnalysisParamsFiltersInner.md @@ -183,6 +192,8 @@ docs/CompoundMeasureValueFilter.md docs/CompoundMeasureValueFilterCompoundMeasureValueFilter.md docs/ComputationApi.md docs/ContentSlideTemplate.md +docs/ConvertGeoFileRequest.md +docs/ConvertGeoFileResponse.md docs/CookieSecurityConfigurationApi.md docs/CoverSlideTemplate.md docs/CreateKnowledgeDocumentRequestDto.md @@ -190,6 +201,11 @@ docs/CreateKnowledgeDocumentResponseDto.md docs/CreatedVisualization.md docs/CreatedVisualizationFiltersInner.md docs/CreatedVisualizations.md +docs/CsvConvertOptions.md +docs/CsvConvertOptionsColumnType.md +docs/CsvManifestBody.md +docs/CsvParseOptions.md +docs/CsvReadOptions.md docs/CustomLabel.md docs/CustomMetric.md docs/CustomOverride.md @@ -210,9 +226,15 @@ docs/DataColumnLocators.md docs/DataFiltersApi.md docs/DataSourceDeclarativeAPIsApi.md docs/DataSourceEntityAPIsApi.md +docs/DataSourceFilesAnalysisApi.md +docs/DataSourceFilesDeletionApi.md +docs/DataSourceFilesImportApi.md +docs/DataSourceFilesListingApi.md +docs/DataSourceFilesManifestReadApi.md docs/DataSourceParameter.md docs/DataSourcePermissionAssignment.md docs/DataSourceSchemata.md +docs/DataSourceStagingLocationApi.md docs/DataSourceTableIdentifier.md docs/DatabaseInstance.md docs/DatasetGrain.md @@ -315,6 +337,7 @@ docs/DeclarativeWorkspacePermissions.md docs/DeclarativeWorkspaces.md docs/DefaultSmtp.md docs/DefaultSmtpAllOf.md +docs/DeleteFilesRequest.md docs/DeleteKnowledgeDocumentResponseDto.md docs/DependencyGraphApi.md docs/DependentEntitiesGraph.md @@ -372,6 +395,7 @@ docs/FoundObjects.md docs/Frequency.md docs/FrequencyBucket.md docs/FrequencyProperties.md +docs/GdStorageFile.md docs/GenerateDescriptionRequest.md docs/GenerateDescriptionResponse.md docs/GenerateLdmRequest.md @@ -380,6 +404,9 @@ docs/GenerateTitleRequest.md docs/GenerateTitleResponse.md docs/GeoAreaConfig.md docs/GeoCollectionIdentifier.md +docs/GeoJsonFeature.md +docs/GeoJsonFeatureCollection.md +docs/GeoJsonGeometry.md docs/GeographicDataApi.md docs/GetAiLakeOperation200Response.md docs/GetImageExport202ResponseInner.md @@ -399,6 +426,13 @@ docs/IdentifierRefIdentifier.md docs/IdentityProvidersApi.md docs/ImageExportApi.md docs/ImageExportRequest.md +docs/ImportCsvRequest.md +docs/ImportCsvRequestTable.md +docs/ImportCsvRequestTableSource.md +docs/ImportCsvRequestTableSourceConfig.md +docs/ImportCsvResponse.md +docs/ImportGeoCollectionRequest.md +docs/ImportGeoCollectionResponse.md docs/InPlatform.md docs/InPlatformAllOf.md docs/InlineFilterDefinition.md @@ -1056,6 +1090,7 @@ docs/NotificationFilter.md docs/Notifications.md docs/NotificationsMeta.md docs/NotificationsMetaTotal.md +docs/OGCAPIFeaturesApi.md docs/ObjectLinks.md docs/ObjectLinksContainer.md docs/OpenAIProviderConfig.md @@ -1068,7 +1103,10 @@ docs/OptionsApi.md docs/OrganizationApi.md docs/OrganizationAutomationIdentifier.md docs/OrganizationAutomationManagementBulkRequest.md +docs/OrganizationCacheSettings.md +docs/OrganizationCacheUsage.md docs/OrganizationControllerApi.md +docs/OrganizationCurrentCacheUsage.md docs/OrganizationDeclarativeAPIsApi.md docs/OrganizationEntityAPIsApi.md docs/OrganizationModelControllerApi.md @@ -1121,6 +1159,9 @@ docs/RawCustomOverride.md docs/RawExportApi.md docs/RawExportAutomationRequest.md docs/RawExportRequest.md +docs/ReadCsvFileManifestsRequest.md +docs/ReadCsvFileManifestsRequestItem.md +docs/ReadCsvFileManifestsResponse.md docs/Reasoning.md docs/ReasoningStep.md docs/ReferenceIdentifier.md @@ -1209,6 +1250,8 @@ docs/TotalResultHeader.md docs/TranslationsApi.md docs/TriggerAutomationRequest.md docs/TriggerQualityIssuesCalculationResponse.md +docs/UploadFileResponse.md +docs/UploadGeoCollectionFileResponse.md docs/UpsertKnowledgeDocumentRequestDto.md docs/UpsertKnowledgeDocumentResponseDto.md docs/UsageApi.md @@ -1258,6 +1301,9 @@ docs/WhatIfScenarioItem.md docs/WidgetSlidesTemplate.md docs/WorkspaceAutomationIdentifier.md docs/WorkspaceAutomationManagementBulkRequest.md +docs/WorkspaceCacheSettings.md +docs/WorkspaceCacheUsage.md +docs/WorkspaceCurrentCacheUsage.md docs/WorkspaceDataSource.md docs/WorkspaceIdentifier.md docs/WorkspaceObjectControllerApi.md @@ -1286,6 +1332,7 @@ gooddata_api_client/api/attributes_api.py gooddata_api_client/api/automation_organization_view_controller_api.py gooddata_api_client/api/automations_api.py gooddata_api_client/api/available_drivers_api.py +gooddata_api_client/api/cache_usage_api.py gooddata_api_client/api/certification_api.py gooddata_api_client/api/computation_api.py gooddata_api_client/api/cookie_security_configuration_api.py @@ -1294,6 +1341,12 @@ gooddata_api_client/api/dashboards_api.py gooddata_api_client/api/data_filters_api.py gooddata_api_client/api/data_source_declarative_apis_api.py gooddata_api_client/api/data_source_entity_apis_api.py +gooddata_api_client/api/data_source_files_analysis_api.py +gooddata_api_client/api/data_source_files_deletion_api.py +gooddata_api_client/api/data_source_files_import_api.py +gooddata_api_client/api/data_source_files_listing_api.py +gooddata_api_client/api/data_source_files_manifest_read_api.py +gooddata_api_client/api/data_source_staging_location_api.py gooddata_api_client/api/datasets_api.py gooddata_api_client/api/dependency_graph_api.py gooddata_api_client/api/entities_api.py @@ -1320,6 +1373,7 @@ gooddata_api_client/api/metadata_check_api.py gooddata_api_client/api/metadata_sync_api.py gooddata_api_client/api/metrics_api.py gooddata_api_client/api/notification_channels_api.py +gooddata_api_client/api/ogcapi_features_api.py gooddata_api_client/api/options_api.py gooddata_api_client/api/organization_api.py gooddata_api_client/api/organization_controller_api.py @@ -1440,6 +1494,12 @@ gooddata_api_client/model/allowed_relationship_type.py gooddata_api_client/model/analytics_catalog_created_by.py gooddata_api_client/model/analytics_catalog_tags.py gooddata_api_client/model/analytics_catalog_user.py +gooddata_api_client/model/analyze_csv_request.py +gooddata_api_client/model/analyze_csv_request_item.py +gooddata_api_client/model/analyze_csv_request_item_config.py +gooddata_api_client/model/analyze_csv_response.py +gooddata_api_client/model/analyze_csv_response_column.py +gooddata_api_client/model/analyze_csv_response_config.py gooddata_api_client/model/anomaly_detection.py gooddata_api_client/model/anomaly_detection_config.py gooddata_api_client/model/anomaly_detection_request.py @@ -1492,6 +1552,8 @@ gooddata_api_client/model/azure_foundry_provider_auth.py gooddata_api_client/model/azure_foundry_provider_config.py gooddata_api_client/model/bedrock_provider_auth.py gooddata_api_client/model/bounded_filter.py +gooddata_api_client/model/cache_removal_interval.py +gooddata_api_client/model/cache_usage_data.py gooddata_api_client/model/change_analysis_params.py gooddata_api_client/model/change_analysis_params_filters_inner.py gooddata_api_client/model/change_analysis_request.py @@ -1523,12 +1585,19 @@ gooddata_api_client/model/comparison_wrapper.py gooddata_api_client/model/compound_measure_value_filter.py gooddata_api_client/model/compound_measure_value_filter_compound_measure_value_filter.py gooddata_api_client/model/content_slide_template.py +gooddata_api_client/model/convert_geo_file_request.py +gooddata_api_client/model/convert_geo_file_response.py gooddata_api_client/model/cover_slide_template.py gooddata_api_client/model/create_knowledge_document_request_dto.py gooddata_api_client/model/create_knowledge_document_response_dto.py gooddata_api_client/model/created_visualization.py gooddata_api_client/model/created_visualization_filters_inner.py gooddata_api_client/model/created_visualizations.py +gooddata_api_client/model/csv_convert_options.py +gooddata_api_client/model/csv_convert_options_column_type.py +gooddata_api_client/model/csv_manifest_body.py +gooddata_api_client/model/csv_parse_options.py +gooddata_api_client/model/csv_read_options.py gooddata_api_client/model/custom_label.py gooddata_api_client/model/custom_metric.py gooddata_api_client/model/custom_override.py @@ -1649,6 +1718,7 @@ gooddata_api_client/model/declarative_workspace_permissions.py gooddata_api_client/model/declarative_workspaces.py gooddata_api_client/model/default_smtp.py gooddata_api_client/model/default_smtp_all_of.py +gooddata_api_client/model/delete_files_request.py gooddata_api_client/model/delete_knowledge_document_response_dto.py gooddata_api_client/model/dependent_entities_graph.py gooddata_api_client/model/dependent_entities_node.py @@ -1698,6 +1768,7 @@ gooddata_api_client/model/found_objects.py gooddata_api_client/model/frequency.py gooddata_api_client/model/frequency_bucket.py gooddata_api_client/model/frequency_properties.py +gooddata_api_client/model/gd_storage_file.py gooddata_api_client/model/generate_description_request.py gooddata_api_client/model/generate_description_response.py gooddata_api_client/model/generate_ldm_request.py @@ -1705,6 +1776,9 @@ gooddata_api_client/model/generate_title_request.py gooddata_api_client/model/generate_title_response.py gooddata_api_client/model/geo_area_config.py gooddata_api_client/model/geo_collection_identifier.py +gooddata_api_client/model/geo_json_feature.py +gooddata_api_client/model/geo_json_feature_collection.py +gooddata_api_client/model/geo_json_geometry.py gooddata_api_client/model/get_ai_lake_operation200_response.py gooddata_api_client/model/get_image_export202_response_inner.py gooddata_api_client/model/get_quality_issues_response.py @@ -1720,6 +1794,13 @@ gooddata_api_client/model/identifier_duplications.py gooddata_api_client/model/identifier_ref.py gooddata_api_client/model/identifier_ref_identifier.py gooddata_api_client/model/image_export_request.py +gooddata_api_client/model/import_csv_request.py +gooddata_api_client/model/import_csv_request_table.py +gooddata_api_client/model/import_csv_request_table_source.py +gooddata_api_client/model/import_csv_request_table_source_config.py +gooddata_api_client/model/import_csv_response.py +gooddata_api_client/model/import_geo_collection_request.py +gooddata_api_client/model/import_geo_collection_response.py gooddata_api_client/model/in_platform.py gooddata_api_client/model/in_platform_all_of.py gooddata_api_client/model/inline_filter_definition.py @@ -2375,6 +2456,9 @@ gooddata_api_client/model/operation.py gooddata_api_client/model/operation_error.py gooddata_api_client/model/organization_automation_identifier.py gooddata_api_client/model/organization_automation_management_bulk_request.py +gooddata_api_client/model/organization_cache_settings.py +gooddata_api_client/model/organization_cache_usage.py +gooddata_api_client/model/organization_current_cache_usage.py gooddata_api_client/model/organization_permission_assignment.py gooddata_api_client/model/outlier_detection_request.py gooddata_api_client/model/outlier_detection_response.py @@ -2421,6 +2505,9 @@ gooddata_api_client/model/raw_custom_metric.py gooddata_api_client/model/raw_custom_override.py gooddata_api_client/model/raw_export_automation_request.py gooddata_api_client/model/raw_export_request.py +gooddata_api_client/model/read_csv_file_manifests_request.py +gooddata_api_client/model/read_csv_file_manifests_request_item.py +gooddata_api_client/model/read_csv_file_manifests_response.py gooddata_api_client/model/reasoning.py gooddata_api_client/model/reasoning_step.py gooddata_api_client/model/reference_identifier.py @@ -2502,6 +2589,8 @@ gooddata_api_client/model/total_execution_result_header.py gooddata_api_client/model/total_result_header.py gooddata_api_client/model/trigger_automation_request.py gooddata_api_client/model/trigger_quality_issues_calculation_response.py +gooddata_api_client/model/upload_file_response.py +gooddata_api_client/model/upload_geo_collection_file_response.py gooddata_api_client/model/upsert_knowledge_document_request_dto.py gooddata_api_client/model/upsert_knowledge_document_response_dto.py gooddata_api_client/model/user_assignee.py @@ -2539,6 +2628,9 @@ gooddata_api_client/model/what_if_scenario_item.py gooddata_api_client/model/widget_slides_template.py gooddata_api_client/model/workspace_automation_identifier.py gooddata_api_client/model/workspace_automation_management_bulk_request.py +gooddata_api_client/model/workspace_cache_settings.py +gooddata_api_client/model/workspace_cache_usage.py +gooddata_api_client/model/workspace_current_cache_usage.py gooddata_api_client/model/workspace_data_source.py gooddata_api_client/model/workspace_identifier.py gooddata_api_client/model/workspace_permission_assignment.py diff --git a/gooddata-api-client/README.md b/gooddata-api-client/README.md index 097ee2f03..faf0f09a1 100644 --- a/gooddata-api-client/README.md +++ b/gooddata-api-client/README.md @@ -170,6 +170,7 @@ Class | Method | HTTP request | Description *CSPDirectivesApi* | [**get_entity_csp_directives**](docs/CSPDirectivesApi.md#get_entity_csp_directives) | **GET** /api/v1/entities/cspDirectives/{id} | Get CSP Directives *CSPDirectivesApi* | [**patch_entity_csp_directives**](docs/CSPDirectivesApi.md#patch_entity_csp_directives) | **PATCH** /api/v1/entities/cspDirectives/{id} | Patch CSP Directives *CSPDirectivesApi* | [**update_entity_csp_directives**](docs/CSPDirectivesApi.md#update_entity_csp_directives) | **PUT** /api/v1/entities/cspDirectives/{id} | Put CSP Directives +*CacheUsageApi* | [**collect_cache_usage**](docs/CacheUsageApi.md#collect_cache_usage) | **GET** /api/v1/actions/collectCacheUsage | Collect data about the current cache usage *CertificationApi* | [**set_certification**](docs/CertificationApi.md#set_certification) | **POST** /api/v1/actions/workspaces/{workspaceId}/setCertification | Set Certification *ComputationApi* | [**cancel_executions**](docs/ComputationApi.md#cancel_executions) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/afm/cancel | Applies all the given cancel tokens. *ComputationApi* | [**change_analysis**](docs/ComputationApi.md#change_analysis) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/computeChangeAnalysis | Compute change analysis @@ -229,6 +230,12 @@ Class | Method | HTTP request | Description *DataSourceEntityAPIsApi* | [**get_entity_data_sources**](docs/DataSourceEntityAPIsApi.md#get_entity_data_sources) | **GET** /api/v1/entities/dataSources/{id} | Get Data Source entity *DataSourceEntityAPIsApi* | [**patch_entity_data_sources**](docs/DataSourceEntityAPIsApi.md#patch_entity_data_sources) | **PATCH** /api/v1/entities/dataSources/{id} | Patch Data Source entity *DataSourceEntityAPIsApi* | [**update_entity_data_sources**](docs/DataSourceEntityAPIsApi.md#update_entity_data_sources) | **PUT** /api/v1/entities/dataSources/{id} | Put Data Source entity +*DataSourceFilesAnalysisApi* | [**analyze_csv**](docs/DataSourceFilesAnalysisApi.md#analyze_csv) | **POST** /api/v1/actions/fileStorage/staging/analyzeCsv | Analyze CSV +*DataSourceFilesDeletionApi* | [**delete_files**](docs/DataSourceFilesDeletionApi.md#delete_files) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/deleteFiles | Delete datasource files +*DataSourceFilesImportApi* | [**import_csv**](docs/DataSourceFilesImportApi.md#import_csv) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/importCsv | Import CSV +*DataSourceFilesListingApi* | [**list_files**](docs/DataSourceFilesListingApi.md#list_files) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/listFiles | List datasource files +*DataSourceFilesManifestReadApi* | [**read_csv_file_manifests**](docs/DataSourceFilesManifestReadApi.md#read_csv_file_manifests) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/readCsvFileManifests | Read CSV file manifests +*DataSourceStagingLocationApi* | [**staging_upload**](docs/DataSourceStagingLocationApi.md#staging_upload) | **POST** /api/v1/actions/fileStorage/staging/upload | Upload a file to the staging area *DatasetsApi* | [**get_all_entities_datasets**](docs/DatasetsApi.md#get_all_entities_datasets) | **GET** /api/v1/entities/workspaces/{workspaceId}/datasets | Get all Datasets *DatasetsApi* | [**get_entity_datasets**](docs/DatasetsApi.md#get_entity_datasets) | **GET** /api/v1/entities/workspaces/{workspaceId}/datasets/{objectId} | Get a Dataset *DatasetsApi* | [**patch_entity_datasets**](docs/DatasetsApi.md#patch_entity_datasets) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/datasets/{objectId} | Patch a Dataset (beta) @@ -353,6 +360,8 @@ Class | Method | HTTP request | Description *NotificationChannelsApi* | [**test_existing_notification_channel**](docs/NotificationChannelsApi.md#test_existing_notification_channel) | **POST** /api/v1/actions/notificationChannels/{notificationChannelId}/test | Test existing notification channel. *NotificationChannelsApi* | [**test_notification_channel**](docs/NotificationChannelsApi.md#test_notification_channel) | **POST** /api/v1/actions/notificationChannels/test | Test notification channel. *NotificationChannelsApi* | [**update_entity_notification_channels**](docs/NotificationChannelsApi.md#update_entity_notification_channels) | **PUT** /api/v1/entities/notificationChannels/{id} | Put Notification Channel entity +*OGCAPIFeaturesApi* | [**get_collection_items**](docs/OGCAPIFeaturesApi.md#get_collection_items) | **GET** /api/v1/location/collections/{collectionId}/items | Get collection features +*OGCAPIFeaturesApi* | [**get_custom_collection_items**](docs/OGCAPIFeaturesApi.md#get_custom_collection_items) | **GET** /api/v1/location/custom/collections/{collectionId}/items | Get custom collection features *OptionsApi* | [**get_all_options**](docs/OptionsApi.md#get_all_options) | **GET** /api/v1/options | Links for all configuration options *OrganizationApi* | [**switch_active_identity_provider**](docs/OrganizationApi.md#switch_active_identity_provider) | **POST** /api/v1/actions/organization/switchActiveIdentityProvider | Switch Active Identity Provider *OrganizationDeclarativeAPIsApi* | [**get_custom_geo_collections_layout**](docs/OrganizationDeclarativeAPIsApi.md#get_custom_geo_collections_layout) | **GET** /api/v1/layout/customGeoCollections | Get all custom geo collections layout @@ -522,6 +531,7 @@ Class | Method | HTTP request | Description *ActionsApi* | [**ai_chat_usage**](docs/ActionsApi.md#ai_chat_usage) | **GET** /api/v1/actions/workspaces/{workspaceId}/ai/chatUsage | Get Chat Usage *ActionsApi* | [**ai_search**](docs/ActionsApi.md#ai_search) | **POST** /api/v1/actions/workspaces/{workspaceId}/ai/search | (BETA) Semantic Search in Metadata *ActionsApi* | [**all_platform_usage**](docs/ActionsApi.md#all_platform_usage) | **GET** /api/v1/actions/collectUsage | Info about the platform usage. +*ActionsApi* | [**analyze_csv**](docs/ActionsApi.md#analyze_csv) | **POST** /api/v1/actions/fileStorage/staging/analyzeCsv | Analyze CSV *ActionsApi* | [**anomaly_detection**](docs/ActionsApi.md#anomaly_detection) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/functions/anomalyDetection/{resultId} | (EXPERIMENTAL) Smart functions - Anomaly Detection *ActionsApi* | [**anomaly_detection_result**](docs/ActionsApi.md#anomaly_detection_result) | **GET** /api/v1/actions/workspaces/{workspaceId}/execution/functions/anomalyDetection/result/{resultId} | (EXPERIMENTAL) Smart functions - Anomaly Detection Result *ActionsApi* | [**available_assignees**](docs/ActionsApi.md#available_assignees) | **GET** /api/v1/actions/workspaces/{workspaceId}/analyticalDashboards/{dashboardId}/availableAssignees | Get Available Assignees @@ -532,11 +542,13 @@ Class | Method | HTTP request | Description *ActionsApi* | [**clean_translations**](docs/ActionsApi.md#clean_translations) | **POST** /api/v1/actions/workspaces/{workspaceId}/translations/clean | Cleans up translations. *ActionsApi* | [**clustering**](docs/ActionsApi.md#clustering) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/functions/clustering/{resultId} | (EXPERIMENTAL) Smart functions - Clustering *ActionsApi* | [**clustering_result**](docs/ActionsApi.md#clustering_result) | **GET** /api/v1/actions/workspaces/{workspaceId}/execution/functions/clustering/result/{resultId} | (EXPERIMENTAL) Smart functions - Clustering Result +*ActionsApi* | [**collect_cache_usage**](docs/ActionsApi.md#collect_cache_usage) | **GET** /api/v1/actions/collectCacheUsage | Collect data about the current cache usage *ActionsApi* | [**column_statistics**](docs/ActionsApi.md#column_statistics) | **POST** /api/v1/actions/dataSources/{dataSourceId}/computeColumnStatistics | (EXPERIMENTAL) Compute column statistics *ActionsApi* | [**compute_label_elements_post**](docs/ActionsApi.md#compute_label_elements_post) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/collectLabelElements | Listing of label values. The resulting data are limited by the static platform limit to the maximum of 10000 rows. *ActionsApi* | [**compute_report**](docs/ActionsApi.md#compute_report) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/afm/execute | Executes analytical request and returns link to the result *ActionsApi* | [**compute_valid_descendants**](docs/ActionsApi.md#compute_valid_descendants) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/afm/computeValidDescendants | (BETA) Valid descendants *ActionsApi* | [**compute_valid_objects**](docs/ActionsApi.md#compute_valid_objects) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/afm/computeValidObjects | Valid objects +*ActionsApi* | [**convert_geo_file**](docs/ActionsApi.md#convert_geo_file) | **POST** /api/v1/actions/customGeoCollection/convert | Convert a geo file to GeoParquet format *ActionsApi* | [**create_dashboard_export_request**](docs/ActionsApi.md#create_dashboard_export_request) | **POST** /api/v1/actions/workspaces/{workspaceId}/analyticalDashboards/{dashboardId}/export/tabular | (EXPERIMENTAL) Create dashboard tabular export request *ActionsApi* | [**create_document**](docs/ActionsApi.md#create_document) | **POST** /api/v1/actions/workspaces/{workspaceId}/ai/knowledge/documents | *ActionsApi* | [**create_image_export**](docs/ActionsApi.md#create_image_export) | **POST** /api/v1/actions/workspaces/{workspaceId}/export/image | (EXPERIMENTAL) Create image export request @@ -545,8 +557,10 @@ Class | Method | HTTP request | Description *ActionsApi* | [**create_slides_export**](docs/ActionsApi.md#create_slides_export) | **POST** /api/v1/actions/workspaces/{workspaceId}/export/slides | (EXPERIMENTAL) Create slides export request *ActionsApi* | [**create_tabular_export**](docs/ActionsApi.md#create_tabular_export) | **POST** /api/v1/actions/workspaces/{workspaceId}/export/tabular | Create tabular export request *ActionsApi* | [**created_by**](docs/ActionsApi.md#created_by) | **GET** /api/v1/actions/workspaces/{workspaceId}/ai/analyticsCatalog/createdBy | Get Analytics Catalog CreatedBy Users +*ActionsApi* | [**custom_geo_collection_staging_upload**](docs/ActionsApi.md#custom_geo_collection_staging_upload) | **POST** /api/v1/actions/customGeoCollection/staging/upload | Upload a geo collection file to the staging area *ActionsApi* | [**dashboard_permissions**](docs/ActionsApi.md#dashboard_permissions) | **GET** /api/v1/actions/workspaces/{workspaceId}/analyticalDashboards/{dashboardId}/permissions | Get Dashboard Permissions *ActionsApi* | [**delete_document**](docs/ActionsApi.md#delete_document) | **DELETE** /api/v1/actions/workspaces/{workspaceId}/ai/knowledge/documents/{filename} | +*ActionsApi* | [**delete_files**](docs/ActionsApi.md#delete_files) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/deleteFiles | Delete datasource files *ActionsApi* | [**delete_organization_automations**](docs/ActionsApi.md#delete_organization_automations) | **POST** /api/v1/actions/organization/automations/delete | Delete selected automations across all workspaces *ActionsApi* | [**delete_workspace_automations**](docs/ActionsApi.md#delete_workspace_automations) | **POST** /api/v1/actions/workspaces/{workspaceId}/automations/delete | Delete selected automations in the workspace *ActionsApi* | [**explain_afm**](docs/ActionsApi.md#explain_afm) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/afm/explain | AFM explain resource. @@ -572,11 +586,14 @@ Class | Method | HTTP request | Description *ActionsApi* | [**get_slides_export_metadata**](docs/ActionsApi.md#get_slides_export_metadata) | **GET** /api/v1/actions/workspaces/{workspaceId}/export/slides/{exportId}/metadata | (EXPERIMENTAL) Retrieve metadata context *ActionsApi* | [**get_tabular_export**](docs/ActionsApi.md#get_tabular_export) | **GET** /api/v1/actions/workspaces/{workspaceId}/export/tabular/{exportId} | Retrieve exported files *ActionsApi* | [**get_translation_tags**](docs/ActionsApi.md#get_translation_tags) | **GET** /api/v1/actions/workspaces/{workspaceId}/translations | Get translation tags. +*ActionsApi* | [**import_csv**](docs/ActionsApi.md#import_csv) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/importCsv | Import CSV +*ActionsApi* | [**import_custom_geo_collection**](docs/ActionsApi.md#import_custom_geo_collection) | **POST** /api/v1/actions/customGeoCollection/{collectionId}/import | Import custom geo collection *ActionsApi* | [**inherited_entity_conflicts**](docs/ActionsApi.md#inherited_entity_conflicts) | **GET** /api/v1/actions/workspaces/{workspaceId}/inheritedEntityConflicts | Finds identifier conflicts in workspace hierarchy. *ActionsApi* | [**inherited_entity_prefixes**](docs/ActionsApi.md#inherited_entity_prefixes) | **GET** /api/v1/actions/workspaces/{workspaceId}/inheritedEntityPrefixes | Get used entity prefixes in hierarchy *ActionsApi* | [**key_driver_analysis**](docs/ActionsApi.md#key_driver_analysis) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/computeKeyDrivers | (EXPERIMENTAL) Compute key driver analysis *ActionsApi* | [**key_driver_analysis_result**](docs/ActionsApi.md#key_driver_analysis_result) | **GET** /api/v1/actions/workspaces/{workspaceId}/execution/computeKeyDrivers/result/{resultId} | (EXPERIMENTAL) Get key driver analysis result *ActionsApi* | [**list_documents**](docs/ActionsApi.md#list_documents) | **GET** /api/v1/actions/workspaces/{workspaceId}/ai/knowledge/documents | +*ActionsApi* | [**list_files**](docs/ActionsApi.md#list_files) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/listFiles | List datasource files *ActionsApi* | [**list_workspace_user_groups**](docs/ActionsApi.md#list_workspace_user_groups) | **GET** /api/v1/actions/workspaces/{workspaceId}/userGroups | *ActionsApi* | [**list_workspace_users**](docs/ActionsApi.md#list_workspace_users) | **GET** /api/v1/actions/workspaces/{workspaceId}/users | *ActionsApi* | [**manage_dashboard_permissions**](docs/ActionsApi.md#manage_dashboard_permissions) | **POST** /api/v1/actions/workspaces/{workspaceId}/analyticalDashboards/{dashboardId}/managePermissions | Manage Permissions for a Dashboard @@ -596,6 +613,7 @@ Class | Method | HTTP request | Description *ActionsApi* | [**patch_document**](docs/ActionsApi.md#patch_document) | **PATCH** /api/v1/actions/workspaces/{workspaceId}/ai/knowledge/documents/{filename} | *ActionsApi* | [**pause_organization_automations**](docs/ActionsApi.md#pause_organization_automations) | **POST** /api/v1/actions/organization/automations/pause | Pause selected automations across all workspaces *ActionsApi* | [**pause_workspace_automations**](docs/ActionsApi.md#pause_workspace_automations) | **POST** /api/v1/actions/workspaces/{workspaceId}/automations/pause | Pause selected automations in the workspace +*ActionsApi* | [**read_csv_file_manifests**](docs/ActionsApi.md#read_csv_file_manifests) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/readCsvFileManifests | Read CSV file manifests *ActionsApi* | [**register_upload_notification**](docs/ActionsApi.md#register_upload_notification) | **POST** /api/v1/actions/dataSources/{dataSourceId}/uploadNotification | Register an upload notification *ActionsApi* | [**resolve_all_entitlements**](docs/ActionsApi.md#resolve_all_entitlements) | **GET** /api/v1/actions/resolveEntitlements | Values for all public entitlements. *ActionsApi* | [**resolve_all_settings_without_workspace**](docs/ActionsApi.md#resolve_all_settings_without_workspace) | **GET** /api/v1/actions/resolveSettings | Values for all settings without workspace. @@ -610,6 +628,7 @@ Class | Method | HTTP request | Description *ActionsApi* | [**search_knowledge**](docs/ActionsApi.md#search_knowledge) | **GET** /api/v1/actions/workspaces/{workspaceId}/ai/knowledge/search | *ActionsApi* | [**set_certification**](docs/ActionsApi.md#set_certification) | **POST** /api/v1/actions/workspaces/{workspaceId}/setCertification | Set Certification *ActionsApi* | [**set_translations**](docs/ActionsApi.md#set_translations) | **POST** /api/v1/actions/workspaces/{workspaceId}/translations/set | Set translations for entities. +*ActionsApi* | [**staging_upload**](docs/ActionsApi.md#staging_upload) | **POST** /api/v1/actions/fileStorage/staging/upload | Upload a file to the staging area *ActionsApi* | [**switch_active_identity_provider**](docs/ActionsApi.md#switch_active_identity_provider) | **POST** /api/v1/actions/organization/switchActiveIdentityProvider | Switch Active Identity Provider *ActionsApi* | [**tags**](docs/ActionsApi.md#tags) | **GET** /api/v1/actions/workspaces/{workspaceId}/ai/analyticsCatalog/tags | Get Analytics Catalog Tags *ActionsApi* | [**test_data_source**](docs/ActionsApi.md#test_data_source) | **POST** /api/v1/actions/dataSources/{dataSourceId}/test | Test data source connection by data source id @@ -1259,6 +1278,12 @@ Class | Method | HTTP request | Description - [AnalyticsCatalogCreatedBy](docs/AnalyticsCatalogCreatedBy.md) - [AnalyticsCatalogTags](docs/AnalyticsCatalogTags.md) - [AnalyticsCatalogUser](docs/AnalyticsCatalogUser.md) + - [AnalyzeCsvRequest](docs/AnalyzeCsvRequest.md) + - [AnalyzeCsvRequestItem](docs/AnalyzeCsvRequestItem.md) + - [AnalyzeCsvRequestItemConfig](docs/AnalyzeCsvRequestItemConfig.md) + - [AnalyzeCsvResponse](docs/AnalyzeCsvResponse.md) + - [AnalyzeCsvResponseColumn](docs/AnalyzeCsvResponseColumn.md) + - [AnalyzeCsvResponseConfig](docs/AnalyzeCsvResponseConfig.md) - [AnomalyDetection](docs/AnomalyDetection.md) - [AnomalyDetectionConfig](docs/AnomalyDetectionConfig.md) - [AnomalyDetectionRequest](docs/AnomalyDetectionRequest.md) @@ -1311,6 +1336,8 @@ Class | Method | HTTP request | Description - [AzureFoundryProviderConfig](docs/AzureFoundryProviderConfig.md) - [BedrockProviderAuth](docs/BedrockProviderAuth.md) - [BoundedFilter](docs/BoundedFilter.md) + - [CacheRemovalInterval](docs/CacheRemovalInterval.md) + - [CacheUsageData](docs/CacheUsageData.md) - [ChangeAnalysisParams](docs/ChangeAnalysisParams.md) - [ChangeAnalysisParamsFiltersInner](docs/ChangeAnalysisParamsFiltersInner.md) - [ChangeAnalysisRequest](docs/ChangeAnalysisRequest.md) @@ -1342,12 +1369,19 @@ Class | Method | HTTP request | Description - [CompoundMeasureValueFilter](docs/CompoundMeasureValueFilter.md) - [CompoundMeasureValueFilterCompoundMeasureValueFilter](docs/CompoundMeasureValueFilterCompoundMeasureValueFilter.md) - [ContentSlideTemplate](docs/ContentSlideTemplate.md) + - [ConvertGeoFileRequest](docs/ConvertGeoFileRequest.md) + - [ConvertGeoFileResponse](docs/ConvertGeoFileResponse.md) - [CoverSlideTemplate](docs/CoverSlideTemplate.md) - [CreateKnowledgeDocumentRequestDto](docs/CreateKnowledgeDocumentRequestDto.md) - [CreateKnowledgeDocumentResponseDto](docs/CreateKnowledgeDocumentResponseDto.md) - [CreatedVisualization](docs/CreatedVisualization.md) - [CreatedVisualizationFiltersInner](docs/CreatedVisualizationFiltersInner.md) - [CreatedVisualizations](docs/CreatedVisualizations.md) + - [CsvConvertOptions](docs/CsvConvertOptions.md) + - [CsvConvertOptionsColumnType](docs/CsvConvertOptionsColumnType.md) + - [CsvManifestBody](docs/CsvManifestBody.md) + - [CsvParseOptions](docs/CsvParseOptions.md) + - [CsvReadOptions](docs/CsvReadOptions.md) - [CustomLabel](docs/CustomLabel.md) - [CustomMetric](docs/CustomMetric.md) - [CustomOverride](docs/CustomOverride.md) @@ -1468,6 +1502,7 @@ Class | Method | HTTP request | Description - [DeclarativeWorkspaces](docs/DeclarativeWorkspaces.md) - [DefaultSmtp](docs/DefaultSmtp.md) - [DefaultSmtpAllOf](docs/DefaultSmtpAllOf.md) + - [DeleteFilesRequest](docs/DeleteFilesRequest.md) - [DeleteKnowledgeDocumentResponseDto](docs/DeleteKnowledgeDocumentResponseDto.md) - [DependentEntitiesGraph](docs/DependentEntitiesGraph.md) - [DependentEntitiesNode](docs/DependentEntitiesNode.md) @@ -1517,6 +1552,7 @@ Class | Method | HTTP request | Description - [Frequency](docs/Frequency.md) - [FrequencyBucket](docs/FrequencyBucket.md) - [FrequencyProperties](docs/FrequencyProperties.md) + - [GdStorageFile](docs/GdStorageFile.md) - [GenerateDescriptionRequest](docs/GenerateDescriptionRequest.md) - [GenerateDescriptionResponse](docs/GenerateDescriptionResponse.md) - [GenerateLdmRequest](docs/GenerateLdmRequest.md) @@ -1524,6 +1560,9 @@ Class | Method | HTTP request | Description - [GenerateTitleResponse](docs/GenerateTitleResponse.md) - [GeoAreaConfig](docs/GeoAreaConfig.md) - [GeoCollectionIdentifier](docs/GeoCollectionIdentifier.md) + - [GeoJsonFeature](docs/GeoJsonFeature.md) + - [GeoJsonFeatureCollection](docs/GeoJsonFeatureCollection.md) + - [GeoJsonGeometry](docs/GeoJsonGeometry.md) - [GetAiLakeOperation200Response](docs/GetAiLakeOperation200Response.md) - [GetImageExport202ResponseInner](docs/GetImageExport202ResponseInner.md) - [GetQualityIssuesResponse](docs/GetQualityIssuesResponse.md) @@ -1539,6 +1578,13 @@ Class | Method | HTTP request | Description - [IdentifierRef](docs/IdentifierRef.md) - [IdentifierRefIdentifier](docs/IdentifierRefIdentifier.md) - [ImageExportRequest](docs/ImageExportRequest.md) + - [ImportCsvRequest](docs/ImportCsvRequest.md) + - [ImportCsvRequestTable](docs/ImportCsvRequestTable.md) + - [ImportCsvRequestTableSource](docs/ImportCsvRequestTableSource.md) + - [ImportCsvRequestTableSourceConfig](docs/ImportCsvRequestTableSourceConfig.md) + - [ImportCsvResponse](docs/ImportCsvResponse.md) + - [ImportGeoCollectionRequest](docs/ImportGeoCollectionRequest.md) + - [ImportGeoCollectionResponse](docs/ImportGeoCollectionResponse.md) - [InPlatform](docs/InPlatform.md) - [InPlatformAllOf](docs/InPlatformAllOf.md) - [InlineFilterDefinition](docs/InlineFilterDefinition.md) @@ -2194,6 +2240,9 @@ Class | Method | HTTP request | Description - [OperationError](docs/OperationError.md) - [OrganizationAutomationIdentifier](docs/OrganizationAutomationIdentifier.md) - [OrganizationAutomationManagementBulkRequest](docs/OrganizationAutomationManagementBulkRequest.md) + - [OrganizationCacheSettings](docs/OrganizationCacheSettings.md) + - [OrganizationCacheUsage](docs/OrganizationCacheUsage.md) + - [OrganizationCurrentCacheUsage](docs/OrganizationCurrentCacheUsage.md) - [OrganizationPermissionAssignment](docs/OrganizationPermissionAssignment.md) - [OutlierDetectionRequest](docs/OutlierDetectionRequest.md) - [OutlierDetectionResponse](docs/OutlierDetectionResponse.md) @@ -2240,6 +2289,9 @@ Class | Method | HTTP request | Description - [RawCustomOverride](docs/RawCustomOverride.md) - [RawExportAutomationRequest](docs/RawExportAutomationRequest.md) - [RawExportRequest](docs/RawExportRequest.md) + - [ReadCsvFileManifestsRequest](docs/ReadCsvFileManifestsRequest.md) + - [ReadCsvFileManifestsRequestItem](docs/ReadCsvFileManifestsRequestItem.md) + - [ReadCsvFileManifestsResponse](docs/ReadCsvFileManifestsResponse.md) - [Reasoning](docs/Reasoning.md) - [ReasoningStep](docs/ReasoningStep.md) - [ReferenceIdentifier](docs/ReferenceIdentifier.md) @@ -2321,6 +2373,8 @@ Class | Method | HTTP request | Description - [TotalResultHeader](docs/TotalResultHeader.md) - [TriggerAutomationRequest](docs/TriggerAutomationRequest.md) - [TriggerQualityIssuesCalculationResponse](docs/TriggerQualityIssuesCalculationResponse.md) + - [UploadFileResponse](docs/UploadFileResponse.md) + - [UploadGeoCollectionFileResponse](docs/UploadGeoCollectionFileResponse.md) - [UpsertKnowledgeDocumentRequestDto](docs/UpsertKnowledgeDocumentRequestDto.md) - [UpsertKnowledgeDocumentResponseDto](docs/UpsertKnowledgeDocumentResponseDto.md) - [UserAssignee](docs/UserAssignee.md) @@ -2358,6 +2412,9 @@ Class | Method | HTTP request | Description - [WidgetSlidesTemplate](docs/WidgetSlidesTemplate.md) - [WorkspaceAutomationIdentifier](docs/WorkspaceAutomationIdentifier.md) - [WorkspaceAutomationManagementBulkRequest](docs/WorkspaceAutomationManagementBulkRequest.md) + - [WorkspaceCacheSettings](docs/WorkspaceCacheSettings.md) + - [WorkspaceCacheUsage](docs/WorkspaceCacheUsage.md) + - [WorkspaceCurrentCacheUsage](docs/WorkspaceCurrentCacheUsage.md) - [WorkspaceDataSource](docs/WorkspaceDataSource.md) - [WorkspaceIdentifier](docs/WorkspaceIdentifier.md) - [WorkspacePermissionAssignment](docs/WorkspacePermissionAssignment.md) diff --git a/gooddata-api-client/docs/AacContainerWidgetAllOfDescription.md b/gooddata-api-client/docs/AacContainerWidgetAllOfDescription.md new file mode 100644 index 000000000..2262792ca --- /dev/null +++ b/gooddata-api-client/docs/AacContainerWidgetAllOfDescription.md @@ -0,0 +1,28 @@ +# AacContainerWidgetAllOfDescription + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_container_widget_all_of_description import AacContainerWidgetAllOfDescription + +# TODO update the JSON string below +json = "{}" +# create an instance of AacContainerWidgetAllOfDescription from a JSON string +aac_container_widget_all_of_description_instance = AacContainerWidgetAllOfDescription.from_json(json) +# print the JSON string representation of the object +print(AacContainerWidgetAllOfDescription.to_json()) + +# convert the object into a dict +aac_container_widget_all_of_description_dict = aac_container_widget_all_of_description_instance.to_dict() +# create an instance of AacContainerWidgetAllOfDescription from a dict +aac_container_widget_all_of_description_from_dict = AacContainerWidgetAllOfDescription.from_dict(aac_container_widget_all_of_description_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/gooddata-api-client/docs/AacContainerWidgetAllOfTitle.md b/gooddata-api-client/docs/AacContainerWidgetAllOfTitle.md new file mode 100644 index 000000000..ada3e71fb --- /dev/null +++ b/gooddata-api-client/docs/AacContainerWidgetAllOfTitle.md @@ -0,0 +1,28 @@ +# AacContainerWidgetAllOfTitle + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_container_widget_all_of_title import AacContainerWidgetAllOfTitle + +# TODO update the JSON string below +json = "{}" +# create an instance of AacContainerWidgetAllOfTitle from a JSON string +aac_container_widget_all_of_title_instance = AacContainerWidgetAllOfTitle.from_json(json) +# print the JSON string representation of the object +print(AacContainerWidgetAllOfTitle.to_json()) + +# convert the object into a dict +aac_container_widget_all_of_title_dict = aac_container_widget_all_of_title_instance.to_dict() +# create an instance of AacContainerWidgetAllOfTitle from a dict +aac_container_widget_all_of_title_from_dict = AacContainerWidgetAllOfTitle.from_dict(aac_container_widget_all_of_title_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/gooddata-api-client/docs/AacDashboardWithTabsAllOfPlugins.md b/gooddata-api-client/docs/AacDashboardWithTabsAllOfPlugins.md new file mode 100644 index 000000000..347b275ed --- /dev/null +++ b/gooddata-api-client/docs/AacDashboardWithTabsAllOfPlugins.md @@ -0,0 +1,30 @@ +# AacDashboardWithTabsAllOfPlugins + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Plugin ID. | +**parameters** | **object** | Free-form JSON object | [optional] + +## Example + +```python +from gooddata_api_client.models.aac_dashboard_with_tabs_all_of_plugins import AacDashboardWithTabsAllOfPlugins + +# TODO update the JSON string below +json = "{}" +# create an instance of AacDashboardWithTabsAllOfPlugins from a JSON string +aac_dashboard_with_tabs_all_of_plugins_instance = AacDashboardWithTabsAllOfPlugins.from_json(json) +# print the JSON string representation of the object +print(AacDashboardWithTabsAllOfPlugins.to_json()) + +# convert the object into a dict +aac_dashboard_with_tabs_all_of_plugins_dict = aac_dashboard_with_tabs_all_of_plugins_instance.to_dict() +# create an instance of AacDashboardWithTabsAllOfPlugins from a dict +aac_dashboard_with_tabs_all_of_plugins_from_dict = AacDashboardWithTabsAllOfPlugins.from_dict(aac_dashboard_with_tabs_all_of_plugins_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/gooddata-api-client/docs/AacDashboardWithoutTabsAllOfPlugins.md b/gooddata-api-client/docs/AacDashboardWithoutTabsAllOfPlugins.md new file mode 100644 index 000000000..7a8f40134 --- /dev/null +++ b/gooddata-api-client/docs/AacDashboardWithoutTabsAllOfPlugins.md @@ -0,0 +1,30 @@ +# AacDashboardWithoutTabsAllOfPlugins + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Plugin ID. | +**parameters** | **object** | Free-form JSON object | [optional] + +## Example + +```python +from gooddata_api_client.models.aac_dashboard_without_tabs_all_of_plugins import AacDashboardWithoutTabsAllOfPlugins + +# TODO update the JSON string below +json = "{}" +# create an instance of AacDashboardWithoutTabsAllOfPlugins from a JSON string +aac_dashboard_without_tabs_all_of_plugins_instance = AacDashboardWithoutTabsAllOfPlugins.from_json(json) +# print the JSON string representation of the object +print(AacDashboardWithoutTabsAllOfPlugins.to_json()) + +# convert the object into a dict +aac_dashboard_without_tabs_all_of_plugins_dict = aac_dashboard_without_tabs_all_of_plugins_instance.to_dict() +# create an instance of AacDashboardWithoutTabsAllOfPlugins from a dict +aac_dashboard_without_tabs_all_of_plugins_from_dict = AacDashboardWithoutTabsAllOfPlugins.from_dict(aac_dashboard_without_tabs_all_of_plugins_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/gooddata-api-client/docs/AacRichTextWidgetAllOfDescription.md b/gooddata-api-client/docs/AacRichTextWidgetAllOfDescription.md new file mode 100644 index 000000000..1c20931f9 --- /dev/null +++ b/gooddata-api-client/docs/AacRichTextWidgetAllOfDescription.md @@ -0,0 +1,28 @@ +# AacRichTextWidgetAllOfDescription + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_rich_text_widget_all_of_description import AacRichTextWidgetAllOfDescription + +# TODO update the JSON string below +json = "{}" +# create an instance of AacRichTextWidgetAllOfDescription from a JSON string +aac_rich_text_widget_all_of_description_instance = AacRichTextWidgetAllOfDescription.from_json(json) +# print the JSON string representation of the object +print(AacRichTextWidgetAllOfDescription.to_json()) + +# convert the object into a dict +aac_rich_text_widget_all_of_description_dict = aac_rich_text_widget_all_of_description_instance.to_dict() +# create an instance of AacRichTextWidgetAllOfDescription from a dict +aac_rich_text_widget_all_of_description_from_dict = AacRichTextWidgetAllOfDescription.from_dict(aac_rich_text_widget_all_of_description_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/gooddata-api-client/docs/AacRichTextWidgetAllOfTitle.md b/gooddata-api-client/docs/AacRichTextWidgetAllOfTitle.md new file mode 100644 index 000000000..010336cf3 --- /dev/null +++ b/gooddata-api-client/docs/AacRichTextWidgetAllOfTitle.md @@ -0,0 +1,28 @@ +# AacRichTextWidgetAllOfTitle + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_rich_text_widget_all_of_title import AacRichTextWidgetAllOfTitle + +# TODO update the JSON string below +json = "{}" +# create an instance of AacRichTextWidgetAllOfTitle from a JSON string +aac_rich_text_widget_all_of_title_instance = AacRichTextWidgetAllOfTitle.from_json(json) +# print the JSON string representation of the object +print(AacRichTextWidgetAllOfTitle.to_json()) + +# convert the object into a dict +aac_rich_text_widget_all_of_title_dict = aac_rich_text_widget_all_of_title_instance.to_dict() +# create an instance of AacRichTextWidgetAllOfTitle from a dict +aac_rich_text_widget_all_of_title_from_dict = AacRichTextWidgetAllOfTitle.from_dict(aac_rich_text_widget_all_of_title_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/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfAttributes.md b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfAttributes.md new file mode 100644 index 000000000..0949b80f8 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfAttributes.md @@ -0,0 +1,28 @@ +# AacVisualizationBasicBucketsAllOfAttributes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_basic_buckets_all_of_attributes import AacVisualizationBasicBucketsAllOfAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBasicBucketsAllOfAttributes from a JSON string +aac_visualization_basic_buckets_all_of_attributes_instance = AacVisualizationBasicBucketsAllOfAttributes.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBasicBucketsAllOfAttributes.to_json()) + +# convert the object into a dict +aac_visualization_basic_buckets_all_of_attributes_dict = aac_visualization_basic_buckets_all_of_attributes_instance.to_dict() +# create an instance of AacVisualizationBasicBucketsAllOfAttributes from a dict +aac_visualization_basic_buckets_all_of_attributes_from_dict = AacVisualizationBasicBucketsAllOfAttributes.from_dict(aac_visualization_basic_buckets_all_of_attributes_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/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfColumns.md b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfColumns.md new file mode 100644 index 000000000..845e832f0 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfColumns.md @@ -0,0 +1,28 @@ +# AacVisualizationBasicBucketsAllOfColumns + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_basic_buckets_all_of_columns import AacVisualizationBasicBucketsAllOfColumns + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBasicBucketsAllOfColumns from a JSON string +aac_visualization_basic_buckets_all_of_columns_instance = AacVisualizationBasicBucketsAllOfColumns.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBasicBucketsAllOfColumns.to_json()) + +# convert the object into a dict +aac_visualization_basic_buckets_all_of_columns_dict = aac_visualization_basic_buckets_all_of_columns_instance.to_dict() +# create an instance of AacVisualizationBasicBucketsAllOfColumns from a dict +aac_visualization_basic_buckets_all_of_columns_from_dict = AacVisualizationBasicBucketsAllOfColumns.from_dict(aac_visualization_basic_buckets_all_of_columns_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/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfMetrics.md b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfMetrics.md new file mode 100644 index 000000000..b84c91db5 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfMetrics.md @@ -0,0 +1,28 @@ +# AacVisualizationBasicBucketsAllOfMetrics + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_basic_buckets_all_of_metrics import AacVisualizationBasicBucketsAllOfMetrics + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBasicBucketsAllOfMetrics from a JSON string +aac_visualization_basic_buckets_all_of_metrics_instance = AacVisualizationBasicBucketsAllOfMetrics.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBasicBucketsAllOfMetrics.to_json()) + +# convert the object into a dict +aac_visualization_basic_buckets_all_of_metrics_dict = aac_visualization_basic_buckets_all_of_metrics_instance.to_dict() +# create an instance of AacVisualizationBasicBucketsAllOfMetrics from a dict +aac_visualization_basic_buckets_all_of_metrics_from_dict = AacVisualizationBasicBucketsAllOfMetrics.from_dict(aac_visualization_basic_buckets_all_of_metrics_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/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfRows.md b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfRows.md new file mode 100644 index 000000000..3bed9cbf1 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfRows.md @@ -0,0 +1,28 @@ +# AacVisualizationBasicBucketsAllOfRows + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_basic_buckets_all_of_rows import AacVisualizationBasicBucketsAllOfRows + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBasicBucketsAllOfRows from a JSON string +aac_visualization_basic_buckets_all_of_rows_instance = AacVisualizationBasicBucketsAllOfRows.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBasicBucketsAllOfRows.to_json()) + +# convert the object into a dict +aac_visualization_basic_buckets_all_of_rows_dict = aac_visualization_basic_buckets_all_of_rows_instance.to_dict() +# create an instance of AacVisualizationBasicBucketsAllOfRows from a dict +aac_visualization_basic_buckets_all_of_rows_from_dict = AacVisualizationBasicBucketsAllOfRows.from_dict(aac_visualization_basic_buckets_all_of_rows_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/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfSegmentBy.md b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfSegmentBy.md new file mode 100644 index 000000000..cd5902d1c --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfSegmentBy.md @@ -0,0 +1,28 @@ +# AacVisualizationBasicBucketsAllOfSegmentBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_basic_buckets_all_of_segment_by import AacVisualizationBasicBucketsAllOfSegmentBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBasicBucketsAllOfSegmentBy from a JSON string +aac_visualization_basic_buckets_all_of_segment_by_instance = AacVisualizationBasicBucketsAllOfSegmentBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBasicBucketsAllOfSegmentBy.to_json()) + +# convert the object into a dict +aac_visualization_basic_buckets_all_of_segment_by_dict = aac_visualization_basic_buckets_all_of_segment_by_instance.to_dict() +# create an instance of AacVisualizationBasicBucketsAllOfSegmentBy from a dict +aac_visualization_basic_buckets_all_of_segment_by_from_dict = AacVisualizationBasicBucketsAllOfSegmentBy.from_dict(aac_visualization_basic_buckets_all_of_segment_by_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/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfSizeBy.md b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfSizeBy.md new file mode 100644 index 000000000..1a11f9912 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfSizeBy.md @@ -0,0 +1,28 @@ +# AacVisualizationBasicBucketsAllOfSizeBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_basic_buckets_all_of_size_by import AacVisualizationBasicBucketsAllOfSizeBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBasicBucketsAllOfSizeBy from a JSON string +aac_visualization_basic_buckets_all_of_size_by_instance = AacVisualizationBasicBucketsAllOfSizeBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBasicBucketsAllOfSizeBy.to_json()) + +# convert the object into a dict +aac_visualization_basic_buckets_all_of_size_by_dict = aac_visualization_basic_buckets_all_of_size_by_instance.to_dict() +# create an instance of AacVisualizationBasicBucketsAllOfSizeBy from a dict +aac_visualization_basic_buckets_all_of_size_by_from_dict = AacVisualizationBasicBucketsAllOfSizeBy.from_dict(aac_visualization_basic_buckets_all_of_size_by_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/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfStackBy.md b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfStackBy.md new file mode 100644 index 000000000..849355aa1 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfStackBy.md @@ -0,0 +1,28 @@ +# AacVisualizationBasicBucketsAllOfStackBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_basic_buckets_all_of_stack_by import AacVisualizationBasicBucketsAllOfStackBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBasicBucketsAllOfStackBy from a JSON string +aac_visualization_basic_buckets_all_of_stack_by_instance = AacVisualizationBasicBucketsAllOfStackBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBasicBucketsAllOfStackBy.to_json()) + +# convert the object into a dict +aac_visualization_basic_buckets_all_of_stack_by_dict = aac_visualization_basic_buckets_all_of_stack_by_instance.to_dict() +# create an instance of AacVisualizationBasicBucketsAllOfStackBy from a dict +aac_visualization_basic_buckets_all_of_stack_by_from_dict = AacVisualizationBasicBucketsAllOfStackBy.from_dict(aac_visualization_basic_buckets_all_of_stack_by_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/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfTrendBy.md b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfTrendBy.md new file mode 100644 index 000000000..218b9d4a9 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfTrendBy.md @@ -0,0 +1,28 @@ +# AacVisualizationBasicBucketsAllOfTrendBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_basic_buckets_all_of_trend_by import AacVisualizationBasicBucketsAllOfTrendBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBasicBucketsAllOfTrendBy from a JSON string +aac_visualization_basic_buckets_all_of_trend_by_instance = AacVisualizationBasicBucketsAllOfTrendBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBasicBucketsAllOfTrendBy.to_json()) + +# convert the object into a dict +aac_visualization_basic_buckets_all_of_trend_by_dict = aac_visualization_basic_buckets_all_of_trend_by_instance.to_dict() +# create an instance of AacVisualizationBasicBucketsAllOfTrendBy from a dict +aac_visualization_basic_buckets_all_of_trend_by_from_dict = AacVisualizationBasicBucketsAllOfTrendBy.from_dict(aac_visualization_basic_buckets_all_of_trend_by_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/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfViewBy.md b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfViewBy.md new file mode 100644 index 000000000..99b52d7e3 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBasicBucketsAllOfViewBy.md @@ -0,0 +1,28 @@ +# AacVisualizationBasicBucketsAllOfViewBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_basic_buckets_all_of_view_by import AacVisualizationBasicBucketsAllOfViewBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBasicBucketsAllOfViewBy from a JSON string +aac_visualization_basic_buckets_all_of_view_by_instance = AacVisualizationBasicBucketsAllOfViewBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBasicBucketsAllOfViewBy.to_json()) + +# convert the object into a dict +aac_visualization_basic_buckets_all_of_view_by_dict = aac_visualization_basic_buckets_all_of_view_by_instance.to_dict() +# create an instance of AacVisualizationBasicBucketsAllOfViewBy from a dict +aac_visualization_basic_buckets_all_of_view_by_from_dict = AacVisualizationBasicBucketsAllOfViewBy.from_dict(aac_visualization_basic_buckets_all_of_view_by_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/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfAttributes.md b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfAttributes.md new file mode 100644 index 000000000..a9c3d0921 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfAttributes.md @@ -0,0 +1,28 @@ +# AacVisualizationBubbleBucketsAllOfAttributes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_bubble_buckets_all_of_attributes import AacVisualizationBubbleBucketsAllOfAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBubbleBucketsAllOfAttributes from a JSON string +aac_visualization_bubble_buckets_all_of_attributes_instance = AacVisualizationBubbleBucketsAllOfAttributes.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBubbleBucketsAllOfAttributes.to_json()) + +# convert the object into a dict +aac_visualization_bubble_buckets_all_of_attributes_dict = aac_visualization_bubble_buckets_all_of_attributes_instance.to_dict() +# create an instance of AacVisualizationBubbleBucketsAllOfAttributes from a dict +aac_visualization_bubble_buckets_all_of_attributes_from_dict = AacVisualizationBubbleBucketsAllOfAttributes.from_dict(aac_visualization_bubble_buckets_all_of_attributes_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/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfColumns.md b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfColumns.md new file mode 100644 index 000000000..5baa54ab5 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfColumns.md @@ -0,0 +1,28 @@ +# AacVisualizationBubbleBucketsAllOfColumns + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_bubble_buckets_all_of_columns import AacVisualizationBubbleBucketsAllOfColumns + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBubbleBucketsAllOfColumns from a JSON string +aac_visualization_bubble_buckets_all_of_columns_instance = AacVisualizationBubbleBucketsAllOfColumns.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBubbleBucketsAllOfColumns.to_json()) + +# convert the object into a dict +aac_visualization_bubble_buckets_all_of_columns_dict = aac_visualization_bubble_buckets_all_of_columns_instance.to_dict() +# create an instance of AacVisualizationBubbleBucketsAllOfColumns from a dict +aac_visualization_bubble_buckets_all_of_columns_from_dict = AacVisualizationBubbleBucketsAllOfColumns.from_dict(aac_visualization_bubble_buckets_all_of_columns_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/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfMetrics.md b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfMetrics.md new file mode 100644 index 000000000..4035ad860 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfMetrics.md @@ -0,0 +1,28 @@ +# AacVisualizationBubbleBucketsAllOfMetrics + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_bubble_buckets_all_of_metrics import AacVisualizationBubbleBucketsAllOfMetrics + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBubbleBucketsAllOfMetrics from a JSON string +aac_visualization_bubble_buckets_all_of_metrics_instance = AacVisualizationBubbleBucketsAllOfMetrics.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBubbleBucketsAllOfMetrics.to_json()) + +# convert the object into a dict +aac_visualization_bubble_buckets_all_of_metrics_dict = aac_visualization_bubble_buckets_all_of_metrics_instance.to_dict() +# create an instance of AacVisualizationBubbleBucketsAllOfMetrics from a dict +aac_visualization_bubble_buckets_all_of_metrics_from_dict = AacVisualizationBubbleBucketsAllOfMetrics.from_dict(aac_visualization_bubble_buckets_all_of_metrics_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/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfRows.md b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfRows.md new file mode 100644 index 000000000..a9cd5f4e1 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfRows.md @@ -0,0 +1,28 @@ +# AacVisualizationBubbleBucketsAllOfRows + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_bubble_buckets_all_of_rows import AacVisualizationBubbleBucketsAllOfRows + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBubbleBucketsAllOfRows from a JSON string +aac_visualization_bubble_buckets_all_of_rows_instance = AacVisualizationBubbleBucketsAllOfRows.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBubbleBucketsAllOfRows.to_json()) + +# convert the object into a dict +aac_visualization_bubble_buckets_all_of_rows_dict = aac_visualization_bubble_buckets_all_of_rows_instance.to_dict() +# create an instance of AacVisualizationBubbleBucketsAllOfRows from a dict +aac_visualization_bubble_buckets_all_of_rows_from_dict = AacVisualizationBubbleBucketsAllOfRows.from_dict(aac_visualization_bubble_buckets_all_of_rows_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/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfSegmentBy.md b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfSegmentBy.md new file mode 100644 index 000000000..6fd7e028f --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfSegmentBy.md @@ -0,0 +1,28 @@ +# AacVisualizationBubbleBucketsAllOfSegmentBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_bubble_buckets_all_of_segment_by import AacVisualizationBubbleBucketsAllOfSegmentBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBubbleBucketsAllOfSegmentBy from a JSON string +aac_visualization_bubble_buckets_all_of_segment_by_instance = AacVisualizationBubbleBucketsAllOfSegmentBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBubbleBucketsAllOfSegmentBy.to_json()) + +# convert the object into a dict +aac_visualization_bubble_buckets_all_of_segment_by_dict = aac_visualization_bubble_buckets_all_of_segment_by_instance.to_dict() +# create an instance of AacVisualizationBubbleBucketsAllOfSegmentBy from a dict +aac_visualization_bubble_buckets_all_of_segment_by_from_dict = AacVisualizationBubbleBucketsAllOfSegmentBy.from_dict(aac_visualization_bubble_buckets_all_of_segment_by_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/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfSizeBy.md b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfSizeBy.md new file mode 100644 index 000000000..5018db803 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfSizeBy.md @@ -0,0 +1,28 @@ +# AacVisualizationBubbleBucketsAllOfSizeBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_bubble_buckets_all_of_size_by import AacVisualizationBubbleBucketsAllOfSizeBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBubbleBucketsAllOfSizeBy from a JSON string +aac_visualization_bubble_buckets_all_of_size_by_instance = AacVisualizationBubbleBucketsAllOfSizeBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBubbleBucketsAllOfSizeBy.to_json()) + +# convert the object into a dict +aac_visualization_bubble_buckets_all_of_size_by_dict = aac_visualization_bubble_buckets_all_of_size_by_instance.to_dict() +# create an instance of AacVisualizationBubbleBucketsAllOfSizeBy from a dict +aac_visualization_bubble_buckets_all_of_size_by_from_dict = AacVisualizationBubbleBucketsAllOfSizeBy.from_dict(aac_visualization_bubble_buckets_all_of_size_by_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/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfStackBy.md b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfStackBy.md new file mode 100644 index 000000000..a5064ff89 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfStackBy.md @@ -0,0 +1,28 @@ +# AacVisualizationBubbleBucketsAllOfStackBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_bubble_buckets_all_of_stack_by import AacVisualizationBubbleBucketsAllOfStackBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBubbleBucketsAllOfStackBy from a JSON string +aac_visualization_bubble_buckets_all_of_stack_by_instance = AacVisualizationBubbleBucketsAllOfStackBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBubbleBucketsAllOfStackBy.to_json()) + +# convert the object into a dict +aac_visualization_bubble_buckets_all_of_stack_by_dict = aac_visualization_bubble_buckets_all_of_stack_by_instance.to_dict() +# create an instance of AacVisualizationBubbleBucketsAllOfStackBy from a dict +aac_visualization_bubble_buckets_all_of_stack_by_from_dict = AacVisualizationBubbleBucketsAllOfStackBy.from_dict(aac_visualization_bubble_buckets_all_of_stack_by_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/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfTrendBy.md b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfTrendBy.md new file mode 100644 index 000000000..f742ce183 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfTrendBy.md @@ -0,0 +1,28 @@ +# AacVisualizationBubbleBucketsAllOfTrendBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_bubble_buckets_all_of_trend_by import AacVisualizationBubbleBucketsAllOfTrendBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBubbleBucketsAllOfTrendBy from a JSON string +aac_visualization_bubble_buckets_all_of_trend_by_instance = AacVisualizationBubbleBucketsAllOfTrendBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBubbleBucketsAllOfTrendBy.to_json()) + +# convert the object into a dict +aac_visualization_bubble_buckets_all_of_trend_by_dict = aac_visualization_bubble_buckets_all_of_trend_by_instance.to_dict() +# create an instance of AacVisualizationBubbleBucketsAllOfTrendBy from a dict +aac_visualization_bubble_buckets_all_of_trend_by_from_dict = AacVisualizationBubbleBucketsAllOfTrendBy.from_dict(aac_visualization_bubble_buckets_all_of_trend_by_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/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfViewBy.md b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfViewBy.md new file mode 100644 index 000000000..f9066fdd6 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationBubbleBucketsAllOfViewBy.md @@ -0,0 +1,28 @@ +# AacVisualizationBubbleBucketsAllOfViewBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_bubble_buckets_all_of_view_by import AacVisualizationBubbleBucketsAllOfViewBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationBubbleBucketsAllOfViewBy from a JSON string +aac_visualization_bubble_buckets_all_of_view_by_instance = AacVisualizationBubbleBucketsAllOfViewBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationBubbleBucketsAllOfViewBy.to_json()) + +# convert the object into a dict +aac_visualization_bubble_buckets_all_of_view_by_dict = aac_visualization_bubble_buckets_all_of_view_by_instance.to_dict() +# create an instance of AacVisualizationBubbleBucketsAllOfViewBy from a dict +aac_visualization_bubble_buckets_all_of_view_by_from_dict = AacVisualizationBubbleBucketsAllOfViewBy.from_dict(aac_visualization_bubble_buckets_all_of_view_by_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/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfAttributes.md b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfAttributes.md new file mode 100644 index 000000000..7b7ef70a7 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfAttributes.md @@ -0,0 +1,28 @@ +# AacVisualizationDependencyBucketsAllOfAttributes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_dependency_buckets_all_of_attributes import AacVisualizationDependencyBucketsAllOfAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationDependencyBucketsAllOfAttributes from a JSON string +aac_visualization_dependency_buckets_all_of_attributes_instance = AacVisualizationDependencyBucketsAllOfAttributes.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationDependencyBucketsAllOfAttributes.to_json()) + +# convert the object into a dict +aac_visualization_dependency_buckets_all_of_attributes_dict = aac_visualization_dependency_buckets_all_of_attributes_instance.to_dict() +# create an instance of AacVisualizationDependencyBucketsAllOfAttributes from a dict +aac_visualization_dependency_buckets_all_of_attributes_from_dict = AacVisualizationDependencyBucketsAllOfAttributes.from_dict(aac_visualization_dependency_buckets_all_of_attributes_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/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfColumns.md b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfColumns.md new file mode 100644 index 000000000..999893d21 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfColumns.md @@ -0,0 +1,28 @@ +# AacVisualizationDependencyBucketsAllOfColumns + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_dependency_buckets_all_of_columns import AacVisualizationDependencyBucketsAllOfColumns + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationDependencyBucketsAllOfColumns from a JSON string +aac_visualization_dependency_buckets_all_of_columns_instance = AacVisualizationDependencyBucketsAllOfColumns.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationDependencyBucketsAllOfColumns.to_json()) + +# convert the object into a dict +aac_visualization_dependency_buckets_all_of_columns_dict = aac_visualization_dependency_buckets_all_of_columns_instance.to_dict() +# create an instance of AacVisualizationDependencyBucketsAllOfColumns from a dict +aac_visualization_dependency_buckets_all_of_columns_from_dict = AacVisualizationDependencyBucketsAllOfColumns.from_dict(aac_visualization_dependency_buckets_all_of_columns_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/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfMetrics.md b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfMetrics.md new file mode 100644 index 000000000..20f7b9355 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfMetrics.md @@ -0,0 +1,28 @@ +# AacVisualizationDependencyBucketsAllOfMetrics + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_dependency_buckets_all_of_metrics import AacVisualizationDependencyBucketsAllOfMetrics + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationDependencyBucketsAllOfMetrics from a JSON string +aac_visualization_dependency_buckets_all_of_metrics_instance = AacVisualizationDependencyBucketsAllOfMetrics.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationDependencyBucketsAllOfMetrics.to_json()) + +# convert the object into a dict +aac_visualization_dependency_buckets_all_of_metrics_dict = aac_visualization_dependency_buckets_all_of_metrics_instance.to_dict() +# create an instance of AacVisualizationDependencyBucketsAllOfMetrics from a dict +aac_visualization_dependency_buckets_all_of_metrics_from_dict = AacVisualizationDependencyBucketsAllOfMetrics.from_dict(aac_visualization_dependency_buckets_all_of_metrics_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/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfRows.md b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfRows.md new file mode 100644 index 000000000..b7f3f64e3 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfRows.md @@ -0,0 +1,28 @@ +# AacVisualizationDependencyBucketsAllOfRows + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_dependency_buckets_all_of_rows import AacVisualizationDependencyBucketsAllOfRows + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationDependencyBucketsAllOfRows from a JSON string +aac_visualization_dependency_buckets_all_of_rows_instance = AacVisualizationDependencyBucketsAllOfRows.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationDependencyBucketsAllOfRows.to_json()) + +# convert the object into a dict +aac_visualization_dependency_buckets_all_of_rows_dict = aac_visualization_dependency_buckets_all_of_rows_instance.to_dict() +# create an instance of AacVisualizationDependencyBucketsAllOfRows from a dict +aac_visualization_dependency_buckets_all_of_rows_from_dict = AacVisualizationDependencyBucketsAllOfRows.from_dict(aac_visualization_dependency_buckets_all_of_rows_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/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfSegmentBy.md b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfSegmentBy.md new file mode 100644 index 000000000..b49ac1de4 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfSegmentBy.md @@ -0,0 +1,28 @@ +# AacVisualizationDependencyBucketsAllOfSegmentBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_dependency_buckets_all_of_segment_by import AacVisualizationDependencyBucketsAllOfSegmentBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationDependencyBucketsAllOfSegmentBy from a JSON string +aac_visualization_dependency_buckets_all_of_segment_by_instance = AacVisualizationDependencyBucketsAllOfSegmentBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationDependencyBucketsAllOfSegmentBy.to_json()) + +# convert the object into a dict +aac_visualization_dependency_buckets_all_of_segment_by_dict = aac_visualization_dependency_buckets_all_of_segment_by_instance.to_dict() +# create an instance of AacVisualizationDependencyBucketsAllOfSegmentBy from a dict +aac_visualization_dependency_buckets_all_of_segment_by_from_dict = AacVisualizationDependencyBucketsAllOfSegmentBy.from_dict(aac_visualization_dependency_buckets_all_of_segment_by_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/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfSizeBy.md b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfSizeBy.md new file mode 100644 index 000000000..270a0f6df --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfSizeBy.md @@ -0,0 +1,28 @@ +# AacVisualizationDependencyBucketsAllOfSizeBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_dependency_buckets_all_of_size_by import AacVisualizationDependencyBucketsAllOfSizeBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationDependencyBucketsAllOfSizeBy from a JSON string +aac_visualization_dependency_buckets_all_of_size_by_instance = AacVisualizationDependencyBucketsAllOfSizeBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationDependencyBucketsAllOfSizeBy.to_json()) + +# convert the object into a dict +aac_visualization_dependency_buckets_all_of_size_by_dict = aac_visualization_dependency_buckets_all_of_size_by_instance.to_dict() +# create an instance of AacVisualizationDependencyBucketsAllOfSizeBy from a dict +aac_visualization_dependency_buckets_all_of_size_by_from_dict = AacVisualizationDependencyBucketsAllOfSizeBy.from_dict(aac_visualization_dependency_buckets_all_of_size_by_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/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfStackBy.md b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfStackBy.md new file mode 100644 index 000000000..bc109043b --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfStackBy.md @@ -0,0 +1,28 @@ +# AacVisualizationDependencyBucketsAllOfStackBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_dependency_buckets_all_of_stack_by import AacVisualizationDependencyBucketsAllOfStackBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationDependencyBucketsAllOfStackBy from a JSON string +aac_visualization_dependency_buckets_all_of_stack_by_instance = AacVisualizationDependencyBucketsAllOfStackBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationDependencyBucketsAllOfStackBy.to_json()) + +# convert the object into a dict +aac_visualization_dependency_buckets_all_of_stack_by_dict = aac_visualization_dependency_buckets_all_of_stack_by_instance.to_dict() +# create an instance of AacVisualizationDependencyBucketsAllOfStackBy from a dict +aac_visualization_dependency_buckets_all_of_stack_by_from_dict = AacVisualizationDependencyBucketsAllOfStackBy.from_dict(aac_visualization_dependency_buckets_all_of_stack_by_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/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfTrendBy.md b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfTrendBy.md new file mode 100644 index 000000000..389e42bf3 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfTrendBy.md @@ -0,0 +1,28 @@ +# AacVisualizationDependencyBucketsAllOfTrendBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_dependency_buckets_all_of_trend_by import AacVisualizationDependencyBucketsAllOfTrendBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationDependencyBucketsAllOfTrendBy from a JSON string +aac_visualization_dependency_buckets_all_of_trend_by_instance = AacVisualizationDependencyBucketsAllOfTrendBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationDependencyBucketsAllOfTrendBy.to_json()) + +# convert the object into a dict +aac_visualization_dependency_buckets_all_of_trend_by_dict = aac_visualization_dependency_buckets_all_of_trend_by_instance.to_dict() +# create an instance of AacVisualizationDependencyBucketsAllOfTrendBy from a dict +aac_visualization_dependency_buckets_all_of_trend_by_from_dict = AacVisualizationDependencyBucketsAllOfTrendBy.from_dict(aac_visualization_dependency_buckets_all_of_trend_by_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/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfViewBy.md b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfViewBy.md new file mode 100644 index 000000000..3051c079a --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationDependencyBucketsAllOfViewBy.md @@ -0,0 +1,28 @@ +# AacVisualizationDependencyBucketsAllOfViewBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_dependency_buckets_all_of_view_by import AacVisualizationDependencyBucketsAllOfViewBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationDependencyBucketsAllOfViewBy from a JSON string +aac_visualization_dependency_buckets_all_of_view_by_instance = AacVisualizationDependencyBucketsAllOfViewBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationDependencyBucketsAllOfViewBy.to_json()) + +# convert the object into a dict +aac_visualization_dependency_buckets_all_of_view_by_dict = aac_visualization_dependency_buckets_all_of_view_by_instance.to_dict() +# create an instance of AacVisualizationDependencyBucketsAllOfViewBy from a dict +aac_visualization_dependency_buckets_all_of_view_by_from_dict = AacVisualizationDependencyBucketsAllOfViewBy.from_dict(aac_visualization_dependency_buckets_all_of_view_by_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/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfAttributes.md b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfAttributes.md new file mode 100644 index 000000000..f54de3ab7 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfAttributes.md @@ -0,0 +1,28 @@ +# AacVisualizationGeoBucketsAllOfAttributes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_geo_buckets_all_of_attributes import AacVisualizationGeoBucketsAllOfAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationGeoBucketsAllOfAttributes from a JSON string +aac_visualization_geo_buckets_all_of_attributes_instance = AacVisualizationGeoBucketsAllOfAttributes.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationGeoBucketsAllOfAttributes.to_json()) + +# convert the object into a dict +aac_visualization_geo_buckets_all_of_attributes_dict = aac_visualization_geo_buckets_all_of_attributes_instance.to_dict() +# create an instance of AacVisualizationGeoBucketsAllOfAttributes from a dict +aac_visualization_geo_buckets_all_of_attributes_from_dict = AacVisualizationGeoBucketsAllOfAttributes.from_dict(aac_visualization_geo_buckets_all_of_attributes_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/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfColumns.md b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfColumns.md new file mode 100644 index 000000000..ab39ed32b --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfColumns.md @@ -0,0 +1,28 @@ +# AacVisualizationGeoBucketsAllOfColumns + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_geo_buckets_all_of_columns import AacVisualizationGeoBucketsAllOfColumns + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationGeoBucketsAllOfColumns from a JSON string +aac_visualization_geo_buckets_all_of_columns_instance = AacVisualizationGeoBucketsAllOfColumns.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationGeoBucketsAllOfColumns.to_json()) + +# convert the object into a dict +aac_visualization_geo_buckets_all_of_columns_dict = aac_visualization_geo_buckets_all_of_columns_instance.to_dict() +# create an instance of AacVisualizationGeoBucketsAllOfColumns from a dict +aac_visualization_geo_buckets_all_of_columns_from_dict = AacVisualizationGeoBucketsAllOfColumns.from_dict(aac_visualization_geo_buckets_all_of_columns_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/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfMetrics.md b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfMetrics.md new file mode 100644 index 000000000..db6769026 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfMetrics.md @@ -0,0 +1,28 @@ +# AacVisualizationGeoBucketsAllOfMetrics + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_geo_buckets_all_of_metrics import AacVisualizationGeoBucketsAllOfMetrics + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationGeoBucketsAllOfMetrics from a JSON string +aac_visualization_geo_buckets_all_of_metrics_instance = AacVisualizationGeoBucketsAllOfMetrics.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationGeoBucketsAllOfMetrics.to_json()) + +# convert the object into a dict +aac_visualization_geo_buckets_all_of_metrics_dict = aac_visualization_geo_buckets_all_of_metrics_instance.to_dict() +# create an instance of AacVisualizationGeoBucketsAllOfMetrics from a dict +aac_visualization_geo_buckets_all_of_metrics_from_dict = AacVisualizationGeoBucketsAllOfMetrics.from_dict(aac_visualization_geo_buckets_all_of_metrics_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/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfRows.md b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfRows.md new file mode 100644 index 000000000..0e32edb47 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfRows.md @@ -0,0 +1,28 @@ +# AacVisualizationGeoBucketsAllOfRows + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_geo_buckets_all_of_rows import AacVisualizationGeoBucketsAllOfRows + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationGeoBucketsAllOfRows from a JSON string +aac_visualization_geo_buckets_all_of_rows_instance = AacVisualizationGeoBucketsAllOfRows.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationGeoBucketsAllOfRows.to_json()) + +# convert the object into a dict +aac_visualization_geo_buckets_all_of_rows_dict = aac_visualization_geo_buckets_all_of_rows_instance.to_dict() +# create an instance of AacVisualizationGeoBucketsAllOfRows from a dict +aac_visualization_geo_buckets_all_of_rows_from_dict = AacVisualizationGeoBucketsAllOfRows.from_dict(aac_visualization_geo_buckets_all_of_rows_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/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfSegmentBy.md b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfSegmentBy.md new file mode 100644 index 000000000..06ba51839 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfSegmentBy.md @@ -0,0 +1,28 @@ +# AacVisualizationGeoBucketsAllOfSegmentBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_geo_buckets_all_of_segment_by import AacVisualizationGeoBucketsAllOfSegmentBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationGeoBucketsAllOfSegmentBy from a JSON string +aac_visualization_geo_buckets_all_of_segment_by_instance = AacVisualizationGeoBucketsAllOfSegmentBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationGeoBucketsAllOfSegmentBy.to_json()) + +# convert the object into a dict +aac_visualization_geo_buckets_all_of_segment_by_dict = aac_visualization_geo_buckets_all_of_segment_by_instance.to_dict() +# create an instance of AacVisualizationGeoBucketsAllOfSegmentBy from a dict +aac_visualization_geo_buckets_all_of_segment_by_from_dict = AacVisualizationGeoBucketsAllOfSegmentBy.from_dict(aac_visualization_geo_buckets_all_of_segment_by_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/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfSizeBy.md b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfSizeBy.md new file mode 100644 index 000000000..f9059acfa --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfSizeBy.md @@ -0,0 +1,28 @@ +# AacVisualizationGeoBucketsAllOfSizeBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_geo_buckets_all_of_size_by import AacVisualizationGeoBucketsAllOfSizeBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationGeoBucketsAllOfSizeBy from a JSON string +aac_visualization_geo_buckets_all_of_size_by_instance = AacVisualizationGeoBucketsAllOfSizeBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationGeoBucketsAllOfSizeBy.to_json()) + +# convert the object into a dict +aac_visualization_geo_buckets_all_of_size_by_dict = aac_visualization_geo_buckets_all_of_size_by_instance.to_dict() +# create an instance of AacVisualizationGeoBucketsAllOfSizeBy from a dict +aac_visualization_geo_buckets_all_of_size_by_from_dict = AacVisualizationGeoBucketsAllOfSizeBy.from_dict(aac_visualization_geo_buckets_all_of_size_by_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/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfStackBy.md b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfStackBy.md new file mode 100644 index 000000000..25edfc423 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfStackBy.md @@ -0,0 +1,28 @@ +# AacVisualizationGeoBucketsAllOfStackBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_geo_buckets_all_of_stack_by import AacVisualizationGeoBucketsAllOfStackBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationGeoBucketsAllOfStackBy from a JSON string +aac_visualization_geo_buckets_all_of_stack_by_instance = AacVisualizationGeoBucketsAllOfStackBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationGeoBucketsAllOfStackBy.to_json()) + +# convert the object into a dict +aac_visualization_geo_buckets_all_of_stack_by_dict = aac_visualization_geo_buckets_all_of_stack_by_instance.to_dict() +# create an instance of AacVisualizationGeoBucketsAllOfStackBy from a dict +aac_visualization_geo_buckets_all_of_stack_by_from_dict = AacVisualizationGeoBucketsAllOfStackBy.from_dict(aac_visualization_geo_buckets_all_of_stack_by_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/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfTrendBy.md b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfTrendBy.md new file mode 100644 index 000000000..66b853fba --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfTrendBy.md @@ -0,0 +1,28 @@ +# AacVisualizationGeoBucketsAllOfTrendBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_geo_buckets_all_of_trend_by import AacVisualizationGeoBucketsAllOfTrendBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationGeoBucketsAllOfTrendBy from a JSON string +aac_visualization_geo_buckets_all_of_trend_by_instance = AacVisualizationGeoBucketsAllOfTrendBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationGeoBucketsAllOfTrendBy.to_json()) + +# convert the object into a dict +aac_visualization_geo_buckets_all_of_trend_by_dict = aac_visualization_geo_buckets_all_of_trend_by_instance.to_dict() +# create an instance of AacVisualizationGeoBucketsAllOfTrendBy from a dict +aac_visualization_geo_buckets_all_of_trend_by_from_dict = AacVisualizationGeoBucketsAllOfTrendBy.from_dict(aac_visualization_geo_buckets_all_of_trend_by_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/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfViewBy.md b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfViewBy.md new file mode 100644 index 000000000..f7207781d --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationGeoBucketsAllOfViewBy.md @@ -0,0 +1,28 @@ +# AacVisualizationGeoBucketsAllOfViewBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_geo_buckets_all_of_view_by import AacVisualizationGeoBucketsAllOfViewBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationGeoBucketsAllOfViewBy from a JSON string +aac_visualization_geo_buckets_all_of_view_by_instance = AacVisualizationGeoBucketsAllOfViewBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationGeoBucketsAllOfViewBy.to_json()) + +# convert the object into a dict +aac_visualization_geo_buckets_all_of_view_by_dict = aac_visualization_geo_buckets_all_of_view_by_instance.to_dict() +# create an instance of AacVisualizationGeoBucketsAllOfViewBy from a dict +aac_visualization_geo_buckets_all_of_view_by_from_dict = AacVisualizationGeoBucketsAllOfViewBy.from_dict(aac_visualization_geo_buckets_all_of_view_by_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/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfAttributes.md b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfAttributes.md new file mode 100644 index 000000000..95d98d11f --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfAttributes.md @@ -0,0 +1,28 @@ +# AacVisualizationScatterBucketsAllOfAttributes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_scatter_buckets_all_of_attributes import AacVisualizationScatterBucketsAllOfAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationScatterBucketsAllOfAttributes from a JSON string +aac_visualization_scatter_buckets_all_of_attributes_instance = AacVisualizationScatterBucketsAllOfAttributes.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationScatterBucketsAllOfAttributes.to_json()) + +# convert the object into a dict +aac_visualization_scatter_buckets_all_of_attributes_dict = aac_visualization_scatter_buckets_all_of_attributes_instance.to_dict() +# create an instance of AacVisualizationScatterBucketsAllOfAttributes from a dict +aac_visualization_scatter_buckets_all_of_attributes_from_dict = AacVisualizationScatterBucketsAllOfAttributes.from_dict(aac_visualization_scatter_buckets_all_of_attributes_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/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfColumns.md b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfColumns.md new file mode 100644 index 000000000..ea94aee06 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfColumns.md @@ -0,0 +1,28 @@ +# AacVisualizationScatterBucketsAllOfColumns + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_scatter_buckets_all_of_columns import AacVisualizationScatterBucketsAllOfColumns + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationScatterBucketsAllOfColumns from a JSON string +aac_visualization_scatter_buckets_all_of_columns_instance = AacVisualizationScatterBucketsAllOfColumns.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationScatterBucketsAllOfColumns.to_json()) + +# convert the object into a dict +aac_visualization_scatter_buckets_all_of_columns_dict = aac_visualization_scatter_buckets_all_of_columns_instance.to_dict() +# create an instance of AacVisualizationScatterBucketsAllOfColumns from a dict +aac_visualization_scatter_buckets_all_of_columns_from_dict = AacVisualizationScatterBucketsAllOfColumns.from_dict(aac_visualization_scatter_buckets_all_of_columns_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/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfMetrics.md b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfMetrics.md new file mode 100644 index 000000000..75868df5b --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfMetrics.md @@ -0,0 +1,28 @@ +# AacVisualizationScatterBucketsAllOfMetrics + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_scatter_buckets_all_of_metrics import AacVisualizationScatterBucketsAllOfMetrics + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationScatterBucketsAllOfMetrics from a JSON string +aac_visualization_scatter_buckets_all_of_metrics_instance = AacVisualizationScatterBucketsAllOfMetrics.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationScatterBucketsAllOfMetrics.to_json()) + +# convert the object into a dict +aac_visualization_scatter_buckets_all_of_metrics_dict = aac_visualization_scatter_buckets_all_of_metrics_instance.to_dict() +# create an instance of AacVisualizationScatterBucketsAllOfMetrics from a dict +aac_visualization_scatter_buckets_all_of_metrics_from_dict = AacVisualizationScatterBucketsAllOfMetrics.from_dict(aac_visualization_scatter_buckets_all_of_metrics_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/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfRows.md b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfRows.md new file mode 100644 index 000000000..2749ccb1b --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfRows.md @@ -0,0 +1,28 @@ +# AacVisualizationScatterBucketsAllOfRows + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_scatter_buckets_all_of_rows import AacVisualizationScatterBucketsAllOfRows + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationScatterBucketsAllOfRows from a JSON string +aac_visualization_scatter_buckets_all_of_rows_instance = AacVisualizationScatterBucketsAllOfRows.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationScatterBucketsAllOfRows.to_json()) + +# convert the object into a dict +aac_visualization_scatter_buckets_all_of_rows_dict = aac_visualization_scatter_buckets_all_of_rows_instance.to_dict() +# create an instance of AacVisualizationScatterBucketsAllOfRows from a dict +aac_visualization_scatter_buckets_all_of_rows_from_dict = AacVisualizationScatterBucketsAllOfRows.from_dict(aac_visualization_scatter_buckets_all_of_rows_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/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfSegmentBy.md b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfSegmentBy.md new file mode 100644 index 000000000..5b4bab3d8 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfSegmentBy.md @@ -0,0 +1,28 @@ +# AacVisualizationScatterBucketsAllOfSegmentBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_scatter_buckets_all_of_segment_by import AacVisualizationScatterBucketsAllOfSegmentBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationScatterBucketsAllOfSegmentBy from a JSON string +aac_visualization_scatter_buckets_all_of_segment_by_instance = AacVisualizationScatterBucketsAllOfSegmentBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationScatterBucketsAllOfSegmentBy.to_json()) + +# convert the object into a dict +aac_visualization_scatter_buckets_all_of_segment_by_dict = aac_visualization_scatter_buckets_all_of_segment_by_instance.to_dict() +# create an instance of AacVisualizationScatterBucketsAllOfSegmentBy from a dict +aac_visualization_scatter_buckets_all_of_segment_by_from_dict = AacVisualizationScatterBucketsAllOfSegmentBy.from_dict(aac_visualization_scatter_buckets_all_of_segment_by_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/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfSizeBy.md b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfSizeBy.md new file mode 100644 index 000000000..ba85e09bf --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfSizeBy.md @@ -0,0 +1,28 @@ +# AacVisualizationScatterBucketsAllOfSizeBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_scatter_buckets_all_of_size_by import AacVisualizationScatterBucketsAllOfSizeBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationScatterBucketsAllOfSizeBy from a JSON string +aac_visualization_scatter_buckets_all_of_size_by_instance = AacVisualizationScatterBucketsAllOfSizeBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationScatterBucketsAllOfSizeBy.to_json()) + +# convert the object into a dict +aac_visualization_scatter_buckets_all_of_size_by_dict = aac_visualization_scatter_buckets_all_of_size_by_instance.to_dict() +# create an instance of AacVisualizationScatterBucketsAllOfSizeBy from a dict +aac_visualization_scatter_buckets_all_of_size_by_from_dict = AacVisualizationScatterBucketsAllOfSizeBy.from_dict(aac_visualization_scatter_buckets_all_of_size_by_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/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfStackBy.md b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfStackBy.md new file mode 100644 index 000000000..4683647d4 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfStackBy.md @@ -0,0 +1,28 @@ +# AacVisualizationScatterBucketsAllOfStackBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_scatter_buckets_all_of_stack_by import AacVisualizationScatterBucketsAllOfStackBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationScatterBucketsAllOfStackBy from a JSON string +aac_visualization_scatter_buckets_all_of_stack_by_instance = AacVisualizationScatterBucketsAllOfStackBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationScatterBucketsAllOfStackBy.to_json()) + +# convert the object into a dict +aac_visualization_scatter_buckets_all_of_stack_by_dict = aac_visualization_scatter_buckets_all_of_stack_by_instance.to_dict() +# create an instance of AacVisualizationScatterBucketsAllOfStackBy from a dict +aac_visualization_scatter_buckets_all_of_stack_by_from_dict = AacVisualizationScatterBucketsAllOfStackBy.from_dict(aac_visualization_scatter_buckets_all_of_stack_by_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/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfTrendBy.md b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfTrendBy.md new file mode 100644 index 000000000..2f55a7e8d --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfTrendBy.md @@ -0,0 +1,28 @@ +# AacVisualizationScatterBucketsAllOfTrendBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_scatter_buckets_all_of_trend_by import AacVisualizationScatterBucketsAllOfTrendBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationScatterBucketsAllOfTrendBy from a JSON string +aac_visualization_scatter_buckets_all_of_trend_by_instance = AacVisualizationScatterBucketsAllOfTrendBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationScatterBucketsAllOfTrendBy.to_json()) + +# convert the object into a dict +aac_visualization_scatter_buckets_all_of_trend_by_dict = aac_visualization_scatter_buckets_all_of_trend_by_instance.to_dict() +# create an instance of AacVisualizationScatterBucketsAllOfTrendBy from a dict +aac_visualization_scatter_buckets_all_of_trend_by_from_dict = AacVisualizationScatterBucketsAllOfTrendBy.from_dict(aac_visualization_scatter_buckets_all_of_trend_by_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/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfViewBy.md b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfViewBy.md new file mode 100644 index 000000000..d69320d1b --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationScatterBucketsAllOfViewBy.md @@ -0,0 +1,28 @@ +# AacVisualizationScatterBucketsAllOfViewBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_scatter_buckets_all_of_view_by import AacVisualizationScatterBucketsAllOfViewBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationScatterBucketsAllOfViewBy from a JSON string +aac_visualization_scatter_buckets_all_of_view_by_instance = AacVisualizationScatterBucketsAllOfViewBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationScatterBucketsAllOfViewBy.to_json()) + +# convert the object into a dict +aac_visualization_scatter_buckets_all_of_view_by_dict = aac_visualization_scatter_buckets_all_of_view_by_instance.to_dict() +# create an instance of AacVisualizationScatterBucketsAllOfViewBy from a dict +aac_visualization_scatter_buckets_all_of_view_by_from_dict = AacVisualizationScatterBucketsAllOfViewBy.from_dict(aac_visualization_scatter_buckets_all_of_view_by_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/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfAttributes.md b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfAttributes.md new file mode 100644 index 000000000..c7201b59c --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfAttributes.md @@ -0,0 +1,28 @@ +# AacVisualizationStackedBucketsAllOfAttributes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_stacked_buckets_all_of_attributes import AacVisualizationStackedBucketsAllOfAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationStackedBucketsAllOfAttributes from a JSON string +aac_visualization_stacked_buckets_all_of_attributes_instance = AacVisualizationStackedBucketsAllOfAttributes.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationStackedBucketsAllOfAttributes.to_json()) + +# convert the object into a dict +aac_visualization_stacked_buckets_all_of_attributes_dict = aac_visualization_stacked_buckets_all_of_attributes_instance.to_dict() +# create an instance of AacVisualizationStackedBucketsAllOfAttributes from a dict +aac_visualization_stacked_buckets_all_of_attributes_from_dict = AacVisualizationStackedBucketsAllOfAttributes.from_dict(aac_visualization_stacked_buckets_all_of_attributes_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/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfColumns.md b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfColumns.md new file mode 100644 index 000000000..e2508cce2 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfColumns.md @@ -0,0 +1,28 @@ +# AacVisualizationStackedBucketsAllOfColumns + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_stacked_buckets_all_of_columns import AacVisualizationStackedBucketsAllOfColumns + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationStackedBucketsAllOfColumns from a JSON string +aac_visualization_stacked_buckets_all_of_columns_instance = AacVisualizationStackedBucketsAllOfColumns.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationStackedBucketsAllOfColumns.to_json()) + +# convert the object into a dict +aac_visualization_stacked_buckets_all_of_columns_dict = aac_visualization_stacked_buckets_all_of_columns_instance.to_dict() +# create an instance of AacVisualizationStackedBucketsAllOfColumns from a dict +aac_visualization_stacked_buckets_all_of_columns_from_dict = AacVisualizationStackedBucketsAllOfColumns.from_dict(aac_visualization_stacked_buckets_all_of_columns_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/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfMetrics.md b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfMetrics.md new file mode 100644 index 000000000..da021670f --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfMetrics.md @@ -0,0 +1,28 @@ +# AacVisualizationStackedBucketsAllOfMetrics + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_stacked_buckets_all_of_metrics import AacVisualizationStackedBucketsAllOfMetrics + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationStackedBucketsAllOfMetrics from a JSON string +aac_visualization_stacked_buckets_all_of_metrics_instance = AacVisualizationStackedBucketsAllOfMetrics.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationStackedBucketsAllOfMetrics.to_json()) + +# convert the object into a dict +aac_visualization_stacked_buckets_all_of_metrics_dict = aac_visualization_stacked_buckets_all_of_metrics_instance.to_dict() +# create an instance of AacVisualizationStackedBucketsAllOfMetrics from a dict +aac_visualization_stacked_buckets_all_of_metrics_from_dict = AacVisualizationStackedBucketsAllOfMetrics.from_dict(aac_visualization_stacked_buckets_all_of_metrics_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/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfRows.md b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfRows.md new file mode 100644 index 000000000..b68168676 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfRows.md @@ -0,0 +1,28 @@ +# AacVisualizationStackedBucketsAllOfRows + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_stacked_buckets_all_of_rows import AacVisualizationStackedBucketsAllOfRows + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationStackedBucketsAllOfRows from a JSON string +aac_visualization_stacked_buckets_all_of_rows_instance = AacVisualizationStackedBucketsAllOfRows.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationStackedBucketsAllOfRows.to_json()) + +# convert the object into a dict +aac_visualization_stacked_buckets_all_of_rows_dict = aac_visualization_stacked_buckets_all_of_rows_instance.to_dict() +# create an instance of AacVisualizationStackedBucketsAllOfRows from a dict +aac_visualization_stacked_buckets_all_of_rows_from_dict = AacVisualizationStackedBucketsAllOfRows.from_dict(aac_visualization_stacked_buckets_all_of_rows_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/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfSegmentBy.md b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfSegmentBy.md new file mode 100644 index 000000000..94613e7d1 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfSegmentBy.md @@ -0,0 +1,28 @@ +# AacVisualizationStackedBucketsAllOfSegmentBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_stacked_buckets_all_of_segment_by import AacVisualizationStackedBucketsAllOfSegmentBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationStackedBucketsAllOfSegmentBy from a JSON string +aac_visualization_stacked_buckets_all_of_segment_by_instance = AacVisualizationStackedBucketsAllOfSegmentBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationStackedBucketsAllOfSegmentBy.to_json()) + +# convert the object into a dict +aac_visualization_stacked_buckets_all_of_segment_by_dict = aac_visualization_stacked_buckets_all_of_segment_by_instance.to_dict() +# create an instance of AacVisualizationStackedBucketsAllOfSegmentBy from a dict +aac_visualization_stacked_buckets_all_of_segment_by_from_dict = AacVisualizationStackedBucketsAllOfSegmentBy.from_dict(aac_visualization_stacked_buckets_all_of_segment_by_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/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfSizeBy.md b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfSizeBy.md new file mode 100644 index 000000000..bdb8b214d --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfSizeBy.md @@ -0,0 +1,28 @@ +# AacVisualizationStackedBucketsAllOfSizeBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_stacked_buckets_all_of_size_by import AacVisualizationStackedBucketsAllOfSizeBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationStackedBucketsAllOfSizeBy from a JSON string +aac_visualization_stacked_buckets_all_of_size_by_instance = AacVisualizationStackedBucketsAllOfSizeBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationStackedBucketsAllOfSizeBy.to_json()) + +# convert the object into a dict +aac_visualization_stacked_buckets_all_of_size_by_dict = aac_visualization_stacked_buckets_all_of_size_by_instance.to_dict() +# create an instance of AacVisualizationStackedBucketsAllOfSizeBy from a dict +aac_visualization_stacked_buckets_all_of_size_by_from_dict = AacVisualizationStackedBucketsAllOfSizeBy.from_dict(aac_visualization_stacked_buckets_all_of_size_by_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/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfStackBy.md b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfStackBy.md new file mode 100644 index 000000000..1bf2b048c --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfStackBy.md @@ -0,0 +1,28 @@ +# AacVisualizationStackedBucketsAllOfStackBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_stacked_buckets_all_of_stack_by import AacVisualizationStackedBucketsAllOfStackBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationStackedBucketsAllOfStackBy from a JSON string +aac_visualization_stacked_buckets_all_of_stack_by_instance = AacVisualizationStackedBucketsAllOfStackBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationStackedBucketsAllOfStackBy.to_json()) + +# convert the object into a dict +aac_visualization_stacked_buckets_all_of_stack_by_dict = aac_visualization_stacked_buckets_all_of_stack_by_instance.to_dict() +# create an instance of AacVisualizationStackedBucketsAllOfStackBy from a dict +aac_visualization_stacked_buckets_all_of_stack_by_from_dict = AacVisualizationStackedBucketsAllOfStackBy.from_dict(aac_visualization_stacked_buckets_all_of_stack_by_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/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfTrendBy.md b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfTrendBy.md new file mode 100644 index 000000000..ccbbc47e8 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfTrendBy.md @@ -0,0 +1,28 @@ +# AacVisualizationStackedBucketsAllOfTrendBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_stacked_buckets_all_of_trend_by import AacVisualizationStackedBucketsAllOfTrendBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationStackedBucketsAllOfTrendBy from a JSON string +aac_visualization_stacked_buckets_all_of_trend_by_instance = AacVisualizationStackedBucketsAllOfTrendBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationStackedBucketsAllOfTrendBy.to_json()) + +# convert the object into a dict +aac_visualization_stacked_buckets_all_of_trend_by_dict = aac_visualization_stacked_buckets_all_of_trend_by_instance.to_dict() +# create an instance of AacVisualizationStackedBucketsAllOfTrendBy from a dict +aac_visualization_stacked_buckets_all_of_trend_by_from_dict = AacVisualizationStackedBucketsAllOfTrendBy.from_dict(aac_visualization_stacked_buckets_all_of_trend_by_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/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfViewBy.md b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfViewBy.md new file mode 100644 index 000000000..32a066d54 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationStackedBucketsAllOfViewBy.md @@ -0,0 +1,28 @@ +# AacVisualizationStackedBucketsAllOfViewBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_stacked_buckets_all_of_view_by import AacVisualizationStackedBucketsAllOfViewBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationStackedBucketsAllOfViewBy from a JSON string +aac_visualization_stacked_buckets_all_of_view_by_instance = AacVisualizationStackedBucketsAllOfViewBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationStackedBucketsAllOfViewBy.to_json()) + +# convert the object into a dict +aac_visualization_stacked_buckets_all_of_view_by_dict = aac_visualization_stacked_buckets_all_of_view_by_instance.to_dict() +# create an instance of AacVisualizationStackedBucketsAllOfViewBy from a dict +aac_visualization_stacked_buckets_all_of_view_by_from_dict = AacVisualizationStackedBucketsAllOfViewBy.from_dict(aac_visualization_stacked_buckets_all_of_view_by_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/gooddata-api-client/docs/AacVisualizationSwitcherWidgetAllOfDescription.md b/gooddata-api-client/docs/AacVisualizationSwitcherWidgetAllOfDescription.md new file mode 100644 index 000000000..70fa71995 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationSwitcherWidgetAllOfDescription.md @@ -0,0 +1,28 @@ +# AacVisualizationSwitcherWidgetAllOfDescription + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_switcher_widget_all_of_description import AacVisualizationSwitcherWidgetAllOfDescription + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationSwitcherWidgetAllOfDescription from a JSON string +aac_visualization_switcher_widget_all_of_description_instance = AacVisualizationSwitcherWidgetAllOfDescription.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationSwitcherWidgetAllOfDescription.to_json()) + +# convert the object into a dict +aac_visualization_switcher_widget_all_of_description_dict = aac_visualization_switcher_widget_all_of_description_instance.to_dict() +# create an instance of AacVisualizationSwitcherWidgetAllOfDescription from a dict +aac_visualization_switcher_widget_all_of_description_from_dict = AacVisualizationSwitcherWidgetAllOfDescription.from_dict(aac_visualization_switcher_widget_all_of_description_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/gooddata-api-client/docs/AacVisualizationSwitcherWidgetAllOfTitle.md b/gooddata-api-client/docs/AacVisualizationSwitcherWidgetAllOfTitle.md new file mode 100644 index 000000000..1082b1cae --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationSwitcherWidgetAllOfTitle.md @@ -0,0 +1,28 @@ +# AacVisualizationSwitcherWidgetAllOfTitle + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_switcher_widget_all_of_title import AacVisualizationSwitcherWidgetAllOfTitle + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationSwitcherWidgetAllOfTitle from a JSON string +aac_visualization_switcher_widget_all_of_title_instance = AacVisualizationSwitcherWidgetAllOfTitle.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationSwitcherWidgetAllOfTitle.to_json()) + +# convert the object into a dict +aac_visualization_switcher_widget_all_of_title_dict = aac_visualization_switcher_widget_all_of_title_instance.to_dict() +# create an instance of AacVisualizationSwitcherWidgetAllOfTitle from a dict +aac_visualization_switcher_widget_all_of_title_from_dict = AacVisualizationSwitcherWidgetAllOfTitle.from_dict(aac_visualization_switcher_widget_all_of_title_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/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfAttributes.md b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfAttributes.md new file mode 100644 index 000000000..8718f10e3 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfAttributes.md @@ -0,0 +1,28 @@ +# AacVisualizationTableBucketsAllOfAttributes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_table_buckets_all_of_attributes import AacVisualizationTableBucketsAllOfAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTableBucketsAllOfAttributes from a JSON string +aac_visualization_table_buckets_all_of_attributes_instance = AacVisualizationTableBucketsAllOfAttributes.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTableBucketsAllOfAttributes.to_json()) + +# convert the object into a dict +aac_visualization_table_buckets_all_of_attributes_dict = aac_visualization_table_buckets_all_of_attributes_instance.to_dict() +# create an instance of AacVisualizationTableBucketsAllOfAttributes from a dict +aac_visualization_table_buckets_all_of_attributes_from_dict = AacVisualizationTableBucketsAllOfAttributes.from_dict(aac_visualization_table_buckets_all_of_attributes_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/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfColumns.md b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfColumns.md new file mode 100644 index 000000000..6459d0618 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfColumns.md @@ -0,0 +1,28 @@ +# AacVisualizationTableBucketsAllOfColumns + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_table_buckets_all_of_columns import AacVisualizationTableBucketsAllOfColumns + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTableBucketsAllOfColumns from a JSON string +aac_visualization_table_buckets_all_of_columns_instance = AacVisualizationTableBucketsAllOfColumns.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTableBucketsAllOfColumns.to_json()) + +# convert the object into a dict +aac_visualization_table_buckets_all_of_columns_dict = aac_visualization_table_buckets_all_of_columns_instance.to_dict() +# create an instance of AacVisualizationTableBucketsAllOfColumns from a dict +aac_visualization_table_buckets_all_of_columns_from_dict = AacVisualizationTableBucketsAllOfColumns.from_dict(aac_visualization_table_buckets_all_of_columns_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/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfMetrics.md b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfMetrics.md new file mode 100644 index 000000000..5781a4953 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfMetrics.md @@ -0,0 +1,28 @@ +# AacVisualizationTableBucketsAllOfMetrics + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_table_buckets_all_of_metrics import AacVisualizationTableBucketsAllOfMetrics + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTableBucketsAllOfMetrics from a JSON string +aac_visualization_table_buckets_all_of_metrics_instance = AacVisualizationTableBucketsAllOfMetrics.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTableBucketsAllOfMetrics.to_json()) + +# convert the object into a dict +aac_visualization_table_buckets_all_of_metrics_dict = aac_visualization_table_buckets_all_of_metrics_instance.to_dict() +# create an instance of AacVisualizationTableBucketsAllOfMetrics from a dict +aac_visualization_table_buckets_all_of_metrics_from_dict = AacVisualizationTableBucketsAllOfMetrics.from_dict(aac_visualization_table_buckets_all_of_metrics_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/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfRows.md b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfRows.md new file mode 100644 index 000000000..4b080bab2 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfRows.md @@ -0,0 +1,28 @@ +# AacVisualizationTableBucketsAllOfRows + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_table_buckets_all_of_rows import AacVisualizationTableBucketsAllOfRows + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTableBucketsAllOfRows from a JSON string +aac_visualization_table_buckets_all_of_rows_instance = AacVisualizationTableBucketsAllOfRows.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTableBucketsAllOfRows.to_json()) + +# convert the object into a dict +aac_visualization_table_buckets_all_of_rows_dict = aac_visualization_table_buckets_all_of_rows_instance.to_dict() +# create an instance of AacVisualizationTableBucketsAllOfRows from a dict +aac_visualization_table_buckets_all_of_rows_from_dict = AacVisualizationTableBucketsAllOfRows.from_dict(aac_visualization_table_buckets_all_of_rows_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/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfSegmentBy.md b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfSegmentBy.md new file mode 100644 index 000000000..e8e6129c7 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfSegmentBy.md @@ -0,0 +1,28 @@ +# AacVisualizationTableBucketsAllOfSegmentBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_table_buckets_all_of_segment_by import AacVisualizationTableBucketsAllOfSegmentBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTableBucketsAllOfSegmentBy from a JSON string +aac_visualization_table_buckets_all_of_segment_by_instance = AacVisualizationTableBucketsAllOfSegmentBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTableBucketsAllOfSegmentBy.to_json()) + +# convert the object into a dict +aac_visualization_table_buckets_all_of_segment_by_dict = aac_visualization_table_buckets_all_of_segment_by_instance.to_dict() +# create an instance of AacVisualizationTableBucketsAllOfSegmentBy from a dict +aac_visualization_table_buckets_all_of_segment_by_from_dict = AacVisualizationTableBucketsAllOfSegmentBy.from_dict(aac_visualization_table_buckets_all_of_segment_by_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/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfSizeBy.md b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfSizeBy.md new file mode 100644 index 000000000..8040db5d6 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfSizeBy.md @@ -0,0 +1,28 @@ +# AacVisualizationTableBucketsAllOfSizeBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_table_buckets_all_of_size_by import AacVisualizationTableBucketsAllOfSizeBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTableBucketsAllOfSizeBy from a JSON string +aac_visualization_table_buckets_all_of_size_by_instance = AacVisualizationTableBucketsAllOfSizeBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTableBucketsAllOfSizeBy.to_json()) + +# convert the object into a dict +aac_visualization_table_buckets_all_of_size_by_dict = aac_visualization_table_buckets_all_of_size_by_instance.to_dict() +# create an instance of AacVisualizationTableBucketsAllOfSizeBy from a dict +aac_visualization_table_buckets_all_of_size_by_from_dict = AacVisualizationTableBucketsAllOfSizeBy.from_dict(aac_visualization_table_buckets_all_of_size_by_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/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfStackBy.md b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfStackBy.md new file mode 100644 index 000000000..114974ef0 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfStackBy.md @@ -0,0 +1,28 @@ +# AacVisualizationTableBucketsAllOfStackBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_table_buckets_all_of_stack_by import AacVisualizationTableBucketsAllOfStackBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTableBucketsAllOfStackBy from a JSON string +aac_visualization_table_buckets_all_of_stack_by_instance = AacVisualizationTableBucketsAllOfStackBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTableBucketsAllOfStackBy.to_json()) + +# convert the object into a dict +aac_visualization_table_buckets_all_of_stack_by_dict = aac_visualization_table_buckets_all_of_stack_by_instance.to_dict() +# create an instance of AacVisualizationTableBucketsAllOfStackBy from a dict +aac_visualization_table_buckets_all_of_stack_by_from_dict = AacVisualizationTableBucketsAllOfStackBy.from_dict(aac_visualization_table_buckets_all_of_stack_by_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/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfTrendBy.md b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfTrendBy.md new file mode 100644 index 000000000..18c4f3cf8 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfTrendBy.md @@ -0,0 +1,28 @@ +# AacVisualizationTableBucketsAllOfTrendBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_table_buckets_all_of_trend_by import AacVisualizationTableBucketsAllOfTrendBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTableBucketsAllOfTrendBy from a JSON string +aac_visualization_table_buckets_all_of_trend_by_instance = AacVisualizationTableBucketsAllOfTrendBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTableBucketsAllOfTrendBy.to_json()) + +# convert the object into a dict +aac_visualization_table_buckets_all_of_trend_by_dict = aac_visualization_table_buckets_all_of_trend_by_instance.to_dict() +# create an instance of AacVisualizationTableBucketsAllOfTrendBy from a dict +aac_visualization_table_buckets_all_of_trend_by_from_dict = AacVisualizationTableBucketsAllOfTrendBy.from_dict(aac_visualization_table_buckets_all_of_trend_by_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/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfViewBy.md b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfViewBy.md new file mode 100644 index 000000000..744740260 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTableBucketsAllOfViewBy.md @@ -0,0 +1,28 @@ +# AacVisualizationTableBucketsAllOfViewBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_table_buckets_all_of_view_by import AacVisualizationTableBucketsAllOfViewBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTableBucketsAllOfViewBy from a JSON string +aac_visualization_table_buckets_all_of_view_by_instance = AacVisualizationTableBucketsAllOfViewBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTableBucketsAllOfViewBy.to_json()) + +# convert the object into a dict +aac_visualization_table_buckets_all_of_view_by_dict = aac_visualization_table_buckets_all_of_view_by_instance.to_dict() +# create an instance of AacVisualizationTableBucketsAllOfViewBy from a dict +aac_visualization_table_buckets_all_of_view_by_from_dict = AacVisualizationTableBucketsAllOfViewBy.from_dict(aac_visualization_table_buckets_all_of_view_by_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/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfAttributes.md b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfAttributes.md new file mode 100644 index 000000000..d674beb11 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfAttributes.md @@ -0,0 +1,28 @@ +# AacVisualizationTrendBucketsAllOfAttributes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_trend_buckets_all_of_attributes import AacVisualizationTrendBucketsAllOfAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTrendBucketsAllOfAttributes from a JSON string +aac_visualization_trend_buckets_all_of_attributes_instance = AacVisualizationTrendBucketsAllOfAttributes.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTrendBucketsAllOfAttributes.to_json()) + +# convert the object into a dict +aac_visualization_trend_buckets_all_of_attributes_dict = aac_visualization_trend_buckets_all_of_attributes_instance.to_dict() +# create an instance of AacVisualizationTrendBucketsAllOfAttributes from a dict +aac_visualization_trend_buckets_all_of_attributes_from_dict = AacVisualizationTrendBucketsAllOfAttributes.from_dict(aac_visualization_trend_buckets_all_of_attributes_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/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfColumns.md b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfColumns.md new file mode 100644 index 000000000..7cf40034a --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfColumns.md @@ -0,0 +1,28 @@ +# AacVisualizationTrendBucketsAllOfColumns + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_trend_buckets_all_of_columns import AacVisualizationTrendBucketsAllOfColumns + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTrendBucketsAllOfColumns from a JSON string +aac_visualization_trend_buckets_all_of_columns_instance = AacVisualizationTrendBucketsAllOfColumns.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTrendBucketsAllOfColumns.to_json()) + +# convert the object into a dict +aac_visualization_trend_buckets_all_of_columns_dict = aac_visualization_trend_buckets_all_of_columns_instance.to_dict() +# create an instance of AacVisualizationTrendBucketsAllOfColumns from a dict +aac_visualization_trend_buckets_all_of_columns_from_dict = AacVisualizationTrendBucketsAllOfColumns.from_dict(aac_visualization_trend_buckets_all_of_columns_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/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfMetrics.md b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfMetrics.md new file mode 100644 index 000000000..494d3f95e --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfMetrics.md @@ -0,0 +1,28 @@ +# AacVisualizationTrendBucketsAllOfMetrics + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_trend_buckets_all_of_metrics import AacVisualizationTrendBucketsAllOfMetrics + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTrendBucketsAllOfMetrics from a JSON string +aac_visualization_trend_buckets_all_of_metrics_instance = AacVisualizationTrendBucketsAllOfMetrics.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTrendBucketsAllOfMetrics.to_json()) + +# convert the object into a dict +aac_visualization_trend_buckets_all_of_metrics_dict = aac_visualization_trend_buckets_all_of_metrics_instance.to_dict() +# create an instance of AacVisualizationTrendBucketsAllOfMetrics from a dict +aac_visualization_trend_buckets_all_of_metrics_from_dict = AacVisualizationTrendBucketsAllOfMetrics.from_dict(aac_visualization_trend_buckets_all_of_metrics_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/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfRows.md b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfRows.md new file mode 100644 index 000000000..15830f799 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfRows.md @@ -0,0 +1,28 @@ +# AacVisualizationTrendBucketsAllOfRows + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_trend_buckets_all_of_rows import AacVisualizationTrendBucketsAllOfRows + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTrendBucketsAllOfRows from a JSON string +aac_visualization_trend_buckets_all_of_rows_instance = AacVisualizationTrendBucketsAllOfRows.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTrendBucketsAllOfRows.to_json()) + +# convert the object into a dict +aac_visualization_trend_buckets_all_of_rows_dict = aac_visualization_trend_buckets_all_of_rows_instance.to_dict() +# create an instance of AacVisualizationTrendBucketsAllOfRows from a dict +aac_visualization_trend_buckets_all_of_rows_from_dict = AacVisualizationTrendBucketsAllOfRows.from_dict(aac_visualization_trend_buckets_all_of_rows_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/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfSegmentBy.md b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfSegmentBy.md new file mode 100644 index 000000000..3ccec98ed --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfSegmentBy.md @@ -0,0 +1,28 @@ +# AacVisualizationTrendBucketsAllOfSegmentBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_trend_buckets_all_of_segment_by import AacVisualizationTrendBucketsAllOfSegmentBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTrendBucketsAllOfSegmentBy from a JSON string +aac_visualization_trend_buckets_all_of_segment_by_instance = AacVisualizationTrendBucketsAllOfSegmentBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTrendBucketsAllOfSegmentBy.to_json()) + +# convert the object into a dict +aac_visualization_trend_buckets_all_of_segment_by_dict = aac_visualization_trend_buckets_all_of_segment_by_instance.to_dict() +# create an instance of AacVisualizationTrendBucketsAllOfSegmentBy from a dict +aac_visualization_trend_buckets_all_of_segment_by_from_dict = AacVisualizationTrendBucketsAllOfSegmentBy.from_dict(aac_visualization_trend_buckets_all_of_segment_by_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/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfSizeBy.md b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfSizeBy.md new file mode 100644 index 000000000..91765255a --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfSizeBy.md @@ -0,0 +1,28 @@ +# AacVisualizationTrendBucketsAllOfSizeBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_trend_buckets_all_of_size_by import AacVisualizationTrendBucketsAllOfSizeBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTrendBucketsAllOfSizeBy from a JSON string +aac_visualization_trend_buckets_all_of_size_by_instance = AacVisualizationTrendBucketsAllOfSizeBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTrendBucketsAllOfSizeBy.to_json()) + +# convert the object into a dict +aac_visualization_trend_buckets_all_of_size_by_dict = aac_visualization_trend_buckets_all_of_size_by_instance.to_dict() +# create an instance of AacVisualizationTrendBucketsAllOfSizeBy from a dict +aac_visualization_trend_buckets_all_of_size_by_from_dict = AacVisualizationTrendBucketsAllOfSizeBy.from_dict(aac_visualization_trend_buckets_all_of_size_by_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/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfStackBy.md b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfStackBy.md new file mode 100644 index 000000000..b17dc38f1 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfStackBy.md @@ -0,0 +1,28 @@ +# AacVisualizationTrendBucketsAllOfStackBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_trend_buckets_all_of_stack_by import AacVisualizationTrendBucketsAllOfStackBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTrendBucketsAllOfStackBy from a JSON string +aac_visualization_trend_buckets_all_of_stack_by_instance = AacVisualizationTrendBucketsAllOfStackBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTrendBucketsAllOfStackBy.to_json()) + +# convert the object into a dict +aac_visualization_trend_buckets_all_of_stack_by_dict = aac_visualization_trend_buckets_all_of_stack_by_instance.to_dict() +# create an instance of AacVisualizationTrendBucketsAllOfStackBy from a dict +aac_visualization_trend_buckets_all_of_stack_by_from_dict = AacVisualizationTrendBucketsAllOfStackBy.from_dict(aac_visualization_trend_buckets_all_of_stack_by_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/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfTrendBy.md b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfTrendBy.md new file mode 100644 index 000000000..40ce7ae37 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfTrendBy.md @@ -0,0 +1,28 @@ +# AacVisualizationTrendBucketsAllOfTrendBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_trend_buckets_all_of_trend_by import AacVisualizationTrendBucketsAllOfTrendBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTrendBucketsAllOfTrendBy from a JSON string +aac_visualization_trend_buckets_all_of_trend_by_instance = AacVisualizationTrendBucketsAllOfTrendBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTrendBucketsAllOfTrendBy.to_json()) + +# convert the object into a dict +aac_visualization_trend_buckets_all_of_trend_by_dict = aac_visualization_trend_buckets_all_of_trend_by_instance.to_dict() +# create an instance of AacVisualizationTrendBucketsAllOfTrendBy from a dict +aac_visualization_trend_buckets_all_of_trend_by_from_dict = AacVisualizationTrendBucketsAllOfTrendBy.from_dict(aac_visualization_trend_buckets_all_of_trend_by_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/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfViewBy.md b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfViewBy.md new file mode 100644 index 000000000..f547a8eb6 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationTrendBucketsAllOfViewBy.md @@ -0,0 +1,28 @@ +# AacVisualizationTrendBucketsAllOfViewBy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_trend_buckets_all_of_view_by import AacVisualizationTrendBucketsAllOfViewBy + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationTrendBucketsAllOfViewBy from a JSON string +aac_visualization_trend_buckets_all_of_view_by_instance = AacVisualizationTrendBucketsAllOfViewBy.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationTrendBucketsAllOfViewBy.to_json()) + +# convert the object into a dict +aac_visualization_trend_buckets_all_of_view_by_dict = aac_visualization_trend_buckets_all_of_view_by_instance.to_dict() +# create an instance of AacVisualizationTrendBucketsAllOfViewBy from a dict +aac_visualization_trend_buckets_all_of_view_by_from_dict = AacVisualizationTrendBucketsAllOfViewBy.from_dict(aac_visualization_trend_buckets_all_of_view_by_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/gooddata-api-client/docs/AacVisualizationWidgetAllOfDescription.md b/gooddata-api-client/docs/AacVisualizationWidgetAllOfDescription.md new file mode 100644 index 000000000..de5eff489 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationWidgetAllOfDescription.md @@ -0,0 +1,28 @@ +# AacVisualizationWidgetAllOfDescription + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_widget_all_of_description import AacVisualizationWidgetAllOfDescription + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationWidgetAllOfDescription from a JSON string +aac_visualization_widget_all_of_description_instance = AacVisualizationWidgetAllOfDescription.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationWidgetAllOfDescription.to_json()) + +# convert the object into a dict +aac_visualization_widget_all_of_description_dict = aac_visualization_widget_all_of_description_instance.to_dict() +# create an instance of AacVisualizationWidgetAllOfDescription from a dict +aac_visualization_widget_all_of_description_from_dict = AacVisualizationWidgetAllOfDescription.from_dict(aac_visualization_widget_all_of_description_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/gooddata-api-client/docs/AacVisualizationWidgetAllOfTitle.md b/gooddata-api-client/docs/AacVisualizationWidgetAllOfTitle.md new file mode 100644 index 000000000..9744c1119 --- /dev/null +++ b/gooddata-api-client/docs/AacVisualizationWidgetAllOfTitle.md @@ -0,0 +1,28 @@ +# AacVisualizationWidgetAllOfTitle + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from gooddata_api_client.models.aac_visualization_widget_all_of_title import AacVisualizationWidgetAllOfTitle + +# TODO update the JSON string below +json = "{}" +# create an instance of AacVisualizationWidgetAllOfTitle from a JSON string +aac_visualization_widget_all_of_title_instance = AacVisualizationWidgetAllOfTitle.from_json(json) +# print the JSON string representation of the object +print(AacVisualizationWidgetAllOfTitle.to_json()) + +# convert the object into a dict +aac_visualization_widget_all_of_title_dict = aac_visualization_widget_all_of_title_instance.to_dict() +# create an instance of AacVisualizationWidgetAllOfTitle from a dict +aac_visualization_widget_all_of_title_from_dict = AacVisualizationWidgetAllOfTitle.from_dict(aac_visualization_widget_all_of_title_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/gooddata-api-client/docs/ActionsApi.md b/gooddata-api-client/docs/ActionsApi.md index 00977d702..d0692ff2a 100644 --- a/gooddata-api-client/docs/ActionsApi.md +++ b/gooddata-api-client/docs/ActionsApi.md @@ -10,6 +10,7 @@ Method | HTTP request | Description [**ai_chat_usage**](ActionsApi.md#ai_chat_usage) | **GET** /api/v1/actions/workspaces/{workspaceId}/ai/chatUsage | Get Chat Usage [**ai_search**](ActionsApi.md#ai_search) | **POST** /api/v1/actions/workspaces/{workspaceId}/ai/search | (BETA) Semantic Search in Metadata [**all_platform_usage**](ActionsApi.md#all_platform_usage) | **GET** /api/v1/actions/collectUsage | Info about the platform usage. +[**analyze_csv**](ActionsApi.md#analyze_csv) | **POST** /api/v1/actions/fileStorage/staging/analyzeCsv | Analyze CSV [**anomaly_detection**](ActionsApi.md#anomaly_detection) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/functions/anomalyDetection/{resultId} | (EXPERIMENTAL) Smart functions - Anomaly Detection [**anomaly_detection_result**](ActionsApi.md#anomaly_detection_result) | **GET** /api/v1/actions/workspaces/{workspaceId}/execution/functions/anomalyDetection/result/{resultId} | (EXPERIMENTAL) Smart functions - Anomaly Detection Result [**available_assignees**](ActionsApi.md#available_assignees) | **GET** /api/v1/actions/workspaces/{workspaceId}/analyticalDashboards/{dashboardId}/availableAssignees | Get Available Assignees @@ -20,11 +21,13 @@ Method | HTTP request | Description [**clean_translations**](ActionsApi.md#clean_translations) | **POST** /api/v1/actions/workspaces/{workspaceId}/translations/clean | Cleans up translations. [**clustering**](ActionsApi.md#clustering) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/functions/clustering/{resultId} | (EXPERIMENTAL) Smart functions - Clustering [**clustering_result**](ActionsApi.md#clustering_result) | **GET** /api/v1/actions/workspaces/{workspaceId}/execution/functions/clustering/result/{resultId} | (EXPERIMENTAL) Smart functions - Clustering Result +[**collect_cache_usage**](ActionsApi.md#collect_cache_usage) | **GET** /api/v1/actions/collectCacheUsage | Collect data about the current cache usage [**column_statistics**](ActionsApi.md#column_statistics) | **POST** /api/v1/actions/dataSources/{dataSourceId}/computeColumnStatistics | (EXPERIMENTAL) Compute column statistics [**compute_label_elements_post**](ActionsApi.md#compute_label_elements_post) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/collectLabelElements | Listing of label values. The resulting data are limited by the static platform limit to the maximum of 10000 rows. [**compute_report**](ActionsApi.md#compute_report) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/afm/execute | Executes analytical request and returns link to the result [**compute_valid_descendants**](ActionsApi.md#compute_valid_descendants) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/afm/computeValidDescendants | (BETA) Valid descendants [**compute_valid_objects**](ActionsApi.md#compute_valid_objects) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/afm/computeValidObjects | Valid objects +[**convert_geo_file**](ActionsApi.md#convert_geo_file) | **POST** /api/v1/actions/customGeoCollection/convert | Convert a geo file to GeoParquet format [**create_dashboard_export_request**](ActionsApi.md#create_dashboard_export_request) | **POST** /api/v1/actions/workspaces/{workspaceId}/analyticalDashboards/{dashboardId}/export/tabular | (EXPERIMENTAL) Create dashboard tabular export request [**create_document**](ActionsApi.md#create_document) | **POST** /api/v1/actions/workspaces/{workspaceId}/ai/knowledge/documents | [**create_image_export**](ActionsApi.md#create_image_export) | **POST** /api/v1/actions/workspaces/{workspaceId}/export/image | (EXPERIMENTAL) Create image export request @@ -33,8 +36,10 @@ Method | HTTP request | Description [**create_slides_export**](ActionsApi.md#create_slides_export) | **POST** /api/v1/actions/workspaces/{workspaceId}/export/slides | (EXPERIMENTAL) Create slides export request [**create_tabular_export**](ActionsApi.md#create_tabular_export) | **POST** /api/v1/actions/workspaces/{workspaceId}/export/tabular | Create tabular export request [**created_by**](ActionsApi.md#created_by) | **GET** /api/v1/actions/workspaces/{workspaceId}/ai/analyticsCatalog/createdBy | Get Analytics Catalog CreatedBy Users +[**custom_geo_collection_staging_upload**](ActionsApi.md#custom_geo_collection_staging_upload) | **POST** /api/v1/actions/customGeoCollection/staging/upload | Upload a geo collection file to the staging area [**dashboard_permissions**](ActionsApi.md#dashboard_permissions) | **GET** /api/v1/actions/workspaces/{workspaceId}/analyticalDashboards/{dashboardId}/permissions | Get Dashboard Permissions [**delete_document**](ActionsApi.md#delete_document) | **DELETE** /api/v1/actions/workspaces/{workspaceId}/ai/knowledge/documents/{filename} | +[**delete_files**](ActionsApi.md#delete_files) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/deleteFiles | Delete datasource files [**delete_organization_automations**](ActionsApi.md#delete_organization_automations) | **POST** /api/v1/actions/organization/automations/delete | Delete selected automations across all workspaces [**delete_workspace_automations**](ActionsApi.md#delete_workspace_automations) | **POST** /api/v1/actions/workspaces/{workspaceId}/automations/delete | Delete selected automations in the workspace [**explain_afm**](ActionsApi.md#explain_afm) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/afm/explain | AFM explain resource. @@ -60,11 +65,14 @@ Method | HTTP request | Description [**get_slides_export_metadata**](ActionsApi.md#get_slides_export_metadata) | **GET** /api/v1/actions/workspaces/{workspaceId}/export/slides/{exportId}/metadata | (EXPERIMENTAL) Retrieve metadata context [**get_tabular_export**](ActionsApi.md#get_tabular_export) | **GET** /api/v1/actions/workspaces/{workspaceId}/export/tabular/{exportId} | Retrieve exported files [**get_translation_tags**](ActionsApi.md#get_translation_tags) | **GET** /api/v1/actions/workspaces/{workspaceId}/translations | Get translation tags. +[**import_csv**](ActionsApi.md#import_csv) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/importCsv | Import CSV +[**import_custom_geo_collection**](ActionsApi.md#import_custom_geo_collection) | **POST** /api/v1/actions/customGeoCollection/{collectionId}/import | Import custom geo collection [**inherited_entity_conflicts**](ActionsApi.md#inherited_entity_conflicts) | **GET** /api/v1/actions/workspaces/{workspaceId}/inheritedEntityConflicts | Finds identifier conflicts in workspace hierarchy. [**inherited_entity_prefixes**](ActionsApi.md#inherited_entity_prefixes) | **GET** /api/v1/actions/workspaces/{workspaceId}/inheritedEntityPrefixes | Get used entity prefixes in hierarchy [**key_driver_analysis**](ActionsApi.md#key_driver_analysis) | **POST** /api/v1/actions/workspaces/{workspaceId}/execution/computeKeyDrivers | (EXPERIMENTAL) Compute key driver analysis [**key_driver_analysis_result**](ActionsApi.md#key_driver_analysis_result) | **GET** /api/v1/actions/workspaces/{workspaceId}/execution/computeKeyDrivers/result/{resultId} | (EXPERIMENTAL) Get key driver analysis result [**list_documents**](ActionsApi.md#list_documents) | **GET** /api/v1/actions/workspaces/{workspaceId}/ai/knowledge/documents | +[**list_files**](ActionsApi.md#list_files) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/listFiles | List datasource files [**list_workspace_user_groups**](ActionsApi.md#list_workspace_user_groups) | **GET** /api/v1/actions/workspaces/{workspaceId}/userGroups | [**list_workspace_users**](ActionsApi.md#list_workspace_users) | **GET** /api/v1/actions/workspaces/{workspaceId}/users | [**manage_dashboard_permissions**](ActionsApi.md#manage_dashboard_permissions) | **POST** /api/v1/actions/workspaces/{workspaceId}/analyticalDashboards/{dashboardId}/managePermissions | Manage Permissions for a Dashboard @@ -84,6 +92,7 @@ Method | HTTP request | Description [**patch_document**](ActionsApi.md#patch_document) | **PATCH** /api/v1/actions/workspaces/{workspaceId}/ai/knowledge/documents/{filename} | [**pause_organization_automations**](ActionsApi.md#pause_organization_automations) | **POST** /api/v1/actions/organization/automations/pause | Pause selected automations across all workspaces [**pause_workspace_automations**](ActionsApi.md#pause_workspace_automations) | **POST** /api/v1/actions/workspaces/{workspaceId}/automations/pause | Pause selected automations in the workspace +[**read_csv_file_manifests**](ActionsApi.md#read_csv_file_manifests) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/readCsvFileManifests | Read CSV file manifests [**register_upload_notification**](ActionsApi.md#register_upload_notification) | **POST** /api/v1/actions/dataSources/{dataSourceId}/uploadNotification | Register an upload notification [**resolve_all_entitlements**](ActionsApi.md#resolve_all_entitlements) | **GET** /api/v1/actions/resolveEntitlements | Values for all public entitlements. [**resolve_all_settings_without_workspace**](ActionsApi.md#resolve_all_settings_without_workspace) | **GET** /api/v1/actions/resolveSettings | Values for all settings without workspace. @@ -98,6 +107,7 @@ Method | HTTP request | Description [**search_knowledge**](ActionsApi.md#search_knowledge) | **GET** /api/v1/actions/workspaces/{workspaceId}/ai/knowledge/search | [**set_certification**](ActionsApi.md#set_certification) | **POST** /api/v1/actions/workspaces/{workspaceId}/setCertification | Set Certification [**set_translations**](ActionsApi.md#set_translations) | **POST** /api/v1/actions/workspaces/{workspaceId}/translations/set | Set translations for entities. +[**staging_upload**](ActionsApi.md#staging_upload) | **POST** /api/v1/actions/fileStorage/staging/upload | Upload a file to the staging area [**switch_active_identity_provider**](ActionsApi.md#switch_active_identity_provider) | **POST** /api/v1/actions/organization/switchActiveIdentityProvider | Switch Active Identity Provider [**tags**](ActionsApi.md#tags) | **GET** /api/v1/actions/workspaces/{workspaceId}/ai/analyticsCatalog/tags | Get Analytics Catalog Tags [**test_data_source**](ActionsApi.md#test_data_source) | **POST** /api/v1/actions/dataSources/{dataSourceId}/test | Test data source connection by data source id @@ -621,6 +631,88 @@ No authorization required [[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) +# **analyze_csv** +> [AnalyzeCsvResponse] analyze_csv(analyze_csv_request) + +Analyze CSV + +Analyzes CSV files at the given locations + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import actions_api +from gooddata_api_client.model.analyze_csv_response import AnalyzeCsvResponse +from gooddata_api_client.model.analyze_csv_request import AnalyzeCsvRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = actions_api.ActionsApi(api_client) + analyze_csv_request = AnalyzeCsvRequest( + analyze_requests=[ + AnalyzeCsvRequestItem( + config=AnalyzeCsvRequestItemConfig( + delimiters=[ + "delimiters_example", + ], + header_detect_max_rows=1, + header_row_count=1, + result_rows=1, + ), + location="location_example", + ), + ], + ) # AnalyzeCsvRequest | + + # example passing only required values which don't have defaults set + try: + # Analyze CSV + api_response = api_instance.analyze_csv(analyze_csv_request) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ActionsApi->analyze_csv: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analyze_csv_request** | [**AnalyzeCsvRequest**](AnalyzeCsvRequest.md)| | + +### Return type + +[**[AnalyzeCsvResponse]**](AnalyzeCsvResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful analysis. | - | + +[[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) + # **anomaly_detection** > SmartFunctionResponse anomaly_detection(workspace_id, result_id, anomaly_detection_request) @@ -1417,6 +1509,69 @@ No authorization required - **Accept**: application/json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[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) + +# **collect_cache_usage** +> CacheUsageData collect_cache_usage() + +Collect data about the current cache usage + +Get the detailed data about how much cache your organization is currently using, broken down by individual workspaces. + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import actions_api +from gooddata_api_client.model.cache_usage_data import CacheUsageData +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = actions_api.ActionsApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Collect data about the current cache usage + api_response = api_instance.collect_cache_usage() + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ActionsApi->collect_cache_usage: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CacheUsageData**](CacheUsageData.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + ### HTTP response details | Status code | Description | Response headers | @@ -1968,6 +2123,77 @@ No authorization required [[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) +# **convert_geo_file** +> ConvertGeoFileResponse convert_geo_file(convert_geo_file_request) + +Convert a geo file to GeoParquet format + +Converts a geo file from the staging area to GeoParquet format. Supported source formats: GeoJSON (.geojson, .json), ESRI Shapefile (.zip). If the source file is already in GeoParquet format, the same location is returned without conversion. + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import actions_api +from gooddata_api_client.model.convert_geo_file_response import ConvertGeoFileResponse +from gooddata_api_client.model.convert_geo_file_request import ConvertGeoFileRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = actions_api.ActionsApi(api_client) + convert_geo_file_request = ConvertGeoFileRequest( + location="location_example", + ) # ConvertGeoFileRequest | + + # example passing only required values which don't have defaults set + try: + # Convert a geo file to GeoParquet format + api_response = api_instance.convert_geo_file(convert_geo_file_request) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ActionsApi->convert_geo_file: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **convert_geo_file_request** | [**ConvertGeoFileRequest**](ConvertGeoFileRequest.md)| | + +### Return type + +[**ConvertGeoFileResponse**](ConvertGeoFileResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Conversion was successful. | - | +**400** | Invalid request or unsupported file format. | - | + +[[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) + # **create_dashboard_export_request** > ExportResponse create_dashboard_export_request(workspace_id, dashboard_id, dashboard_tabular_export_request) @@ -2709,6 +2935,73 @@ No authorization required [[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) +# **custom_geo_collection_staging_upload** +> UploadGeoCollectionFileResponse custom_geo_collection_staging_upload(file) + +Upload a geo collection file to the staging area + +Provides a location for uploading staging files for custom geo collections. Supported file types: GeoParquet (.parquet), GeoJSON (.geojson, .json), ESRI Shapefile (.zip). Maximum file size: 100 MB. + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import actions_api +from gooddata_api_client.model.upload_geo_collection_file_response import UploadGeoCollectionFileResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = actions_api.ActionsApi(api_client) + file = open('/path/to/file', 'rb') # file_type | The geo collection file to upload. Supported formats: GeoParquet (.parquet), GeoJSON (.geojson, .json), ESRI Shapefile (.zip). + + # example passing only required values which don't have defaults set + try: + # Upload a geo collection file to the staging area + api_response = api_instance.custom_geo_collection_staging_upload(file) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ActionsApi->custom_geo_collection_staging_upload: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **file** | **file_type**| The geo collection file to upload. Supported formats: GeoParquet (.parquet), GeoJSON (.geojson, .json), ESRI Shapefile (.zip). | + +### Return type + +[**UploadGeoCollectionFileResponse**](UploadGeoCollectionFileResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: */* + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Upload was successful. | - | + +[[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) + # **dashboard_permissions** > DashboardPermissions dashboard_permissions(workspace_id, dashboard_id) @@ -2842,6 +3135,78 @@ No authorization required [[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) +# **delete_files** +> delete_files(data_source_id, delete_files_request) + +Delete datasource files + +Delete the files in the given data source. + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import actions_api +from gooddata_api_client.model.delete_files_request import DeleteFilesRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = actions_api.ActionsApi(api_client) + data_source_id = "dataSourceId_example" # str | + delete_files_request = DeleteFilesRequest( + file_names=[ + "file_names_example", + ], + ) # DeleteFilesRequest | + + # example passing only required values which don't have defaults set + try: + # Delete datasource files + api_instance.delete_files(data_source_id, delete_files_request) + except gooddata_api_client.ApiException as e: + print("Exception when calling ActionsApi->delete_files: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_source_id** | **str**| | + **delete_files_request** | [**DeleteFilesRequest**](DeleteFilesRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successful deletion. | - | + +[[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) + # **delete_organization_automations** > delete_organization_automations(organization_automation_management_bulk_request) @@ -4562,9 +4927,146 @@ No authorization required # **get_slides_export** > file_type get_slides_export(workspace_id, export_id) -(EXPERIMENTAL) Retrieve exported files +(EXPERIMENTAL) Retrieve exported files + +Note: This API is an experimental and is going to change. Please, use it accordingly. After clients creates a POST export request, the processing of it will start shortly asynchronously. To retrieve the result, client has to check periodically for the result on this endpoint. In case the result isn't ready yet, the service returns 202. If the result is ready, it returns 200 and octet stream of the result file with provided filename. + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import actions_api +from gooddata_api_client.model.get_image_export202_response_inner import GetImageExport202ResponseInner +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = actions_api.ActionsApi(api_client) + workspace_id = "workspaceId_example" # str | + export_id = "exportId_example" # str | + + # example passing only required values which don't have defaults set + try: + # (EXPERIMENTAL) Retrieve exported files + api_response = api_instance.get_slides_export(workspace_id, export_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ActionsApi->get_slides_export: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **export_id** | **str**| | + +### Return type + +**file_type** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/pdf, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/zip + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Binary export result. | * Content-Disposition -
| +**202** | Request is accepted, provided exportId exists, but export is not yet ready. | - | + +[[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_slides_export_metadata** +> get_slides_export_metadata(workspace_id, export_id) + +(EXPERIMENTAL) Retrieve metadata context + +Note: This API is an experimental and is going to change. Please, use it accordingly. This endpoint serves as a cache for user-defined metadata of the export for the front end UI to retrieve it, if one was created using the POST ../export/slides endpoint. The metadata structure is not verified. + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import actions_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = actions_api.ActionsApi(api_client) + workspace_id = "workspaceId_example" # str | + export_id = "exportId_example" # str | + + # example passing only required values which don't have defaults set + try: + # (EXPERIMENTAL) Retrieve metadata context + api_instance.get_slides_export_metadata(workspace_id, export_id) + except gooddata_api_client.ApiException as e: + print("Exception when calling ActionsApi->get_slides_export_metadata: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **export_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Json metadata representation | - | + +[[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_tabular_export** +> file_type get_tabular_export(workspace_id, export_id) + +Retrieve exported files -Note: This API is an experimental and is going to change. Please, use it accordingly. After clients creates a POST export request, the processing of it will start shortly asynchronously. To retrieve the result, client has to check periodically for the result on this endpoint. In case the result isn't ready yet, the service returns 202. If the result is ready, it returns 200 and octet stream of the result file with provided filename. +After clients creates a POST export request, the processing of it will start shortly asynchronously. To retrieve the result, client has to check periodically for the result on this endpoint. In case the result isn't ready yet, the service returns 202. If the result is ready, it returns 200 and octet stream of the result file with provided filename. ### Example @@ -4573,7 +5075,6 @@ Note: This API is an experimental and is going to change. Please, use it accordi import time import gooddata_api_client from gooddata_api_client.api import actions_api -from gooddata_api_client.model.get_image_export202_response_inner import GetImageExport202ResponseInner from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. @@ -4591,11 +5092,11 @@ with gooddata_api_client.ApiClient() as api_client: # example passing only required values which don't have defaults set try: - # (EXPERIMENTAL) Retrieve exported files - api_response = api_instance.get_slides_export(workspace_id, export_id) + # Retrieve exported files + api_response = api_instance.get_tabular_export(workspace_id, export_id) pprint(api_response) except gooddata_api_client.ApiException as e: - print("Exception when calling ActionsApi->get_slides_export: %s\n" % e) + print("Exception when calling ActionsApi->get_tabular_export: %s\n" % e) ``` @@ -4617,7 +5118,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/pdf, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/zip + - **Accept**: application/pdf, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/zip, text/csv, text/html ### HTTP response details @@ -4629,12 +5130,12 @@ No authorization required [[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_slides_export_metadata** -> get_slides_export_metadata(workspace_id, export_id) +# **get_translation_tags** +> [str] get_translation_tags(workspace_id) -(EXPERIMENTAL) Retrieve metadata context +Get translation tags. -Note: This API is an experimental and is going to change. Please, use it accordingly. This endpoint serves as a cache for user-defined metadata of the export for the front end UI to retrieve it, if one was created using the POST ../export/slides endpoint. The metadata structure is not verified. +Provides a list of effective translation tags. ### Example @@ -4656,14 +5157,14 @@ with gooddata_api_client.ApiClient() as api_client: # Create an instance of the API class api_instance = actions_api.ActionsApi(api_client) workspace_id = "workspaceId_example" # str | - export_id = "exportId_example" # str | # example passing only required values which don't have defaults set try: - # (EXPERIMENTAL) Retrieve metadata context - api_instance.get_slides_export_metadata(workspace_id, export_id) + # Get translation tags. + api_response = api_instance.get_translation_tags(workspace_id) + pprint(api_response) except gooddata_api_client.ApiException as e: - print("Exception when calling ActionsApi->get_slides_export_metadata: %s\n" % e) + print("Exception when calling ActionsApi->get_translation_tags: %s\n" % e) ``` @@ -4672,11 +5173,10 @@ with gooddata_api_client.ApiClient() as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **workspace_id** | **str**| | - **export_id** | **str**| | ### Return type -void (empty response body) +**[str]** ### Authorization @@ -4692,16 +5192,16 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Json metadata representation | - | +**200** | Retrieved list of translation tags. | - | [[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_tabular_export** -> file_type get_tabular_export(workspace_id, export_id) +# **import_csv** +> [ImportCsvResponse] import_csv(data_source_id, import_csv_request) -Retrieve exported files +Import CSV -After clients creates a POST export request, the processing of it will start shortly asynchronously. To retrieve the result, client has to check periodically for the result on this endpoint. In case the result isn't ready yet, the service returns 202. If the result is ready, it returns 200 and octet stream of the result file with provided filename. +Import the CSV files at the given locations in the staging area to the final location. ### Example @@ -4710,6 +5210,8 @@ After clients creates a POST export request, the processing of it will start sho import time import gooddata_api_client from gooddata_api_client.api import actions_api +from gooddata_api_client.model.import_csv_request import ImportCsvRequest +from gooddata_api_client.model.import_csv_response import ImportCsvResponse from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. @@ -4722,16 +5224,80 @@ configuration = gooddata_api_client.Configuration( with gooddata_api_client.ApiClient() as api_client: # Create an instance of the API class api_instance = actions_api.ActionsApi(api_client) - workspace_id = "workspaceId_example" # str | - export_id = "exportId_example" # str | + data_source_id = "dataSourceId_example" # str | + import_csv_request = ImportCsvRequest( + tables=[ + ImportCsvRequestTable( + name="name_example", + source=ImportCsvRequestTableSource( + config=ImportCsvRequestTableSourceConfig( + column_date_formats={ + "key": "key_example", + }, + convert_options=CsvConvertOptions( + auto_dict_encode=True, + auto_dict_max_cardinality=1, + check_utf8=True, + column_types=[ + CsvConvertOptionsColumnType( + name="name_example", + nullable=True, + type="type_example", + ), + ], + decimal_point="decimal_point_example", + false_values=[ + "false_values_example", + ], + include_columns=[ + "include_columns_example", + ], + include_missing_columns=True, + null_values=[ + "null_values_example", + ], + quoted_strings_can_be_null=True, + strings_can_be_null=True, + timestamp_parsers=[ + "timestamp_parsers_example", + ], + true_values=[ + "true_values_example", + ], + ), + parse_options=CsvParseOptions( + delimiter="delimiter_example", + double_quote=True, + escape_char={}, + ignore_empty_lines=True, + newlines_in_values=True, + quote_char={}, + ), + read_options=CsvReadOptions( + auto_generate_column_names=True, + block_size=1, + column_names=[ + "column_names_example", + ], + encoding="encoding_example", + skip_rows=1, + skip_rows_after_names=1, + use_threads=True, + ), + ), + location="location_example", + ), + ), + ], + ) # ImportCsvRequest | # example passing only required values which don't have defaults set try: - # Retrieve exported files - api_response = api_instance.get_tabular_export(workspace_id, export_id) + # Import CSV + api_response = api_instance.import_csv(data_source_id, import_csv_request) pprint(api_response) except gooddata_api_client.ApiException as e: - print("Exception when calling ActionsApi->get_tabular_export: %s\n" % e) + print("Exception when calling ActionsApi->import_csv: %s\n" % e) ``` @@ -4739,12 +5305,12 @@ with gooddata_api_client.ApiClient() as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **workspace_id** | **str**| | - **export_id** | **str**| | + **data_source_id** | **str**| | + **import_csv_request** | [**ImportCsvRequest**](ImportCsvRequest.md)| | ### Return type -**file_type** +[**[ImportCsvResponse]**](ImportCsvResponse.md) ### Authorization @@ -4752,25 +5318,24 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/pdf, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/zip, text/csv, text/html + - **Content-Type**: application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Binary export result. | * Content-Disposition -
| -**202** | Request is accepted, provided exportId exists, but export is not yet ready. | - | +**200** | Successful import. | - | [[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_translation_tags** -> [str] get_translation_tags(workspace_id) +# **import_custom_geo_collection** +> ImportGeoCollectionResponse import_custom_geo_collection(collection_id, import_geo_collection_request) -Get translation tags. +Import custom geo collection -Provides a list of effective translation tags. +Import a geo collection file from the staging area to be available for use. The file must be in GeoParquet format (use the convert endpoint first for other formats). Validates file size (max 100 MB), organization storage quota (max 1 GB total), and GeoParquet schema (requires id, geometry, and bbox columns). ### Example @@ -4779,6 +5344,8 @@ Provides a list of effective translation tags. import time import gooddata_api_client from gooddata_api_client.api import actions_api +from gooddata_api_client.model.import_geo_collection_response import ImportGeoCollectionResponse +from gooddata_api_client.model.import_geo_collection_request import ImportGeoCollectionRequest from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. @@ -4791,15 +5358,18 @@ configuration = gooddata_api_client.Configuration( with gooddata_api_client.ApiClient() as api_client: # Create an instance of the API class api_instance = actions_api.ActionsApi(api_client) - workspace_id = "workspaceId_example" # str | + collection_id = "collectionId_example" # str | + import_geo_collection_request = ImportGeoCollectionRequest( + location="location_example", + ) # ImportGeoCollectionRequest | # example passing only required values which don't have defaults set try: - # Get translation tags. - api_response = api_instance.get_translation_tags(workspace_id) + # Import custom geo collection + api_response = api_instance.import_custom_geo_collection(collection_id, import_geo_collection_request) pprint(api_response) except gooddata_api_client.ApiException as e: - print("Exception when calling ActionsApi->get_translation_tags: %s\n" % e) + print("Exception when calling ActionsApi->import_custom_geo_collection: %s\n" % e) ``` @@ -4807,11 +5377,12 @@ with gooddata_api_client.ApiClient() as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **workspace_id** | **str**| | + **collection_id** | **str**| | + **import_geo_collection_request** | [**ImportGeoCollectionRequest**](ImportGeoCollectionRequest.md)| | ### Return type -**[str]** +[**ImportGeoCollectionResponse**](ImportGeoCollectionResponse.md) ### Authorization @@ -4819,15 +5390,15 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json + - **Accept**: */* ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Retrieved list of translation tags. | - | +**200** | Successful import. | - | [[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) @@ -5221,6 +5792,73 @@ No authorization required [[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) +# **list_files** +> [GdStorageFile] list_files(data_source_id) + +List datasource files + +List all the files in the given data source. + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import actions_api +from gooddata_api_client.model.gd_storage_file import GdStorageFile +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = actions_api.ActionsApi(api_client) + data_source_id = "dataSourceId_example" # str | + + # example passing only required values which don't have defaults set + try: + # List datasource files + api_response = api_instance.list_files(data_source_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ActionsApi->list_files: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_source_id** | **str**| | + +### Return type + +[**[GdStorageFile]**](GdStorageFile.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful listing. | - | + +[[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) + # **list_workspace_user_groups** > WorkspaceUserGroups list_workspace_user_groups(workspace_id) @@ -6617,6 +7255,83 @@ No authorization required [[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) +# **read_csv_file_manifests** +> [ReadCsvFileManifestsResponse] read_csv_file_manifests(data_source_id, read_csv_file_manifests_request) + +Read CSV file manifests + +Read the manifests of the CSV files in the given data source. + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import actions_api +from gooddata_api_client.model.read_csv_file_manifests_response import ReadCsvFileManifestsResponse +from gooddata_api_client.model.read_csv_file_manifests_request import ReadCsvFileManifestsRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = actions_api.ActionsApi(api_client) + data_source_id = "dataSourceId_example" # str | + read_csv_file_manifests_request = ReadCsvFileManifestsRequest( + manifest_requests=[ + ReadCsvFileManifestsRequestItem( + file_name="file_name_example", + version=1, + ), + ], + ) # ReadCsvFileManifestsRequest | + + # example passing only required values which don't have defaults set + try: + # Read CSV file manifests + api_response = api_instance.read_csv_file_manifests(data_source_id, read_csv_file_manifests_request) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ActionsApi->read_csv_file_manifests: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_source_id** | **str**| | + **read_csv_file_manifests_request** | [**ReadCsvFileManifestsRequest**](ReadCsvFileManifestsRequest.md)| | + +### Return type + +[**[ReadCsvFileManifestsResponse]**](ReadCsvFileManifestsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful listing. | - | + +[[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_upload_notification** > register_upload_notification(data_source_id) @@ -7686,6 +8401,73 @@ No authorization required [[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) +# **staging_upload** +> UploadFileResponse staging_upload(file) + +Upload a file to the staging area + +Provides a location for uploading staging files. + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import actions_api +from gooddata_api_client.model.upload_file_response import UploadFileResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = actions_api.ActionsApi(api_client) + file = open('/path/to/file', 'rb') # file_type | The file to upload. + + # example passing only required values which don't have defaults set + try: + # Upload a file to the staging area + api_response = api_instance.staging_upload(file) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ActionsApi->staging_upload: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **file** | **file_type**| The file to upload. | + +### Return type + +[**UploadFileResponse**](UploadFileResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Upload was successful. | - | + +[[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) + # **switch_active_identity_provider** > switch_active_identity_provider(switch_identity_provider_request) diff --git a/gooddata-api-client/docs/AnalyticalDashboardControllerApi.md b/gooddata-api-client/docs/AnalyticalDashboardControllerApi.md new file mode 100644 index 000000000..f9c0b96bc --- /dev/null +++ b/gooddata-api-client/docs/AnalyticalDashboardControllerApi.md @@ -0,0 +1,673 @@ +# gooddata_api_client.AnalyticalDashboardControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_analytical_dashboards**](AnalyticalDashboardControllerApi.md#create_entity_analytical_dashboards) | **POST** /api/v1/entities/workspaces/{workspaceId}/analyticalDashboards | Post Dashboards +[**delete_entity_analytical_dashboards**](AnalyticalDashboardControllerApi.md#delete_entity_analytical_dashboards) | **DELETE** /api/v1/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId} | Delete a Dashboard +[**get_all_entities_analytical_dashboards**](AnalyticalDashboardControllerApi.md#get_all_entities_analytical_dashboards) | **GET** /api/v1/entities/workspaces/{workspaceId}/analyticalDashboards | Get all Dashboards +[**get_entity_analytical_dashboards**](AnalyticalDashboardControllerApi.md#get_entity_analytical_dashboards) | **GET** /api/v1/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId} | Get a Dashboard +[**patch_entity_analytical_dashboards**](AnalyticalDashboardControllerApi.md#patch_entity_analytical_dashboards) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId} | Patch a Dashboard +[**search_entities_analytical_dashboards**](AnalyticalDashboardControllerApi.md#search_entities_analytical_dashboards) | **POST** /api/v1/entities/workspaces/{workspaceId}/analyticalDashboards/search | The search endpoint (beta) +[**update_entity_analytical_dashboards**](AnalyticalDashboardControllerApi.md#update_entity_analytical_dashboards) | **PUT** /api/v1/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId} | Put Dashboards + + +# **create_entity_analytical_dashboards** +> JsonApiAnalyticalDashboardOutDocument create_entity_analytical_dashboards(workspace_id, json_api_analytical_dashboard_post_optional_id_document) + +Post Dashboards + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import analytical_dashboard_controller_api +from gooddata_api_client.model.json_api_analytical_dashboard_post_optional_id_document import JsonApiAnalyticalDashboardPostOptionalIdDocument +from gooddata_api_client.model.json_api_analytical_dashboard_out_document import JsonApiAnalyticalDashboardOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = analytical_dashboard_controller_api.AnalyticalDashboardControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_analytical_dashboard_post_optional_id_document = JsonApiAnalyticalDashboardPostOptionalIdDocument( + data=JsonApiAnalyticalDashboardPostOptionalId( + attributes=JsonApiAnalyticalDashboardInAttributes( + are_relations_valid=True, + content={}, + description="description_example", + summary="summary_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="analyticalDashboard", + ), + ) # JsonApiAnalyticalDashboardPostOptionalIdDocument | + include = [ + "createdBy,modifiedBy,certifiedBy,visualizationObjects,analyticalDashboards,labels,metrics,datasets,filterContexts,dashboardPlugins", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + meta_include = [ + "metaInclude=permissions,origin,accessInfo,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Post Dashboards + api_response = api_instance.create_entity_analytical_dashboards(workspace_id, json_api_analytical_dashboard_post_optional_id_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AnalyticalDashboardControllerApi->create_entity_analytical_dashboards: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post Dashboards + api_response = api_instance.create_entity_analytical_dashboards(workspace_id, json_api_analytical_dashboard_post_optional_id_document, include=include, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AnalyticalDashboardControllerApi->create_entity_analytical_dashboards: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_analytical_dashboard_post_optional_id_document** | [**JsonApiAnalyticalDashboardPostOptionalIdDocument**](JsonApiAnalyticalDashboardPostOptionalIdDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiAnalyticalDashboardOutDocument**](JsonApiAnalyticalDashboardOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_analytical_dashboards** +> delete_entity_analytical_dashboards(workspace_id, object_id) + +Delete a Dashboard + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import analytical_dashboard_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = analytical_dashboard_controller_api.AnalyticalDashboardControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete a Dashboard + api_instance.delete_entity_analytical_dashboards(workspace_id, object_id) + except gooddata_api_client.ApiException as e: + print("Exception when calling AnalyticalDashboardControllerApi->delete_entity_analytical_dashboards: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete a Dashboard + api_instance.delete_entity_analytical_dashboards(workspace_id, object_id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling AnalyticalDashboardControllerApi->delete_entity_analytical_dashboards: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_analytical_dashboards** +> JsonApiAnalyticalDashboardOutList get_all_entities_analytical_dashboards(workspace_id) + +Get all Dashboards + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import analytical_dashboard_controller_api +from gooddata_api_client.model.json_api_analytical_dashboard_out_list import JsonApiAnalyticalDashboardOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = analytical_dashboard_controller_api.AnalyticalDashboardControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,certifiedBy,visualizationObjects,analyticalDashboards,labels,metrics,datasets,filterContexts,dashboardPlugins", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=permissions,origin,accessInfo,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Dashboards + api_response = api_instance.get_all_entities_analytical_dashboards(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AnalyticalDashboardControllerApi->get_all_entities_analytical_dashboards: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Dashboards + api_response = api_instance.get_all_entities_analytical_dashboards(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AnalyticalDashboardControllerApi->get_all_entities_analytical_dashboards: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiAnalyticalDashboardOutList**](JsonApiAnalyticalDashboardOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_analytical_dashboards** +> JsonApiAnalyticalDashboardOutDocument get_entity_analytical_dashboards(workspace_id, object_id) + +Get a Dashboard + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import analytical_dashboard_controller_api +from gooddata_api_client.model.json_api_analytical_dashboard_out_document import JsonApiAnalyticalDashboardOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = analytical_dashboard_controller_api.AnalyticalDashboardControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,certifiedBy,visualizationObjects,analyticalDashboards,labels,metrics,datasets,filterContexts,dashboardPlugins", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=permissions,origin,accessInfo,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get a Dashboard + api_response = api_instance.get_entity_analytical_dashboards(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AnalyticalDashboardControllerApi->get_entity_analytical_dashboards: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a Dashboard + api_response = api_instance.get_entity_analytical_dashboards(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AnalyticalDashboardControllerApi->get_entity_analytical_dashboards: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiAnalyticalDashboardOutDocument**](JsonApiAnalyticalDashboardOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_analytical_dashboards** +> JsonApiAnalyticalDashboardOutDocument patch_entity_analytical_dashboards(workspace_id, object_id, json_api_analytical_dashboard_patch_document) + +Patch a Dashboard + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import analytical_dashboard_controller_api +from gooddata_api_client.model.json_api_analytical_dashboard_patch_document import JsonApiAnalyticalDashboardPatchDocument +from gooddata_api_client.model.json_api_analytical_dashboard_out_document import JsonApiAnalyticalDashboardOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = analytical_dashboard_controller_api.AnalyticalDashboardControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_analytical_dashboard_patch_document = JsonApiAnalyticalDashboardPatchDocument( + data=JsonApiAnalyticalDashboardPatch( + attributes=JsonApiAnalyticalDashboardPatchAttributes( + are_relations_valid=True, + content={}, + description="description_example", + summary="summary_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="analyticalDashboard", + ), + ) # JsonApiAnalyticalDashboardPatchDocument | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,certifiedBy,visualizationObjects,analyticalDashboards,labels,metrics,datasets,filterContexts,dashboardPlugins", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch a Dashboard + api_response = api_instance.patch_entity_analytical_dashboards(workspace_id, object_id, json_api_analytical_dashboard_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AnalyticalDashboardControllerApi->patch_entity_analytical_dashboards: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch a Dashboard + api_response = api_instance.patch_entity_analytical_dashboards(workspace_id, object_id, json_api_analytical_dashboard_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AnalyticalDashboardControllerApi->patch_entity_analytical_dashboards: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_analytical_dashboard_patch_document** | [**JsonApiAnalyticalDashboardPatchDocument**](JsonApiAnalyticalDashboardPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiAnalyticalDashboardOutDocument**](JsonApiAnalyticalDashboardOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_analytical_dashboards** +> JsonApiAnalyticalDashboardOutList search_entities_analytical_dashboards(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import analytical_dashboard_controller_api +from gooddata_api_client.model.json_api_analytical_dashboard_out_list import JsonApiAnalyticalDashboardOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = analytical_dashboard_controller_api.AnalyticalDashboardControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_analytical_dashboards(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AnalyticalDashboardControllerApi->search_entities_analytical_dashboards: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_analytical_dashboards(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AnalyticalDashboardControllerApi->search_entities_analytical_dashboards: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiAnalyticalDashboardOutList**](JsonApiAnalyticalDashboardOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_analytical_dashboards** +> JsonApiAnalyticalDashboardOutDocument update_entity_analytical_dashboards(workspace_id, object_id, json_api_analytical_dashboard_in_document) + +Put Dashboards + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import analytical_dashboard_controller_api +from gooddata_api_client.model.json_api_analytical_dashboard_in_document import JsonApiAnalyticalDashboardInDocument +from gooddata_api_client.model.json_api_analytical_dashboard_out_document import JsonApiAnalyticalDashboardOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = analytical_dashboard_controller_api.AnalyticalDashboardControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_analytical_dashboard_in_document = JsonApiAnalyticalDashboardInDocument( + data=JsonApiAnalyticalDashboardIn( + attributes=JsonApiAnalyticalDashboardInAttributes( + are_relations_valid=True, + content={}, + description="description_example", + summary="summary_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="analyticalDashboard", + ), + ) # JsonApiAnalyticalDashboardInDocument | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,certifiedBy,visualizationObjects,analyticalDashboards,labels,metrics,datasets,filterContexts,dashboardPlugins", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Put Dashboards + api_response = api_instance.update_entity_analytical_dashboards(workspace_id, object_id, json_api_analytical_dashboard_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AnalyticalDashboardControllerApi->update_entity_analytical_dashboards: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put Dashboards + api_response = api_instance.update_entity_analytical_dashboards(workspace_id, object_id, json_api_analytical_dashboard_in_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AnalyticalDashboardControllerApi->update_entity_analytical_dashboards: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_analytical_dashboard_in_document** | [**JsonApiAnalyticalDashboardInDocument**](JsonApiAnalyticalDashboardInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiAnalyticalDashboardOutDocument**](JsonApiAnalyticalDashboardOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/AnalyzeCsvRequest.md b/gooddata-api-client/docs/AnalyzeCsvRequest.md new file mode 100644 index 000000000..04eef7f28 --- /dev/null +++ b/gooddata-api-client/docs/AnalyzeCsvRequest.md @@ -0,0 +1,13 @@ +# AnalyzeCsvRequest + +Bulk CSV analysis request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analyze_requests** | [**[AnalyzeCsvRequestItem]**](AnalyzeCsvRequestItem.md) | List of individual CSV analysis requests. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/AnalyzeCsvRequestItem.md b/gooddata-api-client/docs/AnalyzeCsvRequestItem.md new file mode 100644 index 000000000..0a0af13a8 --- /dev/null +++ b/gooddata-api-client/docs/AnalyzeCsvRequestItem.md @@ -0,0 +1,14 @@ +# AnalyzeCsvRequestItem + +CSV analysis request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**location** | **str** | Location of the CSV file to analyze. | +**config** | [**AnalyzeCsvRequestItemConfig**](AnalyzeCsvRequestItemConfig.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/AnalyzeCsvRequestItemConfig.md b/gooddata-api-client/docs/AnalyzeCsvRequestItemConfig.md new file mode 100644 index 000000000..3e527c02c --- /dev/null +++ b/gooddata-api-client/docs/AnalyzeCsvRequestItemConfig.md @@ -0,0 +1,16 @@ +# AnalyzeCsvRequestItemConfig + +CSV analysis request config. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**delimiters** | **[str]** | Possible column delimiters. | [optional] +**header_detect_max_rows** | **int** | Maximum number of rows to work with during header detection. | [optional] +**header_row_count** | **int** | Number of rows to consider as header, if null, header will be detected. | [optional] +**result_rows** | **int** | Number of rows to return in the flight that represents analysis result. If 0, no rows are returned, if less than 0, all rows that were in the sample are returned. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/AnalyzeCsvResponse.md b/gooddata-api-client/docs/AnalyzeCsvResponse.md new file mode 100644 index 000000000..732ef7d25 --- /dev/null +++ b/gooddata-api-client/docs/AnalyzeCsvResponse.md @@ -0,0 +1,16 @@ +# AnalyzeCsvResponse + +Describes the results of a CSV analysis of a single file. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**columns** | [**[AnalyzeCsvResponseColumn]**](AnalyzeCsvResponseColumn.md) | List of column metadata. | +**location** | **str** | Location of the analyzed file in the source data source. | +**preview_data** | **[[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]]** | Preview of the first N rows of the file. | +**config** | [**AnalyzeCsvResponseConfig**](AnalyzeCsvResponseConfig.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/AnalyzeCsvResponseColumn.md b/gooddata-api-client/docs/AnalyzeCsvResponseColumn.md new file mode 100644 index 000000000..c7e18be1b --- /dev/null +++ b/gooddata-api-client/docs/AnalyzeCsvResponseColumn.md @@ -0,0 +1,15 @@ +# AnalyzeCsvResponseColumn + +Describes the result column. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the column as specified in the file (or autogenerated one if the file has no header). | +**type** | **str** | Type of the column (e.g. string, bool, etc.). | +**detected_date_formats** | **[str]** | List of date formats that can be used to parse this column as date. Null if there are none. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/AnalyzeCsvResponseConfig.md b/gooddata-api-client/docs/AnalyzeCsvResponseConfig.md new file mode 100644 index 000000000..8a1b46a8d --- /dev/null +++ b/gooddata-api-client/docs/AnalyzeCsvResponseConfig.md @@ -0,0 +1,15 @@ +# AnalyzeCsvResponseConfig + +Config used to process the CSV file. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**convert_options** | [**CsvConvertOptions**](CsvConvertOptions.md) | | [optional] +**parse_options** | [**CsvParseOptions**](CsvParseOptions.md) | | [optional] +**read_options** | [**CsvReadOptions**](CsvReadOptions.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ApiTokenControllerApi.md b/gooddata-api-client/docs/ApiTokenControllerApi.md new file mode 100644 index 000000000..ee8ae5568 --- /dev/null +++ b/gooddata-api-client/docs/ApiTokenControllerApi.md @@ -0,0 +1,326 @@ +# gooddata_api_client.ApiTokenControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_api_tokens**](ApiTokenControllerApi.md#create_entity_api_tokens) | **POST** /api/v1/entities/users/{userId}/apiTokens | Post a new API token for the user +[**delete_entity_api_tokens**](ApiTokenControllerApi.md#delete_entity_api_tokens) | **DELETE** /api/v1/entities/users/{userId}/apiTokens/{id} | Delete an API Token for a user +[**get_all_entities_api_tokens**](ApiTokenControllerApi.md#get_all_entities_api_tokens) | **GET** /api/v1/entities/users/{userId}/apiTokens | List all api tokens for a user +[**get_entity_api_tokens**](ApiTokenControllerApi.md#get_entity_api_tokens) | **GET** /api/v1/entities/users/{userId}/apiTokens/{id} | Get an API Token for a user + + +# **create_entity_api_tokens** +> JsonApiApiTokenOutDocument create_entity_api_tokens(user_id, json_api_api_token_in_document) + +Post a new API token for the user + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import api_token_controller_api +from gooddata_api_client.model.json_api_api_token_out_document import JsonApiApiTokenOutDocument +from gooddata_api_client.model.json_api_api_token_in_document import JsonApiApiTokenInDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = api_token_controller_api.ApiTokenControllerApi(api_client) + user_id = "userId_example" # str | + json_api_api_token_in_document = JsonApiApiTokenInDocument( + data=JsonApiApiTokenIn( + id="id1", + type="apiToken", + ), + ) # JsonApiApiTokenInDocument | + + # example passing only required values which don't have defaults set + try: + # Post a new API token for the user + api_response = api_instance.create_entity_api_tokens(user_id, json_api_api_token_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ApiTokenControllerApi->create_entity_api_tokens: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **json_api_api_token_in_document** | [**JsonApiApiTokenInDocument**](JsonApiApiTokenInDocument.md)| | + +### Return type + +[**JsonApiApiTokenOutDocument**](JsonApiApiTokenOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_api_tokens** +> delete_entity_api_tokens(user_id, id) + +Delete an API Token for a user + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import api_token_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = api_token_controller_api.ApiTokenControllerApi(api_client) + user_id = "userId_example" # str | + id = "/6bUUGjjNSwg0_bs" # str | + filter = "bearerToken==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete an API Token for a user + api_instance.delete_entity_api_tokens(user_id, id) + except gooddata_api_client.ApiException as e: + print("Exception when calling ApiTokenControllerApi->delete_entity_api_tokens: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete an API Token for a user + api_instance.delete_entity_api_tokens(user_id, id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling ApiTokenControllerApi->delete_entity_api_tokens: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_api_tokens** +> JsonApiApiTokenOutList get_all_entities_api_tokens(user_id) + +List all api tokens for a user + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import api_token_controller_api +from gooddata_api_client.model.json_api_api_token_out_list import JsonApiApiTokenOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = api_token_controller_api.ApiTokenControllerApi(api_client) + user_id = "userId_example" # str | + filter = "bearerToken==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + meta_include = [ + "metaInclude=page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # List all api tokens for a user + api_response = api_instance.get_all_entities_api_tokens(user_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ApiTokenControllerApi->get_all_entities_api_tokens: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List all api tokens for a user + api_response = api_instance.get_all_entities_api_tokens(user_id, filter=filter, page=page, size=size, sort=sort, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ApiTokenControllerApi->get_all_entities_api_tokens: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiApiTokenOutList**](JsonApiApiTokenOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_api_tokens** +> JsonApiApiTokenOutDocument get_entity_api_tokens(user_id, id) + +Get an API Token for a user + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import api_token_controller_api +from gooddata_api_client.model.json_api_api_token_out_document import JsonApiApiTokenOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = api_token_controller_api.ApiTokenControllerApi(api_client) + user_id = "userId_example" # str | + id = "/6bUUGjjNSwg0_bs" # str | + filter = "bearerToken==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Get an API Token for a user + api_response = api_instance.get_entity_api_tokens(user_id, id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ApiTokenControllerApi->get_entity_api_tokens: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get an API Token for a user + api_response = api_instance.get_entity_api_tokens(user_id, id, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ApiTokenControllerApi->get_entity_api_tokens: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiApiTokenOutDocument**](JsonApiApiTokenOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/AttributeControllerApi.md b/gooddata-api-client/docs/AttributeControllerApi.md new file mode 100644 index 000000000..d07288168 --- /dev/null +++ b/gooddata-api-client/docs/AttributeControllerApi.md @@ -0,0 +1,397 @@ +# gooddata_api_client.AttributeControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_all_entities_attributes**](AttributeControllerApi.md#get_all_entities_attributes) | **GET** /api/v1/entities/workspaces/{workspaceId}/attributes | Get all Attributes +[**get_entity_attributes**](AttributeControllerApi.md#get_entity_attributes) | **GET** /api/v1/entities/workspaces/{workspaceId}/attributes/{objectId} | Get an Attribute +[**patch_entity_attributes**](AttributeControllerApi.md#patch_entity_attributes) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/attributes/{objectId} | Patch an Attribute (beta) +[**search_entities_attributes**](AttributeControllerApi.md#search_entities_attributes) | **POST** /api/v1/entities/workspaces/{workspaceId}/attributes/search | The search endpoint (beta) + + +# **get_all_entities_attributes** +> JsonApiAttributeOutList get_all_entities_attributes(workspace_id) + +Get all Attributes + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import attribute_controller_api +from gooddata_api_client.model.json_api_attribute_out_list import JsonApiAttributeOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = attribute_controller_api.AttributeControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString;dataset.id==321;defaultView.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "dataset,defaultView,labels,attributeHierarchies", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Attributes + api_response = api_instance.get_all_entities_attributes(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeControllerApi->get_all_entities_attributes: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Attributes + api_response = api_instance.get_all_entities_attributes(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeControllerApi->get_all_entities_attributes: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiAttributeOutList**](JsonApiAttributeOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_attributes** +> JsonApiAttributeOutDocument get_entity_attributes(workspace_id, object_id) + +Get an Attribute + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import attribute_controller_api +from gooddata_api_client.model.json_api_attribute_out_document import JsonApiAttributeOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = attribute_controller_api.AttributeControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;dataset.id==321;defaultView.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "dataset,defaultView,labels,attributeHierarchies", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get an Attribute + api_response = api_instance.get_entity_attributes(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeControllerApi->get_entity_attributes: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get an Attribute + api_response = api_instance.get_entity_attributes(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeControllerApi->get_entity_attributes: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiAttributeOutDocument**](JsonApiAttributeOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_attributes** +> JsonApiAttributeOutDocument patch_entity_attributes(workspace_id, object_id, json_api_attribute_patch_document) + +Patch an Attribute (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import attribute_controller_api +from gooddata_api_client.model.json_api_attribute_patch_document import JsonApiAttributePatchDocument +from gooddata_api_client.model.json_api_attribute_out_document import JsonApiAttributeOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = attribute_controller_api.AttributeControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_attribute_patch_document = JsonApiAttributePatchDocument( + data=JsonApiAttributePatch( + attributes=JsonApiAttributePatchAttributes( + description="description_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + relationships=JsonApiAttributePatchRelationships( + default_view=JsonApiAttributeOutRelationshipsDefaultView( + data=JsonApiLabelToOneLinkage(None), + ), + ), + type="attribute", + ), + ) # JsonApiAttributePatchDocument | + filter = "title==someString;description==someString;dataset.id==321;defaultView.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "dataset,defaultView,labels,attributeHierarchies", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch an Attribute (beta) + api_response = api_instance.patch_entity_attributes(workspace_id, object_id, json_api_attribute_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeControllerApi->patch_entity_attributes: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch an Attribute (beta) + api_response = api_instance.patch_entity_attributes(workspace_id, object_id, json_api_attribute_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeControllerApi->patch_entity_attributes: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_attribute_patch_document** | [**JsonApiAttributePatchDocument**](JsonApiAttributePatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiAttributeOutDocument**](JsonApiAttributeOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_attributes** +> JsonApiAttributeOutList search_entities_attributes(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import attribute_controller_api +from gooddata_api_client.model.json_api_attribute_out_list import JsonApiAttributeOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = attribute_controller_api.AttributeControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_attributes(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeControllerApi->search_entities_attributes: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_attributes(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeControllerApi->search_entities_attributes: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiAttributeOutList**](JsonApiAttributeOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/AttributeHierarchyControllerApi.md b/gooddata-api-client/docs/AttributeHierarchyControllerApi.md new file mode 100644 index 000000000..f963340f3 --- /dev/null +++ b/gooddata-api-client/docs/AttributeHierarchyControllerApi.md @@ -0,0 +1,670 @@ +# gooddata_api_client.AttributeHierarchyControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_attribute_hierarchies**](AttributeHierarchyControllerApi.md#create_entity_attribute_hierarchies) | **POST** /api/v1/entities/workspaces/{workspaceId}/attributeHierarchies | Post Attribute Hierarchies +[**delete_entity_attribute_hierarchies**](AttributeHierarchyControllerApi.md#delete_entity_attribute_hierarchies) | **DELETE** /api/v1/entities/workspaces/{workspaceId}/attributeHierarchies/{objectId} | Delete an Attribute Hierarchy +[**get_all_entities_attribute_hierarchies**](AttributeHierarchyControllerApi.md#get_all_entities_attribute_hierarchies) | **GET** /api/v1/entities/workspaces/{workspaceId}/attributeHierarchies | Get all Attribute Hierarchies +[**get_entity_attribute_hierarchies**](AttributeHierarchyControllerApi.md#get_entity_attribute_hierarchies) | **GET** /api/v1/entities/workspaces/{workspaceId}/attributeHierarchies/{objectId} | Get an Attribute Hierarchy +[**patch_entity_attribute_hierarchies**](AttributeHierarchyControllerApi.md#patch_entity_attribute_hierarchies) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/attributeHierarchies/{objectId} | Patch an Attribute Hierarchy +[**search_entities_attribute_hierarchies**](AttributeHierarchyControllerApi.md#search_entities_attribute_hierarchies) | **POST** /api/v1/entities/workspaces/{workspaceId}/attributeHierarchies/search | The search endpoint (beta) +[**update_entity_attribute_hierarchies**](AttributeHierarchyControllerApi.md#update_entity_attribute_hierarchies) | **PUT** /api/v1/entities/workspaces/{workspaceId}/attributeHierarchies/{objectId} | Put an Attribute Hierarchy + + +# **create_entity_attribute_hierarchies** +> JsonApiAttributeHierarchyOutDocument create_entity_attribute_hierarchies(workspace_id, json_api_attribute_hierarchy_in_document) + +Post Attribute Hierarchies + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import attribute_hierarchy_controller_api +from gooddata_api_client.model.json_api_attribute_hierarchy_in_document import JsonApiAttributeHierarchyInDocument +from gooddata_api_client.model.json_api_attribute_hierarchy_out_document import JsonApiAttributeHierarchyOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = attribute_hierarchy_controller_api.AttributeHierarchyControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_attribute_hierarchy_in_document = JsonApiAttributeHierarchyInDocument( + data=JsonApiAttributeHierarchyIn( + attributes=JsonApiAttributeHierarchyInAttributes( + are_relations_valid=True, + content={}, + description="description_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="attributeHierarchy", + ), + ) # JsonApiAttributeHierarchyInDocument | + include = [ + "createdBy,modifiedBy,attributes", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Post Attribute Hierarchies + api_response = api_instance.create_entity_attribute_hierarchies(workspace_id, json_api_attribute_hierarchy_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeHierarchyControllerApi->create_entity_attribute_hierarchies: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post Attribute Hierarchies + api_response = api_instance.create_entity_attribute_hierarchies(workspace_id, json_api_attribute_hierarchy_in_document, include=include, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeHierarchyControllerApi->create_entity_attribute_hierarchies: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_attribute_hierarchy_in_document** | [**JsonApiAttributeHierarchyInDocument**](JsonApiAttributeHierarchyInDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiAttributeHierarchyOutDocument**](JsonApiAttributeHierarchyOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_attribute_hierarchies** +> delete_entity_attribute_hierarchies(workspace_id, object_id) + +Delete an Attribute Hierarchy + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import attribute_hierarchy_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = attribute_hierarchy_controller_api.AttributeHierarchyControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete an Attribute Hierarchy + api_instance.delete_entity_attribute_hierarchies(workspace_id, object_id) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeHierarchyControllerApi->delete_entity_attribute_hierarchies: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete an Attribute Hierarchy + api_instance.delete_entity_attribute_hierarchies(workspace_id, object_id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeHierarchyControllerApi->delete_entity_attribute_hierarchies: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_attribute_hierarchies** +> JsonApiAttributeHierarchyOutList get_all_entities_attribute_hierarchies(workspace_id) + +Get all Attribute Hierarchies + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import attribute_hierarchy_controller_api +from gooddata_api_client.model.json_api_attribute_hierarchy_out_list import JsonApiAttributeHierarchyOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = attribute_hierarchy_controller_api.AttributeHierarchyControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,attributes", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Attribute Hierarchies + api_response = api_instance.get_all_entities_attribute_hierarchies(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeHierarchyControllerApi->get_all_entities_attribute_hierarchies: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Attribute Hierarchies + api_response = api_instance.get_all_entities_attribute_hierarchies(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeHierarchyControllerApi->get_all_entities_attribute_hierarchies: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiAttributeHierarchyOutList**](JsonApiAttributeHierarchyOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_attribute_hierarchies** +> JsonApiAttributeHierarchyOutDocument get_entity_attribute_hierarchies(workspace_id, object_id) + +Get an Attribute Hierarchy + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import attribute_hierarchy_controller_api +from gooddata_api_client.model.json_api_attribute_hierarchy_out_document import JsonApiAttributeHierarchyOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = attribute_hierarchy_controller_api.AttributeHierarchyControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,attributes", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get an Attribute Hierarchy + api_response = api_instance.get_entity_attribute_hierarchies(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeHierarchyControllerApi->get_entity_attribute_hierarchies: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get an Attribute Hierarchy + api_response = api_instance.get_entity_attribute_hierarchies(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeHierarchyControllerApi->get_entity_attribute_hierarchies: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiAttributeHierarchyOutDocument**](JsonApiAttributeHierarchyOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_attribute_hierarchies** +> JsonApiAttributeHierarchyOutDocument patch_entity_attribute_hierarchies(workspace_id, object_id, json_api_attribute_hierarchy_patch_document) + +Patch an Attribute Hierarchy + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import attribute_hierarchy_controller_api +from gooddata_api_client.model.json_api_attribute_hierarchy_patch_document import JsonApiAttributeHierarchyPatchDocument +from gooddata_api_client.model.json_api_attribute_hierarchy_out_document import JsonApiAttributeHierarchyOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = attribute_hierarchy_controller_api.AttributeHierarchyControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_attribute_hierarchy_patch_document = JsonApiAttributeHierarchyPatchDocument( + data=JsonApiAttributeHierarchyPatch( + attributes=JsonApiAttributeHierarchyInAttributes( + are_relations_valid=True, + content={}, + description="description_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="attributeHierarchy", + ), + ) # JsonApiAttributeHierarchyPatchDocument | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,attributes", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch an Attribute Hierarchy + api_response = api_instance.patch_entity_attribute_hierarchies(workspace_id, object_id, json_api_attribute_hierarchy_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeHierarchyControllerApi->patch_entity_attribute_hierarchies: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch an Attribute Hierarchy + api_response = api_instance.patch_entity_attribute_hierarchies(workspace_id, object_id, json_api_attribute_hierarchy_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeHierarchyControllerApi->patch_entity_attribute_hierarchies: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_attribute_hierarchy_patch_document** | [**JsonApiAttributeHierarchyPatchDocument**](JsonApiAttributeHierarchyPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiAttributeHierarchyOutDocument**](JsonApiAttributeHierarchyOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_attribute_hierarchies** +> JsonApiAttributeHierarchyOutList search_entities_attribute_hierarchies(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import attribute_hierarchy_controller_api +from gooddata_api_client.model.json_api_attribute_hierarchy_out_list import JsonApiAttributeHierarchyOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = attribute_hierarchy_controller_api.AttributeHierarchyControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_attribute_hierarchies(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeHierarchyControllerApi->search_entities_attribute_hierarchies: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_attribute_hierarchies(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeHierarchyControllerApi->search_entities_attribute_hierarchies: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiAttributeHierarchyOutList**](JsonApiAttributeHierarchyOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_attribute_hierarchies** +> JsonApiAttributeHierarchyOutDocument update_entity_attribute_hierarchies(workspace_id, object_id, json_api_attribute_hierarchy_in_document) + +Put an Attribute Hierarchy + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import attribute_hierarchy_controller_api +from gooddata_api_client.model.json_api_attribute_hierarchy_in_document import JsonApiAttributeHierarchyInDocument +from gooddata_api_client.model.json_api_attribute_hierarchy_out_document import JsonApiAttributeHierarchyOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = attribute_hierarchy_controller_api.AttributeHierarchyControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_attribute_hierarchy_in_document = JsonApiAttributeHierarchyInDocument( + data=JsonApiAttributeHierarchyIn( + attributes=JsonApiAttributeHierarchyInAttributes( + are_relations_valid=True, + content={}, + description="description_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="attributeHierarchy", + ), + ) # JsonApiAttributeHierarchyInDocument | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,attributes", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Put an Attribute Hierarchy + api_response = api_instance.update_entity_attribute_hierarchies(workspace_id, object_id, json_api_attribute_hierarchy_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeHierarchyControllerApi->update_entity_attribute_hierarchies: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put an Attribute Hierarchy + api_response = api_instance.update_entity_attribute_hierarchies(workspace_id, object_id, json_api_attribute_hierarchy_in_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AttributeHierarchyControllerApi->update_entity_attribute_hierarchies: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_attribute_hierarchy_in_document** | [**JsonApiAttributeHierarchyInDocument**](JsonApiAttributeHierarchyInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiAttributeHierarchyOutDocument**](JsonApiAttributeHierarchyOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/AutomationControllerApi.md b/gooddata-api-client/docs/AutomationControllerApi.md new file mode 100644 index 000000000..b569d9d9d --- /dev/null +++ b/gooddata-api-client/docs/AutomationControllerApi.md @@ -0,0 +1,1441 @@ +# gooddata_api_client.AutomationControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_automations**](AutomationControllerApi.md#create_entity_automations) | **POST** /api/v1/entities/workspaces/{workspaceId}/automations | Post Automations +[**delete_entity_automations**](AutomationControllerApi.md#delete_entity_automations) | **DELETE** /api/v1/entities/workspaces/{workspaceId}/automations/{objectId} | Delete an Automation +[**get_all_entities_automations**](AutomationControllerApi.md#get_all_entities_automations) | **GET** /api/v1/entities/workspaces/{workspaceId}/automations | Get all Automations +[**get_entity_automations**](AutomationControllerApi.md#get_entity_automations) | **GET** /api/v1/entities/workspaces/{workspaceId}/automations/{objectId} | Get an Automation +[**patch_entity_automations**](AutomationControllerApi.md#patch_entity_automations) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/automations/{objectId} | Patch an Automation +[**search_entities_automations**](AutomationControllerApi.md#search_entities_automations) | **POST** /api/v1/entities/workspaces/{workspaceId}/automations/search | The search endpoint (beta) +[**update_entity_automations**](AutomationControllerApi.md#update_entity_automations) | **PUT** /api/v1/entities/workspaces/{workspaceId}/automations/{objectId} | Put an Automation + + +# **create_entity_automations** +> JsonApiAutomationOutDocument create_entity_automations(workspace_id, json_api_automation_in_document) + +Post Automations + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import automation_controller_api +from gooddata_api_client.model.json_api_automation_in_document import JsonApiAutomationInDocument +from gooddata_api_client.model.json_api_automation_out_document import JsonApiAutomationOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = automation_controller_api.AutomationControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_automation_in_document = JsonApiAutomationInDocument( + data=JsonApiAutomationIn( + attributes=JsonApiAutomationInAttributes( + alert=JsonApiAutomationInAttributesAlert( + condition=AlertCondition(), + execution=AlertAfm( + attributes=[ + AttributeItem( + label=AfmObjectIdentifierLabel( + identifier=AfmObjectIdentifierLabelIdentifier( + id="sample_item.price", + type="label", + ), + ), + local_identifier="attribute_1", + show_all_values=False, + ), + ], + aux_measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + filters=[ + FilterDefinition(), + ], + measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + ), + interval="DAY", + trigger="ALWAYS", + ), + are_relations_valid=True, + dashboard_tabular_exports=[ + JsonApiAutomationInAttributesDashboardTabularExportsInner( + request_payload=DashboardTabularExportRequestV2( + dashboard_filters_override=[ + DashboardFilter(), + ], + dashboard_id="761cd28b-3f57-4ac9-bbdc-1c552cc0d1d0", + dashboard_tabs_filters_overrides={ + "key": [ + DashboardFilter(), + ], + }, + file_name="result", + format="XLSX", + settings=DashboardExportSettings( + export_info=True, + merge_headers=True, + page_orientation="PORTRAIT", + page_size="A4", + ), + widget_ids=[ + "widget_ids_example", + ], + ), + ), + ], + description="description_example", + details={}, + evaluation_mode="SHARED", + external_recipients=[ + JsonApiAutomationInAttributesExternalRecipientsInner( + email="email_example", + ), + ], + image_exports=[ + JsonApiAutomationInAttributesImageExportsInner( + request_payload=ImageExportRequest( + dashboard_id="761cd28b-3f57-4ac9-bbdc-1c552cc0d1d0", + file_name="filename", + format="PNG", + metadata=JsonNode(), + widget_ids=[ + "widget_ids_example", + ], + ), + ), + ], + metadata=JsonApiAutomationInAttributesMetadata(), + raw_exports=[ + JsonApiAutomationInAttributesRawExportsInner( + request_payload=RawExportAutomationRequest( + custom_override=RawCustomOverride( + labels={ + "key": RawCustomLabel( + title="title_example", + ), + }, + metrics={ + "key": RawCustomMetric( + title="title_example", + ), + }, + ), + delimiter="U", + execution=AFM( + attributes=[ + AttributeItem( + label=AfmObjectIdentifierLabel( + identifier=AfmObjectIdentifierLabelIdentifier( + id="sample_item.price", + type="label", + ), + ), + local_identifier="attribute_1", + show_all_values=False, + ), + ], + aux_measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + filters=[ + FilterDefinition(), + ], + measure_definition_overrides=[ + MetricDefinitionOverride( + definition=InlineMeasureDefinition( + inline=InlineMeasureDefinitionInline( + maql="maql_example", + ), + ), + item=AfmObjectIdentifierCore( + identifier=AfmObjectIdentifierCoreIdentifier( + id="sample_item.price", + type="attribute", + ), + ), + ), + ], + measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + ), + execution_settings=ExecutionSettings( + data_sampling_percentage=0, + timestamp=dateutil_parser('1970-01-01T00:00:00.00Z'), + ), + file_name="result", + format="CSV", + metadata=JsonNode(), + ), + ), + ], + schedule=JsonApiAutomationInAttributesSchedule( + cron="0 */30 9-17 ? * MON-FRI", + first_run=dateutil_parser('2025-01-01T12:00:00Z'), + timezone="Europe/Prague", + ), + slides_exports=[ + JsonApiAutomationInAttributesSlidesExportsInner( + request_payload=SlidesExportRequest( + dashboard_id="761cd28b-3f57-4ac9-bbdc-1c552cc0d1d0", + file_name="filename", + format="PDF", + metadata=JsonNode(), + template_id="template_id_example", + visualization_ids=[ + "visualization_ids_example", + ], + widget_ids=[ + "widget_ids_example", + ], + ), + ), + ], + state="ACTIVE", + tabular_exports=[ + JsonApiAutomationInAttributesTabularExportsInner( + request_payload=TabularExportRequest( + custom_override=CustomOverride( + labels={ + "key": CustomLabel( + title="title_example", + ), + }, + metrics={ + "key": CustomMetric( + format="format_example", + title="title_example", + ), + }, + ), + execution_result="ff483727196c9dc862c7fd3a5a84df55c96d61a4", + file_name="result", + format="CSV", + metadata=JsonNode(), + related_dashboard_id="761cd28b-3f57-4ac9-bbdc-1c552cc0d1d0", + settings=Settings( + delimiter="U", + export_info=True, + grand_totals_position="pinnedBottom", + merge_headers=True, + page_orientation="PORTRAIT", + page_size="A4", + pdf_page_size="a4 landscape", + pdf_table_style=[ + PdfTableStyle( + properties=[ + PdfTableStyleProperty( + key="key_example", + value="value_example", + ), + ], + selector="selector_example", + ), + ], + pdf_top_left_content="Good", + pdf_top_right_content="Morning", + show_filters=False, + ), + visualization_object="f7c359bc-c230-4487-b15b-ad9685bcb537", + visualization_object_custom_filters=[ + {}, + ], + ), + ), + ], + tags=[ + "tags_example", + ], + title="title_example", + visual_exports=[ + JsonApiAutomationInAttributesVisualExportsInner( + request_payload=VisualExportRequest( + dashboard_id="761cd28b-3f57-4ac9-bbdc-1c552cc0d1d0", + file_name="filename", + metadata={}, + ), + ), + ], + ), + id="id1", + relationships=JsonApiAutomationInRelationships( + analytical_dashboard=JsonApiAutomationInRelationshipsAnalyticalDashboard( + data=JsonApiAnalyticalDashboardToOneLinkage(None), + ), + export_definitions=JsonApiAutomationInRelationshipsExportDefinitions( + data=JsonApiExportDefinitionToManyLinkage([ + JsonApiExportDefinitionLinkage( + id="id_example", + type="exportDefinition", + ), + ]), + ), + notification_channel=JsonApiAutomationInRelationshipsNotificationChannel( + data=JsonApiNotificationChannelToOneLinkage(None), + ), + recipients=JsonApiAutomationInRelationshipsRecipients( + data=JsonApiUserToManyLinkage([ + JsonApiUserLinkage( + id="id_example", + type="user", + ), + ]), + ), + ), + type="automation", + ), + ) # JsonApiAutomationInDocument | + include = [ + "notificationChannel,analyticalDashboard,createdBy,modifiedBy,exportDefinitions,recipients,automationResults", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Post Automations + api_response = api_instance.create_entity_automations(workspace_id, json_api_automation_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AutomationControllerApi->create_entity_automations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post Automations + api_response = api_instance.create_entity_automations(workspace_id, json_api_automation_in_document, include=include, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AutomationControllerApi->create_entity_automations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_automation_in_document** | [**JsonApiAutomationInDocument**](JsonApiAutomationInDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiAutomationOutDocument**](JsonApiAutomationOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_automations** +> delete_entity_automations(workspace_id, object_id) + +Delete an Automation + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import automation_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = automation_controller_api.AutomationControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;notificationChannel.id==321;analyticalDashboard.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete an Automation + api_instance.delete_entity_automations(workspace_id, object_id) + except gooddata_api_client.ApiException as e: + print("Exception when calling AutomationControllerApi->delete_entity_automations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete an Automation + api_instance.delete_entity_automations(workspace_id, object_id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling AutomationControllerApi->delete_entity_automations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_automations** +> JsonApiAutomationOutList get_all_entities_automations(workspace_id) + +Get all Automations + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import automation_controller_api +from gooddata_api_client.model.json_api_automation_out_list import JsonApiAutomationOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = automation_controller_api.AutomationControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString;notificationChannel.id==321;analyticalDashboard.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "notificationChannel,analyticalDashboard,createdBy,modifiedBy,exportDefinitions,recipients,automationResults", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Automations + api_response = api_instance.get_all_entities_automations(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AutomationControllerApi->get_all_entities_automations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Automations + api_response = api_instance.get_all_entities_automations(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AutomationControllerApi->get_all_entities_automations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiAutomationOutList**](JsonApiAutomationOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_automations** +> JsonApiAutomationOutDocument get_entity_automations(workspace_id, object_id) + +Get an Automation + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import automation_controller_api +from gooddata_api_client.model.json_api_automation_out_document import JsonApiAutomationOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = automation_controller_api.AutomationControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;notificationChannel.id==321;analyticalDashboard.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "notificationChannel,analyticalDashboard,createdBy,modifiedBy,exportDefinitions,recipients,automationResults", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get an Automation + api_response = api_instance.get_entity_automations(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AutomationControllerApi->get_entity_automations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get an Automation + api_response = api_instance.get_entity_automations(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AutomationControllerApi->get_entity_automations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiAutomationOutDocument**](JsonApiAutomationOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_automations** +> JsonApiAutomationOutDocument patch_entity_automations(workspace_id, object_id, json_api_automation_patch_document) + +Patch an Automation + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import automation_controller_api +from gooddata_api_client.model.json_api_automation_out_document import JsonApiAutomationOutDocument +from gooddata_api_client.model.json_api_automation_patch_document import JsonApiAutomationPatchDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = automation_controller_api.AutomationControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_automation_patch_document = JsonApiAutomationPatchDocument( + data=JsonApiAutomationPatch( + attributes=JsonApiAutomationInAttributes( + alert=JsonApiAutomationInAttributesAlert( + condition=AlertCondition(), + execution=AlertAfm( + attributes=[ + AttributeItem( + label=AfmObjectIdentifierLabel( + identifier=AfmObjectIdentifierLabelIdentifier( + id="sample_item.price", + type="label", + ), + ), + local_identifier="attribute_1", + show_all_values=False, + ), + ], + aux_measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + filters=[ + FilterDefinition(), + ], + measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + ), + interval="DAY", + trigger="ALWAYS", + ), + are_relations_valid=True, + dashboard_tabular_exports=[ + JsonApiAutomationInAttributesDashboardTabularExportsInner( + request_payload=DashboardTabularExportRequestV2( + dashboard_filters_override=[ + DashboardFilter(), + ], + dashboard_id="761cd28b-3f57-4ac9-bbdc-1c552cc0d1d0", + dashboard_tabs_filters_overrides={ + "key": [ + DashboardFilter(), + ], + }, + file_name="result", + format="XLSX", + settings=DashboardExportSettings( + export_info=True, + merge_headers=True, + page_orientation="PORTRAIT", + page_size="A4", + ), + widget_ids=[ + "widget_ids_example", + ], + ), + ), + ], + description="description_example", + details={}, + evaluation_mode="SHARED", + external_recipients=[ + JsonApiAutomationInAttributesExternalRecipientsInner( + email="email_example", + ), + ], + image_exports=[ + JsonApiAutomationInAttributesImageExportsInner( + request_payload=ImageExportRequest( + dashboard_id="761cd28b-3f57-4ac9-bbdc-1c552cc0d1d0", + file_name="filename", + format="PNG", + metadata=JsonNode(), + widget_ids=[ + "widget_ids_example", + ], + ), + ), + ], + metadata=JsonApiAutomationInAttributesMetadata(), + raw_exports=[ + JsonApiAutomationInAttributesRawExportsInner( + request_payload=RawExportAutomationRequest( + custom_override=RawCustomOverride( + labels={ + "key": RawCustomLabel( + title="title_example", + ), + }, + metrics={ + "key": RawCustomMetric( + title="title_example", + ), + }, + ), + delimiter="U", + execution=AFM( + attributes=[ + AttributeItem( + label=AfmObjectIdentifierLabel( + identifier=AfmObjectIdentifierLabelIdentifier( + id="sample_item.price", + type="label", + ), + ), + local_identifier="attribute_1", + show_all_values=False, + ), + ], + aux_measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + filters=[ + FilterDefinition(), + ], + measure_definition_overrides=[ + MetricDefinitionOverride( + definition=InlineMeasureDefinition( + inline=InlineMeasureDefinitionInline( + maql="maql_example", + ), + ), + item=AfmObjectIdentifierCore( + identifier=AfmObjectIdentifierCoreIdentifier( + id="sample_item.price", + type="attribute", + ), + ), + ), + ], + measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + ), + execution_settings=ExecutionSettings( + data_sampling_percentage=0, + timestamp=dateutil_parser('1970-01-01T00:00:00.00Z'), + ), + file_name="result", + format="CSV", + metadata=JsonNode(), + ), + ), + ], + schedule=JsonApiAutomationInAttributesSchedule( + cron="0 */30 9-17 ? * MON-FRI", + first_run=dateutil_parser('2025-01-01T12:00:00Z'), + timezone="Europe/Prague", + ), + slides_exports=[ + JsonApiAutomationInAttributesSlidesExportsInner( + request_payload=SlidesExportRequest( + dashboard_id="761cd28b-3f57-4ac9-bbdc-1c552cc0d1d0", + file_name="filename", + format="PDF", + metadata=JsonNode(), + template_id="template_id_example", + visualization_ids=[ + "visualization_ids_example", + ], + widget_ids=[ + "widget_ids_example", + ], + ), + ), + ], + state="ACTIVE", + tabular_exports=[ + JsonApiAutomationInAttributesTabularExportsInner( + request_payload=TabularExportRequest( + custom_override=CustomOverride( + labels={ + "key": CustomLabel( + title="title_example", + ), + }, + metrics={ + "key": CustomMetric( + format="format_example", + title="title_example", + ), + }, + ), + execution_result="ff483727196c9dc862c7fd3a5a84df55c96d61a4", + file_name="result", + format="CSV", + metadata=JsonNode(), + related_dashboard_id="761cd28b-3f57-4ac9-bbdc-1c552cc0d1d0", + settings=Settings( + delimiter="U", + export_info=True, + grand_totals_position="pinnedBottom", + merge_headers=True, + page_orientation="PORTRAIT", + page_size="A4", + pdf_page_size="a4 landscape", + pdf_table_style=[ + PdfTableStyle( + properties=[ + PdfTableStyleProperty( + key="key_example", + value="value_example", + ), + ], + selector="selector_example", + ), + ], + pdf_top_left_content="Good", + pdf_top_right_content="Morning", + show_filters=False, + ), + visualization_object="f7c359bc-c230-4487-b15b-ad9685bcb537", + visualization_object_custom_filters=[ + {}, + ], + ), + ), + ], + tags=[ + "tags_example", + ], + title="title_example", + visual_exports=[ + JsonApiAutomationInAttributesVisualExportsInner( + request_payload=VisualExportRequest( + dashboard_id="761cd28b-3f57-4ac9-bbdc-1c552cc0d1d0", + file_name="filename", + metadata={}, + ), + ), + ], + ), + id="id1", + relationships=JsonApiAutomationInRelationships( + analytical_dashboard=JsonApiAutomationInRelationshipsAnalyticalDashboard( + data=JsonApiAnalyticalDashboardToOneLinkage(None), + ), + export_definitions=JsonApiAutomationInRelationshipsExportDefinitions( + data=JsonApiExportDefinitionToManyLinkage([ + JsonApiExportDefinitionLinkage( + id="id_example", + type="exportDefinition", + ), + ]), + ), + notification_channel=JsonApiAutomationInRelationshipsNotificationChannel( + data=JsonApiNotificationChannelToOneLinkage(None), + ), + recipients=JsonApiAutomationInRelationshipsRecipients( + data=JsonApiUserToManyLinkage([ + JsonApiUserLinkage( + id="id_example", + type="user", + ), + ]), + ), + ), + type="automation", + ), + ) # JsonApiAutomationPatchDocument | + filter = "title==someString;description==someString;notificationChannel.id==321;analyticalDashboard.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "notificationChannel,analyticalDashboard,createdBy,modifiedBy,exportDefinitions,recipients,automationResults", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch an Automation + api_response = api_instance.patch_entity_automations(workspace_id, object_id, json_api_automation_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AutomationControllerApi->patch_entity_automations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch an Automation + api_response = api_instance.patch_entity_automations(workspace_id, object_id, json_api_automation_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AutomationControllerApi->patch_entity_automations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_automation_patch_document** | [**JsonApiAutomationPatchDocument**](JsonApiAutomationPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiAutomationOutDocument**](JsonApiAutomationOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_automations** +> JsonApiAutomationOutList search_entities_automations(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import automation_controller_api +from gooddata_api_client.model.json_api_automation_out_list import JsonApiAutomationOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = automation_controller_api.AutomationControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_automations(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AutomationControllerApi->search_entities_automations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_automations(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AutomationControllerApi->search_entities_automations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiAutomationOutList**](JsonApiAutomationOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_automations** +> JsonApiAutomationOutDocument update_entity_automations(workspace_id, object_id, json_api_automation_in_document) + +Put an Automation + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import automation_controller_api +from gooddata_api_client.model.json_api_automation_in_document import JsonApiAutomationInDocument +from gooddata_api_client.model.json_api_automation_out_document import JsonApiAutomationOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = automation_controller_api.AutomationControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_automation_in_document = JsonApiAutomationInDocument( + data=JsonApiAutomationIn( + attributes=JsonApiAutomationInAttributes( + alert=JsonApiAutomationInAttributesAlert( + condition=AlertCondition(), + execution=AlertAfm( + attributes=[ + AttributeItem( + label=AfmObjectIdentifierLabel( + identifier=AfmObjectIdentifierLabelIdentifier( + id="sample_item.price", + type="label", + ), + ), + local_identifier="attribute_1", + show_all_values=False, + ), + ], + aux_measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + filters=[ + FilterDefinition(), + ], + measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + ), + interval="DAY", + trigger="ALWAYS", + ), + are_relations_valid=True, + dashboard_tabular_exports=[ + JsonApiAutomationInAttributesDashboardTabularExportsInner( + request_payload=DashboardTabularExportRequestV2( + dashboard_filters_override=[ + DashboardFilter(), + ], + dashboard_id="761cd28b-3f57-4ac9-bbdc-1c552cc0d1d0", + dashboard_tabs_filters_overrides={ + "key": [ + DashboardFilter(), + ], + }, + file_name="result", + format="XLSX", + settings=DashboardExportSettings( + export_info=True, + merge_headers=True, + page_orientation="PORTRAIT", + page_size="A4", + ), + widget_ids=[ + "widget_ids_example", + ], + ), + ), + ], + description="description_example", + details={}, + evaluation_mode="SHARED", + external_recipients=[ + JsonApiAutomationInAttributesExternalRecipientsInner( + email="email_example", + ), + ], + image_exports=[ + JsonApiAutomationInAttributesImageExportsInner( + request_payload=ImageExportRequest( + dashboard_id="761cd28b-3f57-4ac9-bbdc-1c552cc0d1d0", + file_name="filename", + format="PNG", + metadata=JsonNode(), + widget_ids=[ + "widget_ids_example", + ], + ), + ), + ], + metadata=JsonApiAutomationInAttributesMetadata(), + raw_exports=[ + JsonApiAutomationInAttributesRawExportsInner( + request_payload=RawExportAutomationRequest( + custom_override=RawCustomOverride( + labels={ + "key": RawCustomLabel( + title="title_example", + ), + }, + metrics={ + "key": RawCustomMetric( + title="title_example", + ), + }, + ), + delimiter="U", + execution=AFM( + attributes=[ + AttributeItem( + label=AfmObjectIdentifierLabel( + identifier=AfmObjectIdentifierLabelIdentifier( + id="sample_item.price", + type="label", + ), + ), + local_identifier="attribute_1", + show_all_values=False, + ), + ], + aux_measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + filters=[ + FilterDefinition(), + ], + measure_definition_overrides=[ + MetricDefinitionOverride( + definition=InlineMeasureDefinition( + inline=InlineMeasureDefinitionInline( + maql="maql_example", + ), + ), + item=AfmObjectIdentifierCore( + identifier=AfmObjectIdentifierCoreIdentifier( + id="sample_item.price", + type="attribute", + ), + ), + ), + ], + measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + ), + execution_settings=ExecutionSettings( + data_sampling_percentage=0, + timestamp=dateutil_parser('1970-01-01T00:00:00.00Z'), + ), + file_name="result", + format="CSV", + metadata=JsonNode(), + ), + ), + ], + schedule=JsonApiAutomationInAttributesSchedule( + cron="0 */30 9-17 ? * MON-FRI", + first_run=dateutil_parser('2025-01-01T12:00:00Z'), + timezone="Europe/Prague", + ), + slides_exports=[ + JsonApiAutomationInAttributesSlidesExportsInner( + request_payload=SlidesExportRequest( + dashboard_id="761cd28b-3f57-4ac9-bbdc-1c552cc0d1d0", + file_name="filename", + format="PDF", + metadata=JsonNode(), + template_id="template_id_example", + visualization_ids=[ + "visualization_ids_example", + ], + widget_ids=[ + "widget_ids_example", + ], + ), + ), + ], + state="ACTIVE", + tabular_exports=[ + JsonApiAutomationInAttributesTabularExportsInner( + request_payload=TabularExportRequest( + custom_override=CustomOverride( + labels={ + "key": CustomLabel( + title="title_example", + ), + }, + metrics={ + "key": CustomMetric( + format="format_example", + title="title_example", + ), + }, + ), + execution_result="ff483727196c9dc862c7fd3a5a84df55c96d61a4", + file_name="result", + format="CSV", + metadata=JsonNode(), + related_dashboard_id="761cd28b-3f57-4ac9-bbdc-1c552cc0d1d0", + settings=Settings( + delimiter="U", + export_info=True, + grand_totals_position="pinnedBottom", + merge_headers=True, + page_orientation="PORTRAIT", + page_size="A4", + pdf_page_size="a4 landscape", + pdf_table_style=[ + PdfTableStyle( + properties=[ + PdfTableStyleProperty( + key="key_example", + value="value_example", + ), + ], + selector="selector_example", + ), + ], + pdf_top_left_content="Good", + pdf_top_right_content="Morning", + show_filters=False, + ), + visualization_object="f7c359bc-c230-4487-b15b-ad9685bcb537", + visualization_object_custom_filters=[ + {}, + ], + ), + ), + ], + tags=[ + "tags_example", + ], + title="title_example", + visual_exports=[ + JsonApiAutomationInAttributesVisualExportsInner( + request_payload=VisualExportRequest( + dashboard_id="761cd28b-3f57-4ac9-bbdc-1c552cc0d1d0", + file_name="filename", + metadata={}, + ), + ), + ], + ), + id="id1", + relationships=JsonApiAutomationInRelationships( + analytical_dashboard=JsonApiAutomationInRelationshipsAnalyticalDashboard( + data=JsonApiAnalyticalDashboardToOneLinkage(None), + ), + export_definitions=JsonApiAutomationInRelationshipsExportDefinitions( + data=JsonApiExportDefinitionToManyLinkage([ + JsonApiExportDefinitionLinkage( + id="id_example", + type="exportDefinition", + ), + ]), + ), + notification_channel=JsonApiAutomationInRelationshipsNotificationChannel( + data=JsonApiNotificationChannelToOneLinkage(None), + ), + recipients=JsonApiAutomationInRelationshipsRecipients( + data=JsonApiUserToManyLinkage([ + JsonApiUserLinkage( + id="id_example", + type="user", + ), + ]), + ), + ), + type="automation", + ), + ) # JsonApiAutomationInDocument | + filter = "title==someString;description==someString;notificationChannel.id==321;analyticalDashboard.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "notificationChannel,analyticalDashboard,createdBy,modifiedBy,exportDefinitions,recipients,automationResults", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Put an Automation + api_response = api_instance.update_entity_automations(workspace_id, object_id, json_api_automation_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AutomationControllerApi->update_entity_automations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put an Automation + api_response = api_instance.update_entity_automations(workspace_id, object_id, json_api_automation_in_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling AutomationControllerApi->update_entity_automations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_automation_in_document** | [**JsonApiAutomationInDocument**](JsonApiAutomationInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiAutomationOutDocument**](JsonApiAutomationOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/CacheRemovalInterval.md b/gooddata-api-client/docs/CacheRemovalInterval.md new file mode 100644 index 000000000..dd087f281 --- /dev/null +++ b/gooddata-api-client/docs/CacheRemovalInterval.md @@ -0,0 +1,15 @@ +# CacheRemovalInterval + +Information about a period in time and how much cached data was removed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_from** | **datetime** | Start timestamp of the removal interval. | +**removed** | **int** | Bytes removed during this interval. | +**to** | **datetime** | End timestamp of the removal interval. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/CacheUsageApi.md b/gooddata-api-client/docs/CacheUsageApi.md new file mode 100644 index 000000000..368037026 --- /dev/null +++ b/gooddata-api-client/docs/CacheUsageApi.md @@ -0,0 +1,72 @@ +# gooddata_api_client.CacheUsageApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**collect_cache_usage**](CacheUsageApi.md#collect_cache_usage) | **GET** /api/v1/actions/collectCacheUsage | Collect data about the current cache usage + + +# **collect_cache_usage** +> CacheUsageData collect_cache_usage() + +Collect data about the current cache usage + +Get the detailed data about how much cache your organization is currently using, broken down by individual workspaces. + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import cache_usage_api +from gooddata_api_client.model.cache_usage_data import CacheUsageData +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = cache_usage_api.CacheUsageApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Collect data about the current cache usage + api_response = api_instance.collect_cache_usage() + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CacheUsageApi->collect_cache_usage: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CacheUsageData**](CacheUsageData.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[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/gooddata-api-client/docs/CacheUsageData.md b/gooddata-api-client/docs/CacheUsageData.md new file mode 100644 index 000000000..57eb479f5 --- /dev/null +++ b/gooddata-api-client/docs/CacheUsageData.md @@ -0,0 +1,14 @@ +# CacheUsageData + +Result of scan of data source physical model. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_cache_usage** | [**OrganizationCacheUsage**](OrganizationCacheUsage.md) | | +**workspace_cache_usages** | [**{str: (WorkspaceCacheUsage,)}**](WorkspaceCacheUsage.md) | Map of data about the cache usage of the individual workspaces. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ConvertGeoFileRequest.md b/gooddata-api-client/docs/ConvertGeoFileRequest.md new file mode 100644 index 000000000..67c65d30f --- /dev/null +++ b/gooddata-api-client/docs/ConvertGeoFileRequest.md @@ -0,0 +1,13 @@ +# ConvertGeoFileRequest + +Request to convert a geo file to GeoParquet format. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**location** | **str** | Location of the file in the staging area to convert. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ConvertGeoFileResponse.md b/gooddata-api-client/docs/ConvertGeoFileResponse.md new file mode 100644 index 000000000..20c72ad04 --- /dev/null +++ b/gooddata-api-client/docs/ConvertGeoFileResponse.md @@ -0,0 +1,13 @@ +# ConvertGeoFileResponse + +Response after successfully converting a geo file. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**location** | **str** | Location of the converted GeoParquet file in the staging area. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/CookieSecurityConfigurationControllerApi.md b/gooddata-api-client/docs/CookieSecurityConfigurationControllerApi.md new file mode 100644 index 000000000..82d99ead9 --- /dev/null +++ b/gooddata-api-client/docs/CookieSecurityConfigurationControllerApi.md @@ -0,0 +1,263 @@ +# gooddata_api_client.CookieSecurityConfigurationControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_entity_cookie_security_configurations**](CookieSecurityConfigurationControllerApi.md#get_entity_cookie_security_configurations) | **GET** /api/v1/entities/admin/cookieSecurityConfigurations/{id} | Get CookieSecurityConfiguration +[**patch_entity_cookie_security_configurations**](CookieSecurityConfigurationControllerApi.md#patch_entity_cookie_security_configurations) | **PATCH** /api/v1/entities/admin/cookieSecurityConfigurations/{id} | Patch CookieSecurityConfiguration +[**update_entity_cookie_security_configurations**](CookieSecurityConfigurationControllerApi.md#update_entity_cookie_security_configurations) | **PUT** /api/v1/entities/admin/cookieSecurityConfigurations/{id} | Put CookieSecurityConfiguration + + +# **get_entity_cookie_security_configurations** +> JsonApiCookieSecurityConfigurationOutDocument get_entity_cookie_security_configurations(id) + +Get CookieSecurityConfiguration + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import cookie_security_configuration_controller_api +from gooddata_api_client.model.json_api_cookie_security_configuration_out_document import JsonApiCookieSecurityConfigurationOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = cookie_security_configuration_controller_api.CookieSecurityConfigurationControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + filter = "lastRotation==InstantValue;rotationInterval==DurationValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Get CookieSecurityConfiguration + api_response = api_instance.get_entity_cookie_security_configurations(id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CookieSecurityConfigurationControllerApi->get_entity_cookie_security_configurations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get CookieSecurityConfiguration + api_response = api_instance.get_entity_cookie_security_configurations(id, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CookieSecurityConfigurationControllerApi->get_entity_cookie_security_configurations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiCookieSecurityConfigurationOutDocument**](JsonApiCookieSecurityConfigurationOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_cookie_security_configurations** +> JsonApiCookieSecurityConfigurationOutDocument patch_entity_cookie_security_configurations(id, json_api_cookie_security_configuration_patch_document) + +Patch CookieSecurityConfiguration + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import cookie_security_configuration_controller_api +from gooddata_api_client.model.json_api_cookie_security_configuration_out_document import JsonApiCookieSecurityConfigurationOutDocument +from gooddata_api_client.model.json_api_cookie_security_configuration_patch_document import JsonApiCookieSecurityConfigurationPatchDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = cookie_security_configuration_controller_api.CookieSecurityConfigurationControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + json_api_cookie_security_configuration_patch_document = JsonApiCookieSecurityConfigurationPatchDocument( + data=JsonApiCookieSecurityConfigurationPatch( + attributes=JsonApiCookieSecurityConfigurationInAttributes( + last_rotation=dateutil_parser('1970-01-01T00:00:00.00Z'), + rotation_interval="P30D", + ), + id="id1", + type="cookieSecurityConfiguration", + ), + ) # JsonApiCookieSecurityConfigurationPatchDocument | + filter = "lastRotation==InstantValue;rotationInterval==DurationValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Patch CookieSecurityConfiguration + api_response = api_instance.patch_entity_cookie_security_configurations(id, json_api_cookie_security_configuration_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CookieSecurityConfigurationControllerApi->patch_entity_cookie_security_configurations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch CookieSecurityConfiguration + api_response = api_instance.patch_entity_cookie_security_configurations(id, json_api_cookie_security_configuration_patch_document, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CookieSecurityConfigurationControllerApi->patch_entity_cookie_security_configurations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_cookie_security_configuration_patch_document** | [**JsonApiCookieSecurityConfigurationPatchDocument**](JsonApiCookieSecurityConfigurationPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiCookieSecurityConfigurationOutDocument**](JsonApiCookieSecurityConfigurationOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_cookie_security_configurations** +> JsonApiCookieSecurityConfigurationOutDocument update_entity_cookie_security_configurations(id, json_api_cookie_security_configuration_in_document) + +Put CookieSecurityConfiguration + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import cookie_security_configuration_controller_api +from gooddata_api_client.model.json_api_cookie_security_configuration_in_document import JsonApiCookieSecurityConfigurationInDocument +from gooddata_api_client.model.json_api_cookie_security_configuration_out_document import JsonApiCookieSecurityConfigurationOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = cookie_security_configuration_controller_api.CookieSecurityConfigurationControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + json_api_cookie_security_configuration_in_document = JsonApiCookieSecurityConfigurationInDocument( + data=JsonApiCookieSecurityConfigurationIn( + attributes=JsonApiCookieSecurityConfigurationInAttributes( + last_rotation=dateutil_parser('1970-01-01T00:00:00.00Z'), + rotation_interval="P30D", + ), + id="id1", + type="cookieSecurityConfiguration", + ), + ) # JsonApiCookieSecurityConfigurationInDocument | + filter = "lastRotation==InstantValue;rotationInterval==DurationValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Put CookieSecurityConfiguration + api_response = api_instance.update_entity_cookie_security_configurations(id, json_api_cookie_security_configuration_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CookieSecurityConfigurationControllerApi->update_entity_cookie_security_configurations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put CookieSecurityConfiguration + api_response = api_instance.update_entity_cookie_security_configurations(id, json_api_cookie_security_configuration_in_document, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CookieSecurityConfigurationControllerApi->update_entity_cookie_security_configurations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_cookie_security_configuration_in_document** | [**JsonApiCookieSecurityConfigurationInDocument**](JsonApiCookieSecurityConfigurationInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiCookieSecurityConfigurationOutDocument**](JsonApiCookieSecurityConfigurationOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/CsvConvertOptions.md b/gooddata-api-client/docs/CsvConvertOptions.md new file mode 100644 index 000000000..4b8523559 --- /dev/null +++ b/gooddata-api-client/docs/CsvConvertOptions.md @@ -0,0 +1,25 @@ +# CsvConvertOptions + +Options for converting CSV files when reading. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auto_dict_encode** | **bool** | Whether to try to automatically dict-encode string / binary data. | [optional] +**auto_dict_max_cardinality** | **int** | The maximum dictionary cardinality for autoDictEncode. | [optional] +**check_utf8** | **bool** | Whether to check UTF8 validity of string columns. | [optional] +**column_types** | [**[CsvConvertOptionsColumnType]**](CsvConvertOptionsColumnType.md) | Information about the column types in the table. | [optional] +**decimal_point** | **str** | The character used as decimal point in floating-point and decimal data. | [optional] +**false_values** | **[str]** | Sequence of strings that denote false Booleans in the data. | [optional] +**include_columns** | **[str]** | The names of columns to include in the Table. If empty, the Table will include all columns from the CSV file. If not empty, only these columns will be included, in this order. | [optional] +**include_missing_columns** | **bool** | If false, columns in includeColumns but not in the CSV file will error out. | [optional] +**null_values** | **[str]** | Sequence of strings that denote nulls in the data. | [optional] +**quoted_strings_can_be_null** | **bool** | Whether quoted values can be null. | [optional] +**strings_can_be_null** | **bool** | Whether string / binary columns can have null values. | [optional] +**timestamp_parsers** | **[str]** | Sequence of strptime()-compatible format strings, tried in order when attempting to infer or convert timestamp values. | [optional] +**true_values** | **[str]** | Sequence of strings that denote true Booleans in the data. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/CsvConvertOptionsColumnType.md b/gooddata-api-client/docs/CsvConvertOptionsColumnType.md new file mode 100644 index 000000000..015ed9c7a --- /dev/null +++ b/gooddata-api-client/docs/CsvConvertOptionsColumnType.md @@ -0,0 +1,15 @@ +# CsvConvertOptionsColumnType + +Information about a certain column in the table. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The column name. | [optional] +**nullable** | **bool** | Whether the data in the given column can be null. | [optional] +**type** | **str** | The column type. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/CsvManifestBody.md b/gooddata-api-client/docs/CsvManifestBody.md new file mode 100644 index 000000000..4237f0b06 --- /dev/null +++ b/gooddata-api-client/docs/CsvManifestBody.md @@ -0,0 +1,17 @@ +# CsvManifestBody + +Body of the CSV manifest. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**column_date_formats** | **{str: (str,)}** | Map of column names to date formats to use when parsing them as dates. | [optional] +**convert** | [**CsvConvertOptions**](CsvConvertOptions.md) | | [optional] +**parse** | [**CsvParseOptions**](CsvParseOptions.md) | | [optional] +**read** | [**CsvReadOptions**](CsvReadOptions.md) | | [optional] +**read_method** | **str** | Method used to read the CSV file. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/CsvParseOptions.md b/gooddata-api-client/docs/CsvParseOptions.md new file mode 100644 index 000000000..af305666d --- /dev/null +++ b/gooddata-api-client/docs/CsvParseOptions.md @@ -0,0 +1,18 @@ +# CsvParseOptions + +Options for parsing CSV files. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**delimiter** | **str** | The character delimiting individual cells in the CSV data. | [optional] +**double_quote** | **bool** | Whether two quotes in a quoted CSV value denote a single quote in the data. | [optional] +**escape_char** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | The character used optionally for escaping special characters or false to disable escaping. | [optional] +**ignore_empty_lines** | **bool** | Whether empty lines are ignored in CSV input. | [optional] +**newlines_in_values** | **bool** | Whether newline characters are allowed in CSV values. | [optional] +**quote_char** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | The character used optionally for quoting CSV values or false to disable quoting. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/CsvReadOptions.md b/gooddata-api-client/docs/CsvReadOptions.md new file mode 100644 index 000000000..4fe23e618 --- /dev/null +++ b/gooddata-api-client/docs/CsvReadOptions.md @@ -0,0 +1,19 @@ +# CsvReadOptions + +Options for reading CSV files. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auto_generate_column_names** | **bool** | Whether to autogenerate column names if columnNames is empty. | [optional] +**block_size** | **int** | How many bytes to process at a time from the input stream. | [optional] +**column_names** | **[str]** | The column names of the target table. | [optional] +**encoding** | **str** | The character encoding of the CSV data. | [optional] +**skip_rows** | **int** | The number of rows to skip before the column names (if any) and the CSV data. | [optional] +**skip_rows_after_names** | **int** | The number of rows to skip after the column names. | [optional] +**use_threads** | **bool** | Whether to use multiple threads to accelerate reading. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/CustomApplicationSettingControllerApi.md b/gooddata-api-client/docs/CustomApplicationSettingControllerApi.md new file mode 100644 index 000000000..b31cc8818 --- /dev/null +++ b/gooddata-api-client/docs/CustomApplicationSettingControllerApi.md @@ -0,0 +1,635 @@ +# gooddata_api_client.CustomApplicationSettingControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_custom_application_settings**](CustomApplicationSettingControllerApi.md#create_entity_custom_application_settings) | **POST** /api/v1/entities/workspaces/{workspaceId}/customApplicationSettings | Post Custom Application Settings +[**delete_entity_custom_application_settings**](CustomApplicationSettingControllerApi.md#delete_entity_custom_application_settings) | **DELETE** /api/v1/entities/workspaces/{workspaceId}/customApplicationSettings/{objectId} | Delete a Custom Application Setting +[**get_all_entities_custom_application_settings**](CustomApplicationSettingControllerApi.md#get_all_entities_custom_application_settings) | **GET** /api/v1/entities/workspaces/{workspaceId}/customApplicationSettings | Get all Custom Application Settings +[**get_entity_custom_application_settings**](CustomApplicationSettingControllerApi.md#get_entity_custom_application_settings) | **GET** /api/v1/entities/workspaces/{workspaceId}/customApplicationSettings/{objectId} | Get a Custom Application Setting +[**patch_entity_custom_application_settings**](CustomApplicationSettingControllerApi.md#patch_entity_custom_application_settings) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/customApplicationSettings/{objectId} | Patch a Custom Application Setting +[**search_entities_custom_application_settings**](CustomApplicationSettingControllerApi.md#search_entities_custom_application_settings) | **POST** /api/v1/entities/workspaces/{workspaceId}/customApplicationSettings/search | The search endpoint (beta) +[**update_entity_custom_application_settings**](CustomApplicationSettingControllerApi.md#update_entity_custom_application_settings) | **PUT** /api/v1/entities/workspaces/{workspaceId}/customApplicationSettings/{objectId} | Put a Custom Application Setting + + +# **create_entity_custom_application_settings** +> JsonApiCustomApplicationSettingOutDocument create_entity_custom_application_settings(workspace_id, json_api_custom_application_setting_post_optional_id_document) + +Post Custom Application Settings + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import custom_application_setting_controller_api +from gooddata_api_client.model.json_api_custom_application_setting_out_document import JsonApiCustomApplicationSettingOutDocument +from gooddata_api_client.model.json_api_custom_application_setting_post_optional_id_document import JsonApiCustomApplicationSettingPostOptionalIdDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = custom_application_setting_controller_api.CustomApplicationSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_custom_application_setting_post_optional_id_document = JsonApiCustomApplicationSettingPostOptionalIdDocument( + data=JsonApiCustomApplicationSettingPostOptionalId( + attributes=JsonApiCustomApplicationSettingInAttributes( + application_name="application_name_example", + content={}, + ), + id="id1", + type="customApplicationSetting", + ), + ) # JsonApiCustomApplicationSettingPostOptionalIdDocument | + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Post Custom Application Settings + api_response = api_instance.create_entity_custom_application_settings(workspace_id, json_api_custom_application_setting_post_optional_id_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomApplicationSettingControllerApi->create_entity_custom_application_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post Custom Application Settings + api_response = api_instance.create_entity_custom_application_settings(workspace_id, json_api_custom_application_setting_post_optional_id_document, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomApplicationSettingControllerApi->create_entity_custom_application_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_custom_application_setting_post_optional_id_document** | [**JsonApiCustomApplicationSettingPostOptionalIdDocument**](JsonApiCustomApplicationSettingPostOptionalIdDocument.md)| | + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiCustomApplicationSettingOutDocument**](JsonApiCustomApplicationSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_custom_application_settings** +> delete_entity_custom_application_settings(workspace_id, object_id) + +Delete a Custom Application Setting + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import custom_application_setting_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = custom_application_setting_controller_api.CustomApplicationSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "applicationName==someString;content==JsonNodeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete a Custom Application Setting + api_instance.delete_entity_custom_application_settings(workspace_id, object_id) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomApplicationSettingControllerApi->delete_entity_custom_application_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete a Custom Application Setting + api_instance.delete_entity_custom_application_settings(workspace_id, object_id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomApplicationSettingControllerApi->delete_entity_custom_application_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_custom_application_settings** +> JsonApiCustomApplicationSettingOutList get_all_entities_custom_application_settings(workspace_id) + +Get all Custom Application Settings + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import custom_application_setting_controller_api +from gooddata_api_client.model.json_api_custom_application_setting_out_list import JsonApiCustomApplicationSettingOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = custom_application_setting_controller_api.CustomApplicationSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "applicationName==someString;content==JsonNodeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Custom Application Settings + api_response = api_instance.get_all_entities_custom_application_settings(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomApplicationSettingControllerApi->get_all_entities_custom_application_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Custom Application Settings + api_response = api_instance.get_all_entities_custom_application_settings(workspace_id, origin=origin, filter=filter, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomApplicationSettingControllerApi->get_all_entities_custom_application_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiCustomApplicationSettingOutList**](JsonApiCustomApplicationSettingOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_custom_application_settings** +> JsonApiCustomApplicationSettingOutDocument get_entity_custom_application_settings(workspace_id, object_id) + +Get a Custom Application Setting + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import custom_application_setting_controller_api +from gooddata_api_client.model.json_api_custom_application_setting_out_document import JsonApiCustomApplicationSettingOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = custom_application_setting_controller_api.CustomApplicationSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "applicationName==someString;content==JsonNodeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get a Custom Application Setting + api_response = api_instance.get_entity_custom_application_settings(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomApplicationSettingControllerApi->get_entity_custom_application_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a Custom Application Setting + api_response = api_instance.get_entity_custom_application_settings(workspace_id, object_id, filter=filter, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomApplicationSettingControllerApi->get_entity_custom_application_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiCustomApplicationSettingOutDocument**](JsonApiCustomApplicationSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_custom_application_settings** +> JsonApiCustomApplicationSettingOutDocument patch_entity_custom_application_settings(workspace_id, object_id, json_api_custom_application_setting_patch_document) + +Patch a Custom Application Setting + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import custom_application_setting_controller_api +from gooddata_api_client.model.json_api_custom_application_setting_patch_document import JsonApiCustomApplicationSettingPatchDocument +from gooddata_api_client.model.json_api_custom_application_setting_out_document import JsonApiCustomApplicationSettingOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = custom_application_setting_controller_api.CustomApplicationSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_custom_application_setting_patch_document = JsonApiCustomApplicationSettingPatchDocument( + data=JsonApiCustomApplicationSettingPatch( + attributes=JsonApiCustomApplicationSettingPatchAttributes( + application_name="application_name_example", + content={}, + ), + id="id1", + type="customApplicationSetting", + ), + ) # JsonApiCustomApplicationSettingPatchDocument | + filter = "applicationName==someString;content==JsonNodeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Patch a Custom Application Setting + api_response = api_instance.patch_entity_custom_application_settings(workspace_id, object_id, json_api_custom_application_setting_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomApplicationSettingControllerApi->patch_entity_custom_application_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch a Custom Application Setting + api_response = api_instance.patch_entity_custom_application_settings(workspace_id, object_id, json_api_custom_application_setting_patch_document, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomApplicationSettingControllerApi->patch_entity_custom_application_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_custom_application_setting_patch_document** | [**JsonApiCustomApplicationSettingPatchDocument**](JsonApiCustomApplicationSettingPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiCustomApplicationSettingOutDocument**](JsonApiCustomApplicationSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_custom_application_settings** +> JsonApiCustomApplicationSettingOutList search_entities_custom_application_settings(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import custom_application_setting_controller_api +from gooddata_api_client.model.json_api_custom_application_setting_out_list import JsonApiCustomApplicationSettingOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = custom_application_setting_controller_api.CustomApplicationSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_custom_application_settings(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomApplicationSettingControllerApi->search_entities_custom_application_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_custom_application_settings(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomApplicationSettingControllerApi->search_entities_custom_application_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiCustomApplicationSettingOutList**](JsonApiCustomApplicationSettingOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_custom_application_settings** +> JsonApiCustomApplicationSettingOutDocument update_entity_custom_application_settings(workspace_id, object_id, json_api_custom_application_setting_in_document) + +Put a Custom Application Setting + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import custom_application_setting_controller_api +from gooddata_api_client.model.json_api_custom_application_setting_in_document import JsonApiCustomApplicationSettingInDocument +from gooddata_api_client.model.json_api_custom_application_setting_out_document import JsonApiCustomApplicationSettingOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = custom_application_setting_controller_api.CustomApplicationSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_custom_application_setting_in_document = JsonApiCustomApplicationSettingInDocument( + data=JsonApiCustomApplicationSettingIn( + attributes=JsonApiCustomApplicationSettingInAttributes( + application_name="application_name_example", + content={}, + ), + id="id1", + type="customApplicationSetting", + ), + ) # JsonApiCustomApplicationSettingInDocument | + filter = "applicationName==someString;content==JsonNodeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Put a Custom Application Setting + api_response = api_instance.update_entity_custom_application_settings(workspace_id, object_id, json_api_custom_application_setting_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomApplicationSettingControllerApi->update_entity_custom_application_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put a Custom Application Setting + api_response = api_instance.update_entity_custom_application_settings(workspace_id, object_id, json_api_custom_application_setting_in_document, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomApplicationSettingControllerApi->update_entity_custom_application_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_custom_application_setting_in_document** | [**JsonApiCustomApplicationSettingInDocument**](JsonApiCustomApplicationSettingInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiCustomApplicationSettingOutDocument**](JsonApiCustomApplicationSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/CustomGeoCollectionControllerApi.md b/gooddata-api-client/docs/CustomGeoCollectionControllerApi.md new file mode 100644 index 000000000..acbf75afe --- /dev/null +++ b/gooddata-api-client/docs/CustomGeoCollectionControllerApi.md @@ -0,0 +1,492 @@ +# gooddata_api_client.CustomGeoCollectionControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_custom_geo_collections**](CustomGeoCollectionControllerApi.md#create_entity_custom_geo_collections) | **POST** /api/v1/entities/customGeoCollections | Post Custom Geo Collections +[**delete_entity_custom_geo_collections**](CustomGeoCollectionControllerApi.md#delete_entity_custom_geo_collections) | **DELETE** /api/v1/entities/customGeoCollections/{id} | Delete Custom Geo Collection +[**get_all_entities_custom_geo_collections**](CustomGeoCollectionControllerApi.md#get_all_entities_custom_geo_collections) | **GET** /api/v1/entities/customGeoCollections | Get all Custom Geo Collections +[**get_entity_custom_geo_collections**](CustomGeoCollectionControllerApi.md#get_entity_custom_geo_collections) | **GET** /api/v1/entities/customGeoCollections/{id} | Get Custom Geo Collection +[**patch_entity_custom_geo_collections**](CustomGeoCollectionControllerApi.md#patch_entity_custom_geo_collections) | **PATCH** /api/v1/entities/customGeoCollections/{id} | Patch Custom Geo Collection +[**update_entity_custom_geo_collections**](CustomGeoCollectionControllerApi.md#update_entity_custom_geo_collections) | **PUT** /api/v1/entities/customGeoCollections/{id} | Put Custom Geo Collection + + +# **create_entity_custom_geo_collections** +> JsonApiCustomGeoCollectionOutDocument create_entity_custom_geo_collections(json_api_custom_geo_collection_in_document) + +Post Custom Geo Collections + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import custom_geo_collection_controller_api +from gooddata_api_client.model.json_api_custom_geo_collection_out_document import JsonApiCustomGeoCollectionOutDocument +from gooddata_api_client.model.json_api_custom_geo_collection_in_document import JsonApiCustomGeoCollectionInDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = custom_geo_collection_controller_api.CustomGeoCollectionControllerApi(api_client) + json_api_custom_geo_collection_in_document = JsonApiCustomGeoCollectionInDocument( + data=JsonApiCustomGeoCollectionIn( + attributes=JsonApiCustomGeoCollectionInAttributes( + description="description_example", + name="name_example", + ), + id="id1", + type="customGeoCollection", + ), + ) # JsonApiCustomGeoCollectionInDocument | + + # example passing only required values which don't have defaults set + try: + # Post Custom Geo Collections + api_response = api_instance.create_entity_custom_geo_collections(json_api_custom_geo_collection_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomGeoCollectionControllerApi->create_entity_custom_geo_collections: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **json_api_custom_geo_collection_in_document** | [**JsonApiCustomGeoCollectionInDocument**](JsonApiCustomGeoCollectionInDocument.md)| | + +### Return type + +[**JsonApiCustomGeoCollectionOutDocument**](JsonApiCustomGeoCollectionOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_custom_geo_collections** +> delete_entity_custom_geo_collections(id) + +Delete Custom Geo Collection + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import custom_geo_collection_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = custom_geo_collection_controller_api.CustomGeoCollectionControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + filter = "name==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete Custom Geo Collection + api_instance.delete_entity_custom_geo_collections(id) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomGeoCollectionControllerApi->delete_entity_custom_geo_collections: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete Custom Geo Collection + api_instance.delete_entity_custom_geo_collections(id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomGeoCollectionControllerApi->delete_entity_custom_geo_collections: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_custom_geo_collections** +> JsonApiCustomGeoCollectionOutList get_all_entities_custom_geo_collections() + +Get all Custom Geo Collections + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import custom_geo_collection_controller_api +from gooddata_api_client.model.json_api_custom_geo_collection_out_list import JsonApiCustomGeoCollectionOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = custom_geo_collection_controller_api.CustomGeoCollectionControllerApi(api_client) + filter = "name==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + meta_include = [ + "metaInclude=page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Custom Geo Collections + api_response = api_instance.get_all_entities_custom_geo_collections(filter=filter, page=page, size=size, sort=sort, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomGeoCollectionControllerApi->get_all_entities_custom_geo_collections: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiCustomGeoCollectionOutList**](JsonApiCustomGeoCollectionOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_custom_geo_collections** +> JsonApiCustomGeoCollectionOutDocument get_entity_custom_geo_collections(id) + +Get Custom Geo Collection + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import custom_geo_collection_controller_api +from gooddata_api_client.model.json_api_custom_geo_collection_out_document import JsonApiCustomGeoCollectionOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = custom_geo_collection_controller_api.CustomGeoCollectionControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + filter = "name==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Get Custom Geo Collection + api_response = api_instance.get_entity_custom_geo_collections(id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomGeoCollectionControllerApi->get_entity_custom_geo_collections: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get Custom Geo Collection + api_response = api_instance.get_entity_custom_geo_collections(id, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomGeoCollectionControllerApi->get_entity_custom_geo_collections: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiCustomGeoCollectionOutDocument**](JsonApiCustomGeoCollectionOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_custom_geo_collections** +> JsonApiCustomGeoCollectionOutDocument patch_entity_custom_geo_collections(id, json_api_custom_geo_collection_patch_document) + +Patch Custom Geo Collection + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import custom_geo_collection_controller_api +from gooddata_api_client.model.json_api_custom_geo_collection_patch_document import JsonApiCustomGeoCollectionPatchDocument +from gooddata_api_client.model.json_api_custom_geo_collection_out_document import JsonApiCustomGeoCollectionOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = custom_geo_collection_controller_api.CustomGeoCollectionControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + json_api_custom_geo_collection_patch_document = JsonApiCustomGeoCollectionPatchDocument( + data=JsonApiCustomGeoCollectionPatch( + attributes=JsonApiCustomGeoCollectionInAttributes( + description="description_example", + name="name_example", + ), + id="id1", + type="customGeoCollection", + ), + ) # JsonApiCustomGeoCollectionPatchDocument | + filter = "name==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Patch Custom Geo Collection + api_response = api_instance.patch_entity_custom_geo_collections(id, json_api_custom_geo_collection_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomGeoCollectionControllerApi->patch_entity_custom_geo_collections: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch Custom Geo Collection + api_response = api_instance.patch_entity_custom_geo_collections(id, json_api_custom_geo_collection_patch_document, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomGeoCollectionControllerApi->patch_entity_custom_geo_collections: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_custom_geo_collection_patch_document** | [**JsonApiCustomGeoCollectionPatchDocument**](JsonApiCustomGeoCollectionPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiCustomGeoCollectionOutDocument**](JsonApiCustomGeoCollectionOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_custom_geo_collections** +> JsonApiCustomGeoCollectionOutDocument update_entity_custom_geo_collections(id, json_api_custom_geo_collection_in_document) + +Put Custom Geo Collection + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import custom_geo_collection_controller_api +from gooddata_api_client.model.json_api_custom_geo_collection_out_document import JsonApiCustomGeoCollectionOutDocument +from gooddata_api_client.model.json_api_custom_geo_collection_in_document import JsonApiCustomGeoCollectionInDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = custom_geo_collection_controller_api.CustomGeoCollectionControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + json_api_custom_geo_collection_in_document = JsonApiCustomGeoCollectionInDocument( + data=JsonApiCustomGeoCollectionIn( + attributes=JsonApiCustomGeoCollectionInAttributes( + description="description_example", + name="name_example", + ), + id="id1", + type="customGeoCollection", + ), + ) # JsonApiCustomGeoCollectionInDocument | + filter = "name==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Put Custom Geo Collection + api_response = api_instance.update_entity_custom_geo_collections(id, json_api_custom_geo_collection_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomGeoCollectionControllerApi->update_entity_custom_geo_collections: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put Custom Geo Collection + api_response = api_instance.update_entity_custom_geo_collections(id, json_api_custom_geo_collection_in_document, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling CustomGeoCollectionControllerApi->update_entity_custom_geo_collections: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_custom_geo_collection_in_document** | [**JsonApiCustomGeoCollectionInDocument**](JsonApiCustomGeoCollectionInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiCustomGeoCollectionOutDocument**](JsonApiCustomGeoCollectionOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/DashboardContext.md b/gooddata-api-client/docs/DashboardContext.md new file mode 100644 index 000000000..b8b951a8e --- /dev/null +++ b/gooddata-api-client/docs/DashboardContext.md @@ -0,0 +1,14 @@ +# DashboardContext + +Dashboard the user is currently viewing. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Dashboard object ID. | +**widgets** | [**[DashboardContextWidgetsInner]**](DashboardContextWidgetsInner.md) | Widgets currently visible on the dashboard. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/DashboardContextWidgetsInner.md b/gooddata-api-client/docs/DashboardContextWidgetsInner.md new file mode 100644 index 000000000..32e962433 --- /dev/null +++ b/gooddata-api-client/docs/DashboardContextWidgetsInner.md @@ -0,0 +1,18 @@ +# DashboardContextWidgetsInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**widget_type** | **str** | | +**result_id** | **str** | Signed result ID for the currently active visualization's execution result. | [optional] +**title** | **str** | Widget title as displayed on the dashboard. | [optional] +**widget_id** | **str** | Widget object ID. | [optional] +**active_visualization_id** | **str** | ID of the currently active visualization in the switcher. | [optional] +**visualization_ids** | **[str]** | IDs of all visualizations available in the switcher. | [optional] +**visualization_id** | **str** | Visualization object ID referenced by this insight widget. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/DashboardPluginControllerApi.md b/gooddata-api-client/docs/DashboardPluginControllerApi.md new file mode 100644 index 000000000..02a369ed3 --- /dev/null +++ b/gooddata-api-client/docs/DashboardPluginControllerApi.md @@ -0,0 +1,670 @@ +# gooddata_api_client.DashboardPluginControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_dashboard_plugins**](DashboardPluginControllerApi.md#create_entity_dashboard_plugins) | **POST** /api/v1/entities/workspaces/{workspaceId}/dashboardPlugins | Post Plugins +[**delete_entity_dashboard_plugins**](DashboardPluginControllerApi.md#delete_entity_dashboard_plugins) | **DELETE** /api/v1/entities/workspaces/{workspaceId}/dashboardPlugins/{objectId} | Delete a Plugin +[**get_all_entities_dashboard_plugins**](DashboardPluginControllerApi.md#get_all_entities_dashboard_plugins) | **GET** /api/v1/entities/workspaces/{workspaceId}/dashboardPlugins | Get all Plugins +[**get_entity_dashboard_plugins**](DashboardPluginControllerApi.md#get_entity_dashboard_plugins) | **GET** /api/v1/entities/workspaces/{workspaceId}/dashboardPlugins/{objectId} | Get a Plugin +[**patch_entity_dashboard_plugins**](DashboardPluginControllerApi.md#patch_entity_dashboard_plugins) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/dashboardPlugins/{objectId} | Patch a Plugin +[**search_entities_dashboard_plugins**](DashboardPluginControllerApi.md#search_entities_dashboard_plugins) | **POST** /api/v1/entities/workspaces/{workspaceId}/dashboardPlugins/search | The search endpoint (beta) +[**update_entity_dashboard_plugins**](DashboardPluginControllerApi.md#update_entity_dashboard_plugins) | **PUT** /api/v1/entities/workspaces/{workspaceId}/dashboardPlugins/{objectId} | Put a Plugin + + +# **create_entity_dashboard_plugins** +> JsonApiDashboardPluginOutDocument create_entity_dashboard_plugins(workspace_id, json_api_dashboard_plugin_post_optional_id_document) + +Post Plugins + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import dashboard_plugin_controller_api +from gooddata_api_client.model.json_api_dashboard_plugin_post_optional_id_document import JsonApiDashboardPluginPostOptionalIdDocument +from gooddata_api_client.model.json_api_dashboard_plugin_out_document import JsonApiDashboardPluginOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = dashboard_plugin_controller_api.DashboardPluginControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_dashboard_plugin_post_optional_id_document = JsonApiDashboardPluginPostOptionalIdDocument( + data=JsonApiDashboardPluginPostOptionalId( + attributes=JsonApiDashboardPluginInAttributes( + are_relations_valid=True, + content={}, + description="description_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="dashboardPlugin", + ), + ) # JsonApiDashboardPluginPostOptionalIdDocument | + include = [ + "createdBy,modifiedBy", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Post Plugins + api_response = api_instance.create_entity_dashboard_plugins(workspace_id, json_api_dashboard_plugin_post_optional_id_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DashboardPluginControllerApi->create_entity_dashboard_plugins: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post Plugins + api_response = api_instance.create_entity_dashboard_plugins(workspace_id, json_api_dashboard_plugin_post_optional_id_document, include=include, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DashboardPluginControllerApi->create_entity_dashboard_plugins: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_dashboard_plugin_post_optional_id_document** | [**JsonApiDashboardPluginPostOptionalIdDocument**](JsonApiDashboardPluginPostOptionalIdDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiDashboardPluginOutDocument**](JsonApiDashboardPluginOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_dashboard_plugins** +> delete_entity_dashboard_plugins(workspace_id, object_id) + +Delete a Plugin + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import dashboard_plugin_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = dashboard_plugin_controller_api.DashboardPluginControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete a Plugin + api_instance.delete_entity_dashboard_plugins(workspace_id, object_id) + except gooddata_api_client.ApiException as e: + print("Exception when calling DashboardPluginControllerApi->delete_entity_dashboard_plugins: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete a Plugin + api_instance.delete_entity_dashboard_plugins(workspace_id, object_id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling DashboardPluginControllerApi->delete_entity_dashboard_plugins: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_dashboard_plugins** +> JsonApiDashboardPluginOutList get_all_entities_dashboard_plugins(workspace_id) + +Get all Plugins + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import dashboard_plugin_controller_api +from gooddata_api_client.model.json_api_dashboard_plugin_out_list import JsonApiDashboardPluginOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = dashboard_plugin_controller_api.DashboardPluginControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Plugins + api_response = api_instance.get_all_entities_dashboard_plugins(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DashboardPluginControllerApi->get_all_entities_dashboard_plugins: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Plugins + api_response = api_instance.get_all_entities_dashboard_plugins(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DashboardPluginControllerApi->get_all_entities_dashboard_plugins: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiDashboardPluginOutList**](JsonApiDashboardPluginOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_dashboard_plugins** +> JsonApiDashboardPluginOutDocument get_entity_dashboard_plugins(workspace_id, object_id) + +Get a Plugin + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import dashboard_plugin_controller_api +from gooddata_api_client.model.json_api_dashboard_plugin_out_document import JsonApiDashboardPluginOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = dashboard_plugin_controller_api.DashboardPluginControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get a Plugin + api_response = api_instance.get_entity_dashboard_plugins(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DashboardPluginControllerApi->get_entity_dashboard_plugins: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a Plugin + api_response = api_instance.get_entity_dashboard_plugins(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DashboardPluginControllerApi->get_entity_dashboard_plugins: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiDashboardPluginOutDocument**](JsonApiDashboardPluginOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_dashboard_plugins** +> JsonApiDashboardPluginOutDocument patch_entity_dashboard_plugins(workspace_id, object_id, json_api_dashboard_plugin_patch_document) + +Patch a Plugin + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import dashboard_plugin_controller_api +from gooddata_api_client.model.json_api_dashboard_plugin_out_document import JsonApiDashboardPluginOutDocument +from gooddata_api_client.model.json_api_dashboard_plugin_patch_document import JsonApiDashboardPluginPatchDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = dashboard_plugin_controller_api.DashboardPluginControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_dashboard_plugin_patch_document = JsonApiDashboardPluginPatchDocument( + data=JsonApiDashboardPluginPatch( + attributes=JsonApiDashboardPluginInAttributes( + are_relations_valid=True, + content={}, + description="description_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="dashboardPlugin", + ), + ) # JsonApiDashboardPluginPatchDocument | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch a Plugin + api_response = api_instance.patch_entity_dashboard_plugins(workspace_id, object_id, json_api_dashboard_plugin_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DashboardPluginControllerApi->patch_entity_dashboard_plugins: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch a Plugin + api_response = api_instance.patch_entity_dashboard_plugins(workspace_id, object_id, json_api_dashboard_plugin_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DashboardPluginControllerApi->patch_entity_dashboard_plugins: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_dashboard_plugin_patch_document** | [**JsonApiDashboardPluginPatchDocument**](JsonApiDashboardPluginPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiDashboardPluginOutDocument**](JsonApiDashboardPluginOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_dashboard_plugins** +> JsonApiDashboardPluginOutList search_entities_dashboard_plugins(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import dashboard_plugin_controller_api +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_dashboard_plugin_out_list import JsonApiDashboardPluginOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = dashboard_plugin_controller_api.DashboardPluginControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_dashboard_plugins(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DashboardPluginControllerApi->search_entities_dashboard_plugins: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_dashboard_plugins(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DashboardPluginControllerApi->search_entities_dashboard_plugins: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiDashboardPluginOutList**](JsonApiDashboardPluginOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_dashboard_plugins** +> JsonApiDashboardPluginOutDocument update_entity_dashboard_plugins(workspace_id, object_id, json_api_dashboard_plugin_in_document) + +Put a Plugin + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import dashboard_plugin_controller_api +from gooddata_api_client.model.json_api_dashboard_plugin_out_document import JsonApiDashboardPluginOutDocument +from gooddata_api_client.model.json_api_dashboard_plugin_in_document import JsonApiDashboardPluginInDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = dashboard_plugin_controller_api.DashboardPluginControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_dashboard_plugin_in_document = JsonApiDashboardPluginInDocument( + data=JsonApiDashboardPluginIn( + attributes=JsonApiDashboardPluginInAttributes( + are_relations_valid=True, + content={}, + description="description_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="dashboardPlugin", + ), + ) # JsonApiDashboardPluginInDocument | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Put a Plugin + api_response = api_instance.update_entity_dashboard_plugins(workspace_id, object_id, json_api_dashboard_plugin_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DashboardPluginControllerApi->update_entity_dashboard_plugins: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put a Plugin + api_response = api_instance.update_entity_dashboard_plugins(workspace_id, object_id, json_api_dashboard_plugin_in_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DashboardPluginControllerApi->update_entity_dashboard_plugins: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_dashboard_plugin_in_document** | [**JsonApiDashboardPluginInDocument**](JsonApiDashboardPluginInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiDashboardPluginOutDocument**](JsonApiDashboardPluginOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/DataSourceControllerApi.md b/gooddata-api-client/docs/DataSourceControllerApi.md new file mode 100644 index 000000000..9e83fffb6 --- /dev/null +++ b/gooddata-api-client/docs/DataSourceControllerApi.md @@ -0,0 +1,572 @@ +# gooddata_api_client.DataSourceControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_data_sources**](DataSourceControllerApi.md#create_entity_data_sources) | **POST** /api/v1/entities/dataSources | Post Data Sources +[**delete_entity_data_sources**](DataSourceControllerApi.md#delete_entity_data_sources) | **DELETE** /api/v1/entities/dataSources/{id} | Delete Data Source entity +[**get_all_entities_data_sources**](DataSourceControllerApi.md#get_all_entities_data_sources) | **GET** /api/v1/entities/dataSources | Get Data Source entities +[**get_entity_data_sources**](DataSourceControllerApi.md#get_entity_data_sources) | **GET** /api/v1/entities/dataSources/{id} | Get Data Source entity +[**patch_entity_data_sources**](DataSourceControllerApi.md#patch_entity_data_sources) | **PATCH** /api/v1/entities/dataSources/{id} | Patch Data Source entity +[**update_entity_data_sources**](DataSourceControllerApi.md#update_entity_data_sources) | **PUT** /api/v1/entities/dataSources/{id} | Put Data Source entity + + +# **create_entity_data_sources** +> JsonApiDataSourceOutDocument create_entity_data_sources(json_api_data_source_in_document) + +Post Data Sources + +Data Source - represents data source for the workspace + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import data_source_controller_api +from gooddata_api_client.model.json_api_data_source_in_document import JsonApiDataSourceInDocument +from gooddata_api_client.model.json_api_data_source_out_document import JsonApiDataSourceOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_controller_api.DataSourceControllerApi(api_client) + json_api_data_source_in_document = JsonApiDataSourceInDocument( + data=JsonApiDataSourceIn( + attributes=JsonApiDataSourceInAttributes( + alternative_data_source_id="pg_local_docker-demo2", + cache_strategy="ALWAYS", + client_id="client_id_example", + client_secret="client_secret_example", + name="name_example", + parameters=[ + JsonApiDataSourceInAttributesParametersInner( + name="name_example", + value="value_example", + ), + ], + password="password_example", + private_key="private_key_example", + private_key_passphrase="private_key_passphrase_example", + schema="schema_example", + token="token_example", + type="POSTGRESQL", + url="url_example", + username="username_example", + ), + id="id1", + type="dataSource", + ), + ) # JsonApiDataSourceInDocument | + meta_include = [ + "metaInclude=permissions,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Post Data Sources + api_response = api_instance.create_entity_data_sources(json_api_data_source_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceControllerApi->create_entity_data_sources: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post Data Sources + api_response = api_instance.create_entity_data_sources(json_api_data_source_in_document, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceControllerApi->create_entity_data_sources: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **json_api_data_source_in_document** | [**JsonApiDataSourceInDocument**](JsonApiDataSourceInDocument.md)| | + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiDataSourceOutDocument**](JsonApiDataSourceOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_data_sources** +> delete_entity_data_sources(id) + +Delete Data Source entity + +Data Source - represents data source for the workspace + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import data_source_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_controller_api.DataSourceControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + filter = "name==someString;type==DatabaseTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete Data Source entity + api_instance.delete_entity_data_sources(id) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceControllerApi->delete_entity_data_sources: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete Data Source entity + api_instance.delete_entity_data_sources(id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceControllerApi->delete_entity_data_sources: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_data_sources** +> JsonApiDataSourceOutList get_all_entities_data_sources() + +Get Data Source entities + +Data Source - represents data source for the workspace + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import data_source_controller_api +from gooddata_api_client.model.json_api_data_source_out_list import JsonApiDataSourceOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_controller_api.DataSourceControllerApi(api_client) + filter = "name==someString;type==DatabaseTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + meta_include = [ + "metaInclude=permissions,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get Data Source entities + api_response = api_instance.get_all_entities_data_sources(filter=filter, page=page, size=size, sort=sort, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceControllerApi->get_all_entities_data_sources: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiDataSourceOutList**](JsonApiDataSourceOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_data_sources** +> JsonApiDataSourceOutDocument get_entity_data_sources(id) + +Get Data Source entity + +Data Source - represents data source for the workspace + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import data_source_controller_api +from gooddata_api_client.model.json_api_data_source_out_document import JsonApiDataSourceOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_controller_api.DataSourceControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + filter = "name==someString;type==DatabaseTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + meta_include = [ + "metaInclude=permissions,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get Data Source entity + api_response = api_instance.get_entity_data_sources(id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceControllerApi->get_entity_data_sources: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get Data Source entity + api_response = api_instance.get_entity_data_sources(id, filter=filter, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceControllerApi->get_entity_data_sources: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiDataSourceOutDocument**](JsonApiDataSourceOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_data_sources** +> JsonApiDataSourceOutDocument patch_entity_data_sources(id, json_api_data_source_patch_document) + +Patch Data Source entity + +Data Source - represents data source for the workspace + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import data_source_controller_api +from gooddata_api_client.model.json_api_data_source_patch_document import JsonApiDataSourcePatchDocument +from gooddata_api_client.model.json_api_data_source_out_document import JsonApiDataSourceOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_controller_api.DataSourceControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + json_api_data_source_patch_document = JsonApiDataSourcePatchDocument( + data=JsonApiDataSourcePatch( + attributes=JsonApiDataSourcePatchAttributes( + alternative_data_source_id="pg_local_docker-demo2", + cache_strategy="ALWAYS", + client_id="client_id_example", + client_secret="client_secret_example", + name="name_example", + parameters=[ + JsonApiDataSourceInAttributesParametersInner( + name="name_example", + value="value_example", + ), + ], + password="password_example", + private_key="private_key_example", + private_key_passphrase="private_key_passphrase_example", + schema="schema_example", + token="token_example", + type="POSTGRESQL", + url="url_example", + username="username_example", + ), + id="id1", + type="dataSource", + ), + ) # JsonApiDataSourcePatchDocument | + filter = "name==someString;type==DatabaseTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Patch Data Source entity + api_response = api_instance.patch_entity_data_sources(id, json_api_data_source_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceControllerApi->patch_entity_data_sources: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch Data Source entity + api_response = api_instance.patch_entity_data_sources(id, json_api_data_source_patch_document, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceControllerApi->patch_entity_data_sources: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_data_source_patch_document** | [**JsonApiDataSourcePatchDocument**](JsonApiDataSourcePatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiDataSourceOutDocument**](JsonApiDataSourceOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_data_sources** +> JsonApiDataSourceOutDocument update_entity_data_sources(id, json_api_data_source_in_document) + +Put Data Source entity + +Data Source - represents data source for the workspace + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import data_source_controller_api +from gooddata_api_client.model.json_api_data_source_in_document import JsonApiDataSourceInDocument +from gooddata_api_client.model.json_api_data_source_out_document import JsonApiDataSourceOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_controller_api.DataSourceControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + json_api_data_source_in_document = JsonApiDataSourceInDocument( + data=JsonApiDataSourceIn( + attributes=JsonApiDataSourceInAttributes( + alternative_data_source_id="pg_local_docker-demo2", + cache_strategy="ALWAYS", + client_id="client_id_example", + client_secret="client_secret_example", + name="name_example", + parameters=[ + JsonApiDataSourceInAttributesParametersInner( + name="name_example", + value="value_example", + ), + ], + password="password_example", + private_key="private_key_example", + private_key_passphrase="private_key_passphrase_example", + schema="schema_example", + token="token_example", + type="POSTGRESQL", + url="url_example", + username="username_example", + ), + id="id1", + type="dataSource", + ), + ) # JsonApiDataSourceInDocument | + filter = "name==someString;type==DatabaseTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Put Data Source entity + api_response = api_instance.update_entity_data_sources(id, json_api_data_source_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceControllerApi->update_entity_data_sources: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put Data Source entity + api_response = api_instance.update_entity_data_sources(id, json_api_data_source_in_document, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceControllerApi->update_entity_data_sources: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_data_source_in_document** | [**JsonApiDataSourceInDocument**](JsonApiDataSourceInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiDataSourceOutDocument**](JsonApiDataSourceOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/DataSourceFilesAnalysisApi.md b/gooddata-api-client/docs/DataSourceFilesAnalysisApi.md new file mode 100644 index 000000000..c72f62a76 --- /dev/null +++ b/gooddata-api-client/docs/DataSourceFilesAnalysisApi.md @@ -0,0 +1,91 @@ +# gooddata_api_client.DataSourceFilesAnalysisApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**analyze_csv**](DataSourceFilesAnalysisApi.md#analyze_csv) | **POST** /api/v1/actions/fileStorage/staging/analyzeCsv | Analyze CSV + + +# **analyze_csv** +> [AnalyzeCsvResponse] analyze_csv(analyze_csv_request) + +Analyze CSV + +Analyzes CSV files at the given locations + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import data_source_files_analysis_api +from gooddata_api_client.model.analyze_csv_response import AnalyzeCsvResponse +from gooddata_api_client.model.analyze_csv_request import AnalyzeCsvRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_files_analysis_api.DataSourceFilesAnalysisApi(api_client) + analyze_csv_request = AnalyzeCsvRequest( + analyze_requests=[ + AnalyzeCsvRequestItem( + config=AnalyzeCsvRequestItemConfig( + delimiters=[ + "delimiters_example", + ], + header_detect_max_rows=1, + header_row_count=1, + result_rows=1, + ), + location="location_example", + ), + ], + ) # AnalyzeCsvRequest | + + # example passing only required values which don't have defaults set + try: + # Analyze CSV + api_response = api_instance.analyze_csv(analyze_csv_request) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceFilesAnalysisApi->analyze_csv: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analyze_csv_request** | [**AnalyzeCsvRequest**](AnalyzeCsvRequest.md)| | + +### Return type + +[**[AnalyzeCsvResponse]**](AnalyzeCsvResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful analysis. | - | + +[[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/gooddata-api-client/docs/DataSourceFilesDeletionApi.md b/gooddata-api-client/docs/DataSourceFilesDeletionApi.md new file mode 100644 index 000000000..302b5c66b --- /dev/null +++ b/gooddata-api-client/docs/DataSourceFilesDeletionApi.md @@ -0,0 +1,81 @@ +# gooddata_api_client.DataSourceFilesDeletionApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_files**](DataSourceFilesDeletionApi.md#delete_files) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/deleteFiles | Delete datasource files + + +# **delete_files** +> delete_files(data_source_id, delete_files_request) + +Delete datasource files + +Delete the files in the given data source. + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import data_source_files_deletion_api +from gooddata_api_client.model.delete_files_request import DeleteFilesRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_files_deletion_api.DataSourceFilesDeletionApi(api_client) + data_source_id = "dataSourceId_example" # str | + delete_files_request = DeleteFilesRequest( + file_names=[ + "file_names_example", + ], + ) # DeleteFilesRequest | + + # example passing only required values which don't have defaults set + try: + # Delete datasource files + api_instance.delete_files(data_source_id, delete_files_request) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceFilesDeletionApi->delete_files: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_source_id** | **str**| | + **delete_files_request** | [**DeleteFilesRequest**](DeleteFilesRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successful deletion. | - | + +[[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/gooddata-api-client/docs/DataSourceFilesImportApi.md b/gooddata-api-client/docs/DataSourceFilesImportApi.md new file mode 100644 index 000000000..f408fc439 --- /dev/null +++ b/gooddata-api-client/docs/DataSourceFilesImportApi.md @@ -0,0 +1,143 @@ +# gooddata_api_client.DataSourceFilesImportApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**import_csv**](DataSourceFilesImportApi.md#import_csv) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/importCsv | Import CSV + + +# **import_csv** +> [ImportCsvResponse] import_csv(data_source_id, import_csv_request) + +Import CSV + +Import the CSV files at the given locations in the staging area to the final location. + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import data_source_files_import_api +from gooddata_api_client.model.import_csv_request import ImportCsvRequest +from gooddata_api_client.model.import_csv_response import ImportCsvResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_files_import_api.DataSourceFilesImportApi(api_client) + data_source_id = "dataSourceId_example" # str | + import_csv_request = ImportCsvRequest( + tables=[ + ImportCsvRequestTable( + name="name_example", + source=ImportCsvRequestTableSource( + config=ImportCsvRequestTableSourceConfig( + column_date_formats={ + "key": "key_example", + }, + convert_options=CsvConvertOptions( + auto_dict_encode=True, + auto_dict_max_cardinality=1, + check_utf8=True, + column_types=[ + CsvConvertOptionsColumnType( + name="name_example", + nullable=True, + type="type_example", + ), + ], + decimal_point="decimal_point_example", + false_values=[ + "false_values_example", + ], + include_columns=[ + "include_columns_example", + ], + include_missing_columns=True, + null_values=[ + "null_values_example", + ], + quoted_strings_can_be_null=True, + strings_can_be_null=True, + timestamp_parsers=[ + "timestamp_parsers_example", + ], + true_values=[ + "true_values_example", + ], + ), + parse_options=CsvParseOptions( + delimiter="delimiter_example", + double_quote=True, + escape_char={}, + ignore_empty_lines=True, + newlines_in_values=True, + quote_char={}, + ), + read_options=CsvReadOptions( + auto_generate_column_names=True, + block_size=1, + column_names=[ + "column_names_example", + ], + encoding="encoding_example", + skip_rows=1, + skip_rows_after_names=1, + use_threads=True, + ), + ), + location="location_example", + ), + ), + ], + ) # ImportCsvRequest | + + # example passing only required values which don't have defaults set + try: + # Import CSV + api_response = api_instance.import_csv(data_source_id, import_csv_request) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceFilesImportApi->import_csv: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_source_id** | **str**| | + **import_csv_request** | [**ImportCsvRequest**](ImportCsvRequest.md)| | + +### Return type + +[**[ImportCsvResponse]**](ImportCsvResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful import. | - | + +[[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/gooddata-api-client/docs/DataSourceFilesListingApi.md b/gooddata-api-client/docs/DataSourceFilesListingApi.md new file mode 100644 index 000000000..5815e9368 --- /dev/null +++ b/gooddata-api-client/docs/DataSourceFilesListingApi.md @@ -0,0 +1,76 @@ +# gooddata_api_client.DataSourceFilesListingApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_files**](DataSourceFilesListingApi.md#list_files) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/listFiles | List datasource files + + +# **list_files** +> [GdStorageFile] list_files(data_source_id) + +List datasource files + +List all the files in the given data source. + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import data_source_files_listing_api +from gooddata_api_client.model.gd_storage_file import GdStorageFile +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_files_listing_api.DataSourceFilesListingApi(api_client) + data_source_id = "dataSourceId_example" # str | + + # example passing only required values which don't have defaults set + try: + # List datasource files + api_response = api_instance.list_files(data_source_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceFilesListingApi->list_files: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_source_id** | **str**| | + +### Return type + +[**[GdStorageFile]**](GdStorageFile.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful listing. | - | + +[[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/gooddata-api-client/docs/DataSourceFilesManifestReadApi.md b/gooddata-api-client/docs/DataSourceFilesManifestReadApi.md new file mode 100644 index 000000000..85eeb7d81 --- /dev/null +++ b/gooddata-api-client/docs/DataSourceFilesManifestReadApi.md @@ -0,0 +1,86 @@ +# gooddata_api_client.DataSourceFilesManifestReadApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**read_csv_file_manifests**](DataSourceFilesManifestReadApi.md#read_csv_file_manifests) | **POST** /api/v1/actions/fileStorage/dataSources/{dataSourceId}/readCsvFileManifests | Read CSV file manifests + + +# **read_csv_file_manifests** +> [ReadCsvFileManifestsResponse] read_csv_file_manifests(data_source_id, read_csv_file_manifests_request) + +Read CSV file manifests + +Read the manifests of the CSV files in the given data source. + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import data_source_files_manifest_read_api +from gooddata_api_client.model.read_csv_file_manifests_response import ReadCsvFileManifestsResponse +from gooddata_api_client.model.read_csv_file_manifests_request import ReadCsvFileManifestsRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_files_manifest_read_api.DataSourceFilesManifestReadApi(api_client) + data_source_id = "dataSourceId_example" # str | + read_csv_file_manifests_request = ReadCsvFileManifestsRequest( + manifest_requests=[ + ReadCsvFileManifestsRequestItem( + file_name="file_name_example", + version=1, + ), + ], + ) # ReadCsvFileManifestsRequest | + + # example passing only required values which don't have defaults set + try: + # Read CSV file manifests + api_response = api_instance.read_csv_file_manifests(data_source_id, read_csv_file_manifests_request) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceFilesManifestReadApi->read_csv_file_manifests: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_source_id** | **str**| | + **read_csv_file_manifests_request** | [**ReadCsvFileManifestsRequest**](ReadCsvFileManifestsRequest.md)| | + +### Return type + +[**[ReadCsvFileManifestsResponse]**](ReadCsvFileManifestsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful listing. | - | + +[[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/gooddata-api-client/docs/DataSourceStagingLocationApi.md b/gooddata-api-client/docs/DataSourceStagingLocationApi.md new file mode 100644 index 000000000..02ef651bb --- /dev/null +++ b/gooddata-api-client/docs/DataSourceStagingLocationApi.md @@ -0,0 +1,76 @@ +# gooddata_api_client.DataSourceStagingLocationApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**staging_upload**](DataSourceStagingLocationApi.md#staging_upload) | **POST** /api/v1/actions/fileStorage/staging/upload | Upload a file to the staging area + + +# **staging_upload** +> UploadFileResponse staging_upload(file) + +Upload a file to the staging area + +Provides a location for uploading staging files. + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import data_source_staging_location_api +from gooddata_api_client.model.upload_file_response import UploadFileResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_staging_location_api.DataSourceStagingLocationApi(api_client) + file = open('/path/to/file', 'rb') # file_type | The file to upload. + + # example passing only required values which don't have defaults set + try: + # Upload a file to the staging area + api_response = api_instance.staging_upload(file) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DataSourceStagingLocationApi->staging_upload: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **file** | **file_type**| The file to upload. | + +### Return type + +[**UploadFileResponse**](UploadFileResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Upload was successful. | - | + +[[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/gooddata-api-client/docs/DatasetControllerApi.md b/gooddata-api-client/docs/DatasetControllerApi.md new file mode 100644 index 000000000..6886b46c2 --- /dev/null +++ b/gooddata-api-client/docs/DatasetControllerApi.md @@ -0,0 +1,392 @@ +# gooddata_api_client.DatasetControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_all_entities_datasets**](DatasetControllerApi.md#get_all_entities_datasets) | **GET** /api/v1/entities/workspaces/{workspaceId}/datasets | Get all Datasets +[**get_entity_datasets**](DatasetControllerApi.md#get_entity_datasets) | **GET** /api/v1/entities/workspaces/{workspaceId}/datasets/{objectId} | Get a Dataset +[**patch_entity_datasets**](DatasetControllerApi.md#patch_entity_datasets) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/datasets/{objectId} | Patch a Dataset (beta) +[**search_entities_datasets**](DatasetControllerApi.md#search_entities_datasets) | **POST** /api/v1/entities/workspaces/{workspaceId}/datasets/search | The search endpoint (beta) + + +# **get_all_entities_datasets** +> JsonApiDatasetOutList get_all_entities_datasets(workspace_id) + +Get all Datasets + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import dataset_controller_api +from gooddata_api_client.model.json_api_dataset_out_list import JsonApiDatasetOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = dataset_controller_api.DatasetControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "attributes,facts,aggregatedFacts,references,workspaceDataFilters", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Datasets + api_response = api_instance.get_all_entities_datasets(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DatasetControllerApi->get_all_entities_datasets: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Datasets + api_response = api_instance.get_all_entities_datasets(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DatasetControllerApi->get_all_entities_datasets: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiDatasetOutList**](JsonApiDatasetOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_datasets** +> JsonApiDatasetOutDocument get_entity_datasets(workspace_id, object_id) + +Get a Dataset + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import dataset_controller_api +from gooddata_api_client.model.json_api_dataset_out_document import JsonApiDatasetOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = dataset_controller_api.DatasetControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "attributes,facts,aggregatedFacts,references,workspaceDataFilters", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get a Dataset + api_response = api_instance.get_entity_datasets(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DatasetControllerApi->get_entity_datasets: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a Dataset + api_response = api_instance.get_entity_datasets(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DatasetControllerApi->get_entity_datasets: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiDatasetOutDocument**](JsonApiDatasetOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_datasets** +> JsonApiDatasetOutDocument patch_entity_datasets(workspace_id, object_id, json_api_dataset_patch_document) + +Patch a Dataset (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import dataset_controller_api +from gooddata_api_client.model.json_api_dataset_out_document import JsonApiDatasetOutDocument +from gooddata_api_client.model.json_api_dataset_patch_document import JsonApiDatasetPatchDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = dataset_controller_api.DatasetControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_dataset_patch_document = JsonApiDatasetPatchDocument( + data=JsonApiDatasetPatch( + attributes=JsonApiAttributePatchAttributes( + description="description_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="dataset", + ), + ) # JsonApiDatasetPatchDocument | + filter = "title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "attributes,facts,aggregatedFacts,references,workspaceDataFilters", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch a Dataset (beta) + api_response = api_instance.patch_entity_datasets(workspace_id, object_id, json_api_dataset_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DatasetControllerApi->patch_entity_datasets: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch a Dataset (beta) + api_response = api_instance.patch_entity_datasets(workspace_id, object_id, json_api_dataset_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DatasetControllerApi->patch_entity_datasets: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_dataset_patch_document** | [**JsonApiDatasetPatchDocument**](JsonApiDatasetPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiDatasetOutDocument**](JsonApiDatasetOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_datasets** +> JsonApiDatasetOutList search_entities_datasets(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import dataset_controller_api +from gooddata_api_client.model.json_api_dataset_out_list import JsonApiDatasetOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = dataset_controller_api.DatasetControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_datasets(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DatasetControllerApi->search_entities_datasets: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_datasets(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling DatasetControllerApi->search_entities_datasets: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiDatasetOutList**](JsonApiDatasetOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/DeleteFilesRequest.md b/gooddata-api-client/docs/DeleteFilesRequest.md new file mode 100644 index 000000000..1e92de431 --- /dev/null +++ b/gooddata-api-client/docs/DeleteFilesRequest.md @@ -0,0 +1,13 @@ +# DeleteFilesRequest + +Request to delete files from the storage. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_names** | **[str]** | Names of the files to delete. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ExportDefinitionControllerApi.md b/gooddata-api-client/docs/ExportDefinitionControllerApi.md new file mode 100644 index 000000000..072a63ff2 --- /dev/null +++ b/gooddata-api-client/docs/ExportDefinitionControllerApi.md @@ -0,0 +1,694 @@ +# gooddata_api_client.ExportDefinitionControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_export_definitions**](ExportDefinitionControllerApi.md#create_entity_export_definitions) | **POST** /api/v1/entities/workspaces/{workspaceId}/exportDefinitions | Post Export Definitions +[**delete_entity_export_definitions**](ExportDefinitionControllerApi.md#delete_entity_export_definitions) | **DELETE** /api/v1/entities/workspaces/{workspaceId}/exportDefinitions/{objectId} | Delete an Export Definition +[**get_all_entities_export_definitions**](ExportDefinitionControllerApi.md#get_all_entities_export_definitions) | **GET** /api/v1/entities/workspaces/{workspaceId}/exportDefinitions | Get all Export Definitions +[**get_entity_export_definitions**](ExportDefinitionControllerApi.md#get_entity_export_definitions) | **GET** /api/v1/entities/workspaces/{workspaceId}/exportDefinitions/{objectId} | Get an Export Definition +[**patch_entity_export_definitions**](ExportDefinitionControllerApi.md#patch_entity_export_definitions) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/exportDefinitions/{objectId} | Patch an Export Definition +[**search_entities_export_definitions**](ExportDefinitionControllerApi.md#search_entities_export_definitions) | **POST** /api/v1/entities/workspaces/{workspaceId}/exportDefinitions/search | The search endpoint (beta) +[**update_entity_export_definitions**](ExportDefinitionControllerApi.md#update_entity_export_definitions) | **PUT** /api/v1/entities/workspaces/{workspaceId}/exportDefinitions/{objectId} | Put an Export Definition + + +# **create_entity_export_definitions** +> JsonApiExportDefinitionOutDocument create_entity_export_definitions(workspace_id, json_api_export_definition_post_optional_id_document) + +Post Export Definitions + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import export_definition_controller_api +from gooddata_api_client.model.json_api_export_definition_out_document import JsonApiExportDefinitionOutDocument +from gooddata_api_client.model.json_api_export_definition_post_optional_id_document import JsonApiExportDefinitionPostOptionalIdDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = export_definition_controller_api.ExportDefinitionControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_export_definition_post_optional_id_document = JsonApiExportDefinitionPostOptionalIdDocument( + data=JsonApiExportDefinitionPostOptionalId( + attributes=JsonApiExportDefinitionInAttributes( + are_relations_valid=True, + description="description_example", + request_payload=JsonApiExportDefinitionInAttributesRequestPayload(), + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + relationships=JsonApiExportDefinitionInRelationships( + analytical_dashboard=JsonApiAutomationInRelationshipsAnalyticalDashboard( + data=JsonApiAnalyticalDashboardToOneLinkage(None), + ), + visualization_object=JsonApiExportDefinitionInRelationshipsVisualizationObject( + data=JsonApiVisualizationObjectToOneLinkage(None), + ), + ), + type="exportDefinition", + ), + ) # JsonApiExportDefinitionPostOptionalIdDocument | + include = [ + "visualizationObject,analyticalDashboard,automation,createdBy,modifiedBy", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Post Export Definitions + api_response = api_instance.create_entity_export_definitions(workspace_id, json_api_export_definition_post_optional_id_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ExportDefinitionControllerApi->create_entity_export_definitions: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post Export Definitions + api_response = api_instance.create_entity_export_definitions(workspace_id, json_api_export_definition_post_optional_id_document, include=include, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ExportDefinitionControllerApi->create_entity_export_definitions: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_export_definition_post_optional_id_document** | [**JsonApiExportDefinitionPostOptionalIdDocument**](JsonApiExportDefinitionPostOptionalIdDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiExportDefinitionOutDocument**](JsonApiExportDefinitionOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_export_definitions** +> delete_entity_export_definitions(workspace_id, object_id) + +Delete an Export Definition + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import export_definition_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = export_definition_controller_api.ExportDefinitionControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;visualizationObject.id==321;analyticalDashboard.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete an Export Definition + api_instance.delete_entity_export_definitions(workspace_id, object_id) + except gooddata_api_client.ApiException as e: + print("Exception when calling ExportDefinitionControllerApi->delete_entity_export_definitions: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete an Export Definition + api_instance.delete_entity_export_definitions(workspace_id, object_id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling ExportDefinitionControllerApi->delete_entity_export_definitions: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_export_definitions** +> JsonApiExportDefinitionOutList get_all_entities_export_definitions(workspace_id) + +Get all Export Definitions + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import export_definition_controller_api +from gooddata_api_client.model.json_api_export_definition_out_list import JsonApiExportDefinitionOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = export_definition_controller_api.ExportDefinitionControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString;visualizationObject.id==321;analyticalDashboard.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "visualizationObject,analyticalDashboard,automation,createdBy,modifiedBy", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Export Definitions + api_response = api_instance.get_all_entities_export_definitions(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ExportDefinitionControllerApi->get_all_entities_export_definitions: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Export Definitions + api_response = api_instance.get_all_entities_export_definitions(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ExportDefinitionControllerApi->get_all_entities_export_definitions: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiExportDefinitionOutList**](JsonApiExportDefinitionOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_export_definitions** +> JsonApiExportDefinitionOutDocument get_entity_export_definitions(workspace_id, object_id) + +Get an Export Definition + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import export_definition_controller_api +from gooddata_api_client.model.json_api_export_definition_out_document import JsonApiExportDefinitionOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = export_definition_controller_api.ExportDefinitionControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;visualizationObject.id==321;analyticalDashboard.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "visualizationObject,analyticalDashboard,automation,createdBy,modifiedBy", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get an Export Definition + api_response = api_instance.get_entity_export_definitions(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ExportDefinitionControllerApi->get_entity_export_definitions: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get an Export Definition + api_response = api_instance.get_entity_export_definitions(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ExportDefinitionControllerApi->get_entity_export_definitions: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiExportDefinitionOutDocument**](JsonApiExportDefinitionOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_export_definitions** +> JsonApiExportDefinitionOutDocument patch_entity_export_definitions(workspace_id, object_id, json_api_export_definition_patch_document) + +Patch an Export Definition + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import export_definition_controller_api +from gooddata_api_client.model.json_api_export_definition_out_document import JsonApiExportDefinitionOutDocument +from gooddata_api_client.model.json_api_export_definition_patch_document import JsonApiExportDefinitionPatchDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = export_definition_controller_api.ExportDefinitionControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_export_definition_patch_document = JsonApiExportDefinitionPatchDocument( + data=JsonApiExportDefinitionPatch( + attributes=JsonApiExportDefinitionInAttributes( + are_relations_valid=True, + description="description_example", + request_payload=JsonApiExportDefinitionInAttributesRequestPayload(), + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + relationships=JsonApiExportDefinitionInRelationships( + analytical_dashboard=JsonApiAutomationInRelationshipsAnalyticalDashboard( + data=JsonApiAnalyticalDashboardToOneLinkage(None), + ), + visualization_object=JsonApiExportDefinitionInRelationshipsVisualizationObject( + data=JsonApiVisualizationObjectToOneLinkage(None), + ), + ), + type="exportDefinition", + ), + ) # JsonApiExportDefinitionPatchDocument | + filter = "title==someString;description==someString;visualizationObject.id==321;analyticalDashboard.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "visualizationObject,analyticalDashboard,automation,createdBy,modifiedBy", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch an Export Definition + api_response = api_instance.patch_entity_export_definitions(workspace_id, object_id, json_api_export_definition_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ExportDefinitionControllerApi->patch_entity_export_definitions: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch an Export Definition + api_response = api_instance.patch_entity_export_definitions(workspace_id, object_id, json_api_export_definition_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ExportDefinitionControllerApi->patch_entity_export_definitions: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_export_definition_patch_document** | [**JsonApiExportDefinitionPatchDocument**](JsonApiExportDefinitionPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiExportDefinitionOutDocument**](JsonApiExportDefinitionOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_export_definitions** +> JsonApiExportDefinitionOutList search_entities_export_definitions(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import export_definition_controller_api +from gooddata_api_client.model.json_api_export_definition_out_list import JsonApiExportDefinitionOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = export_definition_controller_api.ExportDefinitionControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_export_definitions(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ExportDefinitionControllerApi->search_entities_export_definitions: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_export_definitions(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ExportDefinitionControllerApi->search_entities_export_definitions: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiExportDefinitionOutList**](JsonApiExportDefinitionOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_export_definitions** +> JsonApiExportDefinitionOutDocument update_entity_export_definitions(workspace_id, object_id, json_api_export_definition_in_document) + +Put an Export Definition + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import export_definition_controller_api +from gooddata_api_client.model.json_api_export_definition_out_document import JsonApiExportDefinitionOutDocument +from gooddata_api_client.model.json_api_export_definition_in_document import JsonApiExportDefinitionInDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = export_definition_controller_api.ExportDefinitionControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_export_definition_in_document = JsonApiExportDefinitionInDocument( + data=JsonApiExportDefinitionIn( + attributes=JsonApiExportDefinitionInAttributes( + are_relations_valid=True, + description="description_example", + request_payload=JsonApiExportDefinitionInAttributesRequestPayload(), + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + relationships=JsonApiExportDefinitionInRelationships( + analytical_dashboard=JsonApiAutomationInRelationshipsAnalyticalDashboard( + data=JsonApiAnalyticalDashboardToOneLinkage(None), + ), + visualization_object=JsonApiExportDefinitionInRelationshipsVisualizationObject( + data=JsonApiVisualizationObjectToOneLinkage(None), + ), + ), + type="exportDefinition", + ), + ) # JsonApiExportDefinitionInDocument | + filter = "title==someString;description==someString;visualizationObject.id==321;analyticalDashboard.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "visualizationObject,analyticalDashboard,automation,createdBy,modifiedBy", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Put an Export Definition + api_response = api_instance.update_entity_export_definitions(workspace_id, object_id, json_api_export_definition_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ExportDefinitionControllerApi->update_entity_export_definitions: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put an Export Definition + api_response = api_instance.update_entity_export_definitions(workspace_id, object_id, json_api_export_definition_in_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling ExportDefinitionControllerApi->update_entity_export_definitions: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_export_definition_in_document** | [**JsonApiExportDefinitionInDocument**](JsonApiExportDefinitionInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiExportDefinitionOutDocument**](JsonApiExportDefinitionOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/FactControllerApi.md b/gooddata-api-client/docs/FactControllerApi.md new file mode 100644 index 000000000..df90c3c3e --- /dev/null +++ b/gooddata-api-client/docs/FactControllerApi.md @@ -0,0 +1,392 @@ +# gooddata_api_client.FactControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_all_entities_facts**](FactControllerApi.md#get_all_entities_facts) | **GET** /api/v1/entities/workspaces/{workspaceId}/facts | Get all Facts +[**get_entity_facts**](FactControllerApi.md#get_entity_facts) | **GET** /api/v1/entities/workspaces/{workspaceId}/facts/{objectId} | Get a Fact +[**patch_entity_facts**](FactControllerApi.md#patch_entity_facts) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/facts/{objectId} | Patch a Fact (beta) +[**search_entities_facts**](FactControllerApi.md#search_entities_facts) | **POST** /api/v1/entities/workspaces/{workspaceId}/facts/search | The search endpoint (beta) + + +# **get_all_entities_facts** +> JsonApiFactOutList get_all_entities_facts(workspace_id) + +Get all Facts + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import fact_controller_api +from gooddata_api_client.model.json_api_fact_out_list import JsonApiFactOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = fact_controller_api.FactControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString;dataset.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "dataset", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Facts + api_response = api_instance.get_all_entities_facts(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FactControllerApi->get_all_entities_facts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Facts + api_response = api_instance.get_all_entities_facts(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FactControllerApi->get_all_entities_facts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiFactOutList**](JsonApiFactOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_facts** +> JsonApiFactOutDocument get_entity_facts(workspace_id, object_id) + +Get a Fact + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import fact_controller_api +from gooddata_api_client.model.json_api_fact_out_document import JsonApiFactOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = fact_controller_api.FactControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;dataset.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "dataset", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get a Fact + api_response = api_instance.get_entity_facts(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FactControllerApi->get_entity_facts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a Fact + api_response = api_instance.get_entity_facts(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FactControllerApi->get_entity_facts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiFactOutDocument**](JsonApiFactOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_facts** +> JsonApiFactOutDocument patch_entity_facts(workspace_id, object_id, json_api_fact_patch_document) + +Patch a Fact (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import fact_controller_api +from gooddata_api_client.model.json_api_fact_out_document import JsonApiFactOutDocument +from gooddata_api_client.model.json_api_fact_patch_document import JsonApiFactPatchDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = fact_controller_api.FactControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_fact_patch_document = JsonApiFactPatchDocument( + data=JsonApiFactPatch( + attributes=JsonApiAttributePatchAttributes( + description="description_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="fact", + ), + ) # JsonApiFactPatchDocument | + filter = "title==someString;description==someString;dataset.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "dataset", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch a Fact (beta) + api_response = api_instance.patch_entity_facts(workspace_id, object_id, json_api_fact_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FactControllerApi->patch_entity_facts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch a Fact (beta) + api_response = api_instance.patch_entity_facts(workspace_id, object_id, json_api_fact_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FactControllerApi->patch_entity_facts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_fact_patch_document** | [**JsonApiFactPatchDocument**](JsonApiFactPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiFactOutDocument**](JsonApiFactOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_facts** +> JsonApiFactOutList search_entities_facts(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import fact_controller_api +from gooddata_api_client.model.json_api_fact_out_list import JsonApiFactOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = fact_controller_api.FactControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_facts(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FactControllerApi->search_entities_facts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_facts(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FactControllerApi->search_entities_facts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiFactOutList**](JsonApiFactOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/FilterContextControllerApi.md b/gooddata-api-client/docs/FilterContextControllerApi.md new file mode 100644 index 000000000..3758102f1 --- /dev/null +++ b/gooddata-api-client/docs/FilterContextControllerApi.md @@ -0,0 +1,670 @@ +# gooddata_api_client.FilterContextControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_filter_contexts**](FilterContextControllerApi.md#create_entity_filter_contexts) | **POST** /api/v1/entities/workspaces/{workspaceId}/filterContexts | Post Filter Context +[**delete_entity_filter_contexts**](FilterContextControllerApi.md#delete_entity_filter_contexts) | **DELETE** /api/v1/entities/workspaces/{workspaceId}/filterContexts/{objectId} | Delete a Filter Context +[**get_all_entities_filter_contexts**](FilterContextControllerApi.md#get_all_entities_filter_contexts) | **GET** /api/v1/entities/workspaces/{workspaceId}/filterContexts | Get all Filter Context +[**get_entity_filter_contexts**](FilterContextControllerApi.md#get_entity_filter_contexts) | **GET** /api/v1/entities/workspaces/{workspaceId}/filterContexts/{objectId} | Get a Filter Context +[**patch_entity_filter_contexts**](FilterContextControllerApi.md#patch_entity_filter_contexts) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/filterContexts/{objectId} | Patch a Filter Context +[**search_entities_filter_contexts**](FilterContextControllerApi.md#search_entities_filter_contexts) | **POST** /api/v1/entities/workspaces/{workspaceId}/filterContexts/search | The search endpoint (beta) +[**update_entity_filter_contexts**](FilterContextControllerApi.md#update_entity_filter_contexts) | **PUT** /api/v1/entities/workspaces/{workspaceId}/filterContexts/{objectId} | Put a Filter Context + + +# **create_entity_filter_contexts** +> JsonApiFilterContextOutDocument create_entity_filter_contexts(workspace_id, json_api_filter_context_post_optional_id_document) + +Post Filter Context + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import filter_context_controller_api +from gooddata_api_client.model.json_api_filter_context_post_optional_id_document import JsonApiFilterContextPostOptionalIdDocument +from gooddata_api_client.model.json_api_filter_context_out_document import JsonApiFilterContextOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = filter_context_controller_api.FilterContextControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_filter_context_post_optional_id_document = JsonApiFilterContextPostOptionalIdDocument( + data=JsonApiFilterContextPostOptionalId( + attributes=JsonApiFilterContextInAttributes( + are_relations_valid=True, + content={}, + description="description_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="filterContext", + ), + ) # JsonApiFilterContextPostOptionalIdDocument | + include = [ + "attributes,datasets,labels", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Post Filter Context + api_response = api_instance.create_entity_filter_contexts(workspace_id, json_api_filter_context_post_optional_id_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterContextControllerApi->create_entity_filter_contexts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post Filter Context + api_response = api_instance.create_entity_filter_contexts(workspace_id, json_api_filter_context_post_optional_id_document, include=include, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterContextControllerApi->create_entity_filter_contexts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_filter_context_post_optional_id_document** | [**JsonApiFilterContextPostOptionalIdDocument**](JsonApiFilterContextPostOptionalIdDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiFilterContextOutDocument**](JsonApiFilterContextOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_filter_contexts** +> delete_entity_filter_contexts(workspace_id, object_id) + +Delete a Filter Context + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import filter_context_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = filter_context_controller_api.FilterContextControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete a Filter Context + api_instance.delete_entity_filter_contexts(workspace_id, object_id) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterContextControllerApi->delete_entity_filter_contexts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete a Filter Context + api_instance.delete_entity_filter_contexts(workspace_id, object_id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterContextControllerApi->delete_entity_filter_contexts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_filter_contexts** +> JsonApiFilterContextOutList get_all_entities_filter_contexts(workspace_id) + +Get all Filter Context + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import filter_context_controller_api +from gooddata_api_client.model.json_api_filter_context_out_list import JsonApiFilterContextOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = filter_context_controller_api.FilterContextControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "attributes,datasets,labels", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Filter Context + api_response = api_instance.get_all_entities_filter_contexts(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterContextControllerApi->get_all_entities_filter_contexts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Filter Context + api_response = api_instance.get_all_entities_filter_contexts(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterContextControllerApi->get_all_entities_filter_contexts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiFilterContextOutList**](JsonApiFilterContextOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_filter_contexts** +> JsonApiFilterContextOutDocument get_entity_filter_contexts(workspace_id, object_id) + +Get a Filter Context + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import filter_context_controller_api +from gooddata_api_client.model.json_api_filter_context_out_document import JsonApiFilterContextOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = filter_context_controller_api.FilterContextControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "attributes,datasets,labels", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get a Filter Context + api_response = api_instance.get_entity_filter_contexts(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterContextControllerApi->get_entity_filter_contexts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a Filter Context + api_response = api_instance.get_entity_filter_contexts(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterContextControllerApi->get_entity_filter_contexts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiFilterContextOutDocument**](JsonApiFilterContextOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_filter_contexts** +> JsonApiFilterContextOutDocument patch_entity_filter_contexts(workspace_id, object_id, json_api_filter_context_patch_document) + +Patch a Filter Context + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import filter_context_controller_api +from gooddata_api_client.model.json_api_filter_context_patch_document import JsonApiFilterContextPatchDocument +from gooddata_api_client.model.json_api_filter_context_out_document import JsonApiFilterContextOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = filter_context_controller_api.FilterContextControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_filter_context_patch_document = JsonApiFilterContextPatchDocument( + data=JsonApiFilterContextPatch( + attributes=JsonApiFilterContextPatchAttributes( + are_relations_valid=True, + content={}, + description="description_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="filterContext", + ), + ) # JsonApiFilterContextPatchDocument | + filter = "title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "attributes,datasets,labels", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch a Filter Context + api_response = api_instance.patch_entity_filter_contexts(workspace_id, object_id, json_api_filter_context_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterContextControllerApi->patch_entity_filter_contexts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch a Filter Context + api_response = api_instance.patch_entity_filter_contexts(workspace_id, object_id, json_api_filter_context_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterContextControllerApi->patch_entity_filter_contexts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_filter_context_patch_document** | [**JsonApiFilterContextPatchDocument**](JsonApiFilterContextPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiFilterContextOutDocument**](JsonApiFilterContextOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_filter_contexts** +> JsonApiFilterContextOutList search_entities_filter_contexts(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import filter_context_controller_api +from gooddata_api_client.model.json_api_filter_context_out_list import JsonApiFilterContextOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = filter_context_controller_api.FilterContextControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_filter_contexts(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterContextControllerApi->search_entities_filter_contexts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_filter_contexts(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterContextControllerApi->search_entities_filter_contexts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiFilterContextOutList**](JsonApiFilterContextOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_filter_contexts** +> JsonApiFilterContextOutDocument update_entity_filter_contexts(workspace_id, object_id, json_api_filter_context_in_document) + +Put a Filter Context + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import filter_context_controller_api +from gooddata_api_client.model.json_api_filter_context_in_document import JsonApiFilterContextInDocument +from gooddata_api_client.model.json_api_filter_context_out_document import JsonApiFilterContextOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = filter_context_controller_api.FilterContextControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_filter_context_in_document = JsonApiFilterContextInDocument( + data=JsonApiFilterContextIn( + attributes=JsonApiFilterContextInAttributes( + are_relations_valid=True, + content={}, + description="description_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="filterContext", + ), + ) # JsonApiFilterContextInDocument | + filter = "title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "attributes,datasets,labels", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Put a Filter Context + api_response = api_instance.update_entity_filter_contexts(workspace_id, object_id, json_api_filter_context_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterContextControllerApi->update_entity_filter_contexts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put a Filter Context + api_response = api_instance.update_entity_filter_contexts(workspace_id, object_id, json_api_filter_context_in_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterContextControllerApi->update_entity_filter_contexts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_filter_context_in_document** | [**JsonApiFilterContextInDocument**](JsonApiFilterContextInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiFilterContextOutDocument**](JsonApiFilterContextOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/FilterViewControllerApi.md b/gooddata-api-client/docs/FilterViewControllerApi.md new file mode 100644 index 000000000..c70c925ef --- /dev/null +++ b/gooddata-api-client/docs/FilterViewControllerApi.md @@ -0,0 +1,689 @@ +# gooddata_api_client.FilterViewControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_filter_views**](FilterViewControllerApi.md#create_entity_filter_views) | **POST** /api/v1/entities/workspaces/{workspaceId}/filterViews | Post Filter views +[**delete_entity_filter_views**](FilterViewControllerApi.md#delete_entity_filter_views) | **DELETE** /api/v1/entities/workspaces/{workspaceId}/filterViews/{objectId} | Delete Filter view +[**get_all_entities_filter_views**](FilterViewControllerApi.md#get_all_entities_filter_views) | **GET** /api/v1/entities/workspaces/{workspaceId}/filterViews | Get all Filter views +[**get_entity_filter_views**](FilterViewControllerApi.md#get_entity_filter_views) | **GET** /api/v1/entities/workspaces/{workspaceId}/filterViews/{objectId} | Get Filter view +[**patch_entity_filter_views**](FilterViewControllerApi.md#patch_entity_filter_views) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/filterViews/{objectId} | Patch Filter view +[**search_entities_filter_views**](FilterViewControllerApi.md#search_entities_filter_views) | **POST** /api/v1/entities/workspaces/{workspaceId}/filterViews/search | The search endpoint (beta) +[**update_entity_filter_views**](FilterViewControllerApi.md#update_entity_filter_views) | **PUT** /api/v1/entities/workspaces/{workspaceId}/filterViews/{objectId} | Put Filter views + + +# **create_entity_filter_views** +> JsonApiFilterViewOutDocument create_entity_filter_views(workspace_id, json_api_filter_view_in_document) + +Post Filter views + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import filter_view_controller_api +from gooddata_api_client.model.json_api_filter_view_in_document import JsonApiFilterViewInDocument +from gooddata_api_client.model.json_api_filter_view_out_document import JsonApiFilterViewOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = filter_view_controller_api.FilterViewControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_filter_view_in_document = JsonApiFilterViewInDocument( + data=JsonApiFilterViewIn( + attributes=JsonApiFilterViewInAttributes( + are_relations_valid=True, + content={}, + description="description_example", + is_default=True, + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + relationships=JsonApiFilterViewInRelationships( + analytical_dashboard=JsonApiAutomationInRelationshipsAnalyticalDashboard( + data=JsonApiAnalyticalDashboardToOneLinkage(None), + ), + user=JsonApiFilterViewInRelationshipsUser( + data=JsonApiUserToOneLinkage(None), + ), + ), + type="filterView", + ), + ) # JsonApiFilterViewInDocument | + include = [ + "analyticalDashboard,user", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Post Filter views + api_response = api_instance.create_entity_filter_views(workspace_id, json_api_filter_view_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterViewControllerApi->create_entity_filter_views: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post Filter views + api_response = api_instance.create_entity_filter_views(workspace_id, json_api_filter_view_in_document, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterViewControllerApi->create_entity_filter_views: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_filter_view_in_document** | [**JsonApiFilterViewInDocument**](JsonApiFilterViewInDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiFilterViewOutDocument**](JsonApiFilterViewOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_filter_views** +> delete_entity_filter_views(workspace_id, object_id) + +Delete Filter view + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import filter_view_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = filter_view_controller_api.FilterViewControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;analyticalDashboard.id==321;user.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete Filter view + api_instance.delete_entity_filter_views(workspace_id, object_id) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterViewControllerApi->delete_entity_filter_views: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete Filter view + api_instance.delete_entity_filter_views(workspace_id, object_id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterViewControllerApi->delete_entity_filter_views: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_filter_views** +> JsonApiFilterViewOutList get_all_entities_filter_views(workspace_id) + +Get all Filter views + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import filter_view_controller_api +from gooddata_api_client.model.json_api_filter_view_out_list import JsonApiFilterViewOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = filter_view_controller_api.FilterViewControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString;analyticalDashboard.id==321;user.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "analyticalDashboard,user", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Filter views + api_response = api_instance.get_all_entities_filter_views(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterViewControllerApi->get_all_entities_filter_views: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Filter views + api_response = api_instance.get_all_entities_filter_views(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterViewControllerApi->get_all_entities_filter_views: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiFilterViewOutList**](JsonApiFilterViewOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_filter_views** +> JsonApiFilterViewOutDocument get_entity_filter_views(workspace_id, object_id) + +Get Filter view + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import filter_view_controller_api +from gooddata_api_client.model.json_api_filter_view_out_document import JsonApiFilterViewOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = filter_view_controller_api.FilterViewControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;analyticalDashboard.id==321;user.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "analyticalDashboard,user", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # Get Filter view + api_response = api_instance.get_entity_filter_views(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterViewControllerApi->get_entity_filter_views: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get Filter view + api_response = api_instance.get_entity_filter_views(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterViewControllerApi->get_entity_filter_views: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiFilterViewOutDocument**](JsonApiFilterViewOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_filter_views** +> JsonApiFilterViewOutDocument patch_entity_filter_views(workspace_id, object_id, json_api_filter_view_patch_document) + +Patch Filter view + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import filter_view_controller_api +from gooddata_api_client.model.json_api_filter_view_patch_document import JsonApiFilterViewPatchDocument +from gooddata_api_client.model.json_api_filter_view_out_document import JsonApiFilterViewOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = filter_view_controller_api.FilterViewControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_filter_view_patch_document = JsonApiFilterViewPatchDocument( + data=JsonApiFilterViewPatch( + attributes=JsonApiFilterViewPatchAttributes( + are_relations_valid=True, + content={}, + description="description_example", + is_default=True, + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + relationships=JsonApiFilterViewInRelationships( + analytical_dashboard=JsonApiAutomationInRelationshipsAnalyticalDashboard( + data=JsonApiAnalyticalDashboardToOneLinkage(None), + ), + user=JsonApiFilterViewInRelationshipsUser( + data=JsonApiUserToOneLinkage(None), + ), + ), + type="filterView", + ), + ) # JsonApiFilterViewPatchDocument | + filter = "title==someString;description==someString;analyticalDashboard.id==321;user.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "analyticalDashboard,user", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch Filter view + api_response = api_instance.patch_entity_filter_views(workspace_id, object_id, json_api_filter_view_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterViewControllerApi->patch_entity_filter_views: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch Filter view + api_response = api_instance.patch_entity_filter_views(workspace_id, object_id, json_api_filter_view_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterViewControllerApi->patch_entity_filter_views: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_filter_view_patch_document** | [**JsonApiFilterViewPatchDocument**](JsonApiFilterViewPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiFilterViewOutDocument**](JsonApiFilterViewOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_filter_views** +> JsonApiFilterViewOutList search_entities_filter_views(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import filter_view_controller_api +from gooddata_api_client.model.json_api_filter_view_out_list import JsonApiFilterViewOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = filter_view_controller_api.FilterViewControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_filter_views(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterViewControllerApi->search_entities_filter_views: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_filter_views(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterViewControllerApi->search_entities_filter_views: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiFilterViewOutList**](JsonApiFilterViewOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_filter_views** +> JsonApiFilterViewOutDocument update_entity_filter_views(workspace_id, object_id, json_api_filter_view_in_document) + +Put Filter views + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import filter_view_controller_api +from gooddata_api_client.model.json_api_filter_view_in_document import JsonApiFilterViewInDocument +from gooddata_api_client.model.json_api_filter_view_out_document import JsonApiFilterViewOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = filter_view_controller_api.FilterViewControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_filter_view_in_document = JsonApiFilterViewInDocument( + data=JsonApiFilterViewIn( + attributes=JsonApiFilterViewInAttributes( + are_relations_valid=True, + content={}, + description="description_example", + is_default=True, + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + relationships=JsonApiFilterViewInRelationships( + analytical_dashboard=JsonApiAutomationInRelationshipsAnalyticalDashboard( + data=JsonApiAnalyticalDashboardToOneLinkage(None), + ), + user=JsonApiFilterViewInRelationshipsUser( + data=JsonApiUserToOneLinkage(None), + ), + ), + type="filterView", + ), + ) # JsonApiFilterViewInDocument | + filter = "title==someString;description==someString;analyticalDashboard.id==321;user.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "analyticalDashboard,user", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Put Filter views + api_response = api_instance.update_entity_filter_views(workspace_id, object_id, json_api_filter_view_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterViewControllerApi->update_entity_filter_views: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put Filter views + api_response = api_instance.update_entity_filter_views(workspace_id, object_id, json_api_filter_view_in_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling FilterViewControllerApi->update_entity_filter_views: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_filter_view_in_document** | [**JsonApiFilterViewInDocument**](JsonApiFilterViewInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiFilterViewOutDocument**](JsonApiFilterViewOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/GdStorageFile.md b/gooddata-api-client/docs/GdStorageFile.md new file mode 100644 index 000000000..d2bf06c36 --- /dev/null +++ b/gooddata-api-client/docs/GdStorageFile.md @@ -0,0 +1,16 @@ +# GdStorageFile + +File stored in GD Storage. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**modified_at** | **datetime** | Last modification timestamp of the file. | +**name** | **str** | Name of the file. | +**size** | **int** | Size of the file in bytes. | +**type** | **str** | Type of the file. | defaults to "CSV" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/GeoJsonFeature.md b/gooddata-api-client/docs/GeoJsonFeature.md new file mode 100644 index 000000000..e0e445af5 --- /dev/null +++ b/gooddata-api-client/docs/GeoJsonFeature.md @@ -0,0 +1,16 @@ +# GeoJsonFeature + +GeoJSON Feature + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**properties** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}** | | +**type** | **str** | | +**geometry** | [**GeoJsonGeometry**](GeoJsonGeometry.md) | | [optional] +**id** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/GeoJsonFeatureCollection.md b/gooddata-api-client/docs/GeoJsonFeatureCollection.md new file mode 100644 index 000000000..0b4fe02fb --- /dev/null +++ b/gooddata-api-client/docs/GeoJsonFeatureCollection.md @@ -0,0 +1,15 @@ +# GeoJsonFeatureCollection + +GeoJSON FeatureCollection + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**features** | [**[GeoJsonFeature]**](GeoJsonFeature.md) | | +**type** | **str** | | +**bbox** | **[float]** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/GeoJsonGeometry.md b/gooddata-api-client/docs/GeoJsonGeometry.md new file mode 100644 index 000000000..819d7e321 --- /dev/null +++ b/gooddata-api-client/docs/GeoJsonGeometry.md @@ -0,0 +1,14 @@ +# GeoJsonGeometry + +GeoJSON Geometry + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**coordinates** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | +**type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/GetServiceStatusResponse.md b/gooddata-api-client/docs/GetServiceStatusResponse.md new file mode 100644 index 000000000..efbedc255 --- /dev/null +++ b/gooddata-api-client/docs/GetServiceStatusResponse.md @@ -0,0 +1,13 @@ +# GetServiceStatusResponse + +Status of an AI Lake service + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**JsonNode**](JsonNode.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ImportCsvRequest.md b/gooddata-api-client/docs/ImportCsvRequest.md new file mode 100644 index 000000000..318564eb2 --- /dev/null +++ b/gooddata-api-client/docs/ImportCsvRequest.md @@ -0,0 +1,13 @@ +# ImportCsvRequest + +Request containing the information necessary to import one or more CSV files from the staging area. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tables** | [**[ImportCsvRequestTable]**](ImportCsvRequestTable.md) | Information about the individual tables. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ImportCsvRequestTable.md b/gooddata-api-client/docs/ImportCsvRequestTable.md new file mode 100644 index 000000000..aa5911c2c --- /dev/null +++ b/gooddata-api-client/docs/ImportCsvRequestTable.md @@ -0,0 +1,14 @@ +# ImportCsvRequestTable + +Information about a particular table. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the table. | +**source** | [**ImportCsvRequestTableSource**](ImportCsvRequestTableSource.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ImportCsvRequestTableSource.md b/gooddata-api-client/docs/ImportCsvRequestTableSource.md new file mode 100644 index 000000000..72ad45115 --- /dev/null +++ b/gooddata-api-client/docs/ImportCsvRequestTableSource.md @@ -0,0 +1,14 @@ +# ImportCsvRequestTableSource + +Information about source data for a particular table. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config** | [**ImportCsvRequestTableSourceConfig**](ImportCsvRequestTableSourceConfig.md) | | +**location** | **str** | Location of the data in the staging area. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ImportCsvRequestTableSourceConfig.md b/gooddata-api-client/docs/ImportCsvRequestTableSourceConfig.md new file mode 100644 index 000000000..48a9a5eba --- /dev/null +++ b/gooddata-api-client/docs/ImportCsvRequestTableSourceConfig.md @@ -0,0 +1,16 @@ +# ImportCsvRequestTableSourceConfig + +Config to use when accessing the data for executions, etc. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**column_date_formats** | **{str: (str,)}** | Date formats to use to use to read the given columns. | [optional] +**convert_options** | [**CsvConvertOptions**](CsvConvertOptions.md) | | [optional] +**parse_options** | [**CsvParseOptions**](CsvParseOptions.md) | | [optional] +**read_options** | [**CsvReadOptions**](CsvReadOptions.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ImportCsvResponse.md b/gooddata-api-client/docs/ImportCsvResponse.md new file mode 100644 index 000000000..5c5aa4c58 --- /dev/null +++ b/gooddata-api-client/docs/ImportCsvResponse.md @@ -0,0 +1,14 @@ +# ImportCsvResponse + +Response containing the information about the imported CSV file. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the table the file was imported to. | +**version** | **int** | Version the file was imported as. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ImportGeoCollectionRequest.md b/gooddata-api-client/docs/ImportGeoCollectionRequest.md new file mode 100644 index 000000000..0e2746d31 --- /dev/null +++ b/gooddata-api-client/docs/ImportGeoCollectionRequest.md @@ -0,0 +1,13 @@ +# ImportGeoCollectionRequest + +Request to import a geo collection file from the staging area. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**location** | **str** | Location of the file in the staging area. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ImportGeoCollectionResponse.md b/gooddata-api-client/docs/ImportGeoCollectionResponse.md new file mode 100644 index 000000000..9f657c194 --- /dev/null +++ b/gooddata-api-client/docs/ImportGeoCollectionResponse.md @@ -0,0 +1,13 @@ +# ImportGeoCollectionResponse + +Response after successfully importing a geo collection. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **int** | The version of the imported geo collection. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/InsightWidgetDescriptor.md b/gooddata-api-client/docs/InsightWidgetDescriptor.md new file mode 100644 index 000000000..dbda14ea6 --- /dev/null +++ b/gooddata-api-client/docs/InsightWidgetDescriptor.md @@ -0,0 +1,17 @@ +# InsightWidgetDescriptor + +Insight widget displaying a visualization. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | Widget title as displayed on the dashboard. | +**visualization_id** | **str** | Visualization object ID referenced by this insight widget. | +**widget_id** | **str** | Widget object ID. | +**widget_type** | **str** | | +**result_id** | **str** | Signed result ID for this widget's cached execution result. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/InsightWidgetDescriptorAllOf.md b/gooddata-api-client/docs/InsightWidgetDescriptorAllOf.md new file mode 100644 index 000000000..2b1758c3a --- /dev/null +++ b/gooddata-api-client/docs/InsightWidgetDescriptorAllOf.md @@ -0,0 +1,15 @@ +# InsightWidgetDescriptorAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result_id** | **str** | Signed result ID for this widget's cached execution result. | [optional] +**title** | **str** | Widget title as displayed on the dashboard. | [optional] +**visualization_id** | **str** | Visualization object ID referenced by this insight widget. | [optional] +**widget_id** | **str** | Widget object ID. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/JwkControllerApi.md b/gooddata-api-client/docs/JwkControllerApi.md new file mode 100644 index 000000000..ff65fba27 --- /dev/null +++ b/gooddata-api-client/docs/JwkControllerApi.md @@ -0,0 +1,501 @@ +# gooddata_api_client.JwkControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_jwks**](JwkControllerApi.md#create_entity_jwks) | **POST** /api/v1/entities/jwks | Post Jwks +[**delete_entity_jwks**](JwkControllerApi.md#delete_entity_jwks) | **DELETE** /api/v1/entities/jwks/{id} | Delete Jwk +[**get_all_entities_jwks**](JwkControllerApi.md#get_all_entities_jwks) | **GET** /api/v1/entities/jwks | Get all Jwks +[**get_entity_jwks**](JwkControllerApi.md#get_entity_jwks) | **GET** /api/v1/entities/jwks/{id} | Get Jwk +[**patch_entity_jwks**](JwkControllerApi.md#patch_entity_jwks) | **PATCH** /api/v1/entities/jwks/{id} | Patch Jwk +[**update_entity_jwks**](JwkControllerApi.md#update_entity_jwks) | **PUT** /api/v1/entities/jwks/{id} | Put Jwk + + +# **create_entity_jwks** +> JsonApiJwkOutDocument create_entity_jwks(json_api_jwk_in_document) + +Post Jwks + +Creates JSON web key - used to verify JSON web tokens (Jwts) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import jwk_controller_api +from gooddata_api_client.model.json_api_jwk_in_document import JsonApiJwkInDocument +from gooddata_api_client.model.json_api_jwk_out_document import JsonApiJwkOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = jwk_controller_api.JwkControllerApi(api_client) + json_api_jwk_in_document = JsonApiJwkInDocument( + data=JsonApiJwkIn( + attributes=JsonApiJwkInAttributes( + content=JsonApiJwkInAttributesContent(), + ), + id="id1", + type="jwk", + ), + ) # JsonApiJwkInDocument | + + # example passing only required values which don't have defaults set + try: + # Post Jwks + api_response = api_instance.create_entity_jwks(json_api_jwk_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling JwkControllerApi->create_entity_jwks: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **json_api_jwk_in_document** | [**JsonApiJwkInDocument**](JsonApiJwkInDocument.md)| | + +### Return type + +[**JsonApiJwkOutDocument**](JsonApiJwkOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_jwks** +> delete_entity_jwks(id) + +Delete Jwk + +Deletes JSON web key - used to verify JSON web tokens (Jwts) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import jwk_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = jwk_controller_api.JwkControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + filter = "content==JwkSpecificationValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete Jwk + api_instance.delete_entity_jwks(id) + except gooddata_api_client.ApiException as e: + print("Exception when calling JwkControllerApi->delete_entity_jwks: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete Jwk + api_instance.delete_entity_jwks(id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling JwkControllerApi->delete_entity_jwks: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_jwks** +> JsonApiJwkOutList get_all_entities_jwks() + +Get all Jwks + +Returns all JSON web keys - used to verify JSON web tokens (Jwts) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import jwk_controller_api +from gooddata_api_client.model.json_api_jwk_out_list import JsonApiJwkOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = jwk_controller_api.JwkControllerApi(api_client) + filter = "content==JwkSpecificationValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + meta_include = [ + "metaInclude=page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Jwks + api_response = api_instance.get_all_entities_jwks(filter=filter, page=page, size=size, sort=sort, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling JwkControllerApi->get_all_entities_jwks: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiJwkOutList**](JsonApiJwkOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_jwks** +> JsonApiJwkOutDocument get_entity_jwks(id) + +Get Jwk + +Returns JSON web key - used to verify JSON web tokens (Jwts) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import jwk_controller_api +from gooddata_api_client.model.json_api_jwk_out_document import JsonApiJwkOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = jwk_controller_api.JwkControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + filter = "content==JwkSpecificationValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Get Jwk + api_response = api_instance.get_entity_jwks(id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling JwkControllerApi->get_entity_jwks: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get Jwk + api_response = api_instance.get_entity_jwks(id, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling JwkControllerApi->get_entity_jwks: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiJwkOutDocument**](JsonApiJwkOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_jwks** +> JsonApiJwkOutDocument patch_entity_jwks(id, json_api_jwk_patch_document) + +Patch Jwk + +Patches JSON web key - used to verify JSON web tokens (Jwts) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import jwk_controller_api +from gooddata_api_client.model.json_api_jwk_patch_document import JsonApiJwkPatchDocument +from gooddata_api_client.model.json_api_jwk_out_document import JsonApiJwkOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = jwk_controller_api.JwkControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + json_api_jwk_patch_document = JsonApiJwkPatchDocument( + data=JsonApiJwkPatch( + attributes=JsonApiJwkInAttributes( + content=JsonApiJwkInAttributesContent(), + ), + id="id1", + type="jwk", + ), + ) # JsonApiJwkPatchDocument | + filter = "content==JwkSpecificationValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Patch Jwk + api_response = api_instance.patch_entity_jwks(id, json_api_jwk_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling JwkControllerApi->patch_entity_jwks: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch Jwk + api_response = api_instance.patch_entity_jwks(id, json_api_jwk_patch_document, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling JwkControllerApi->patch_entity_jwks: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_jwk_patch_document** | [**JsonApiJwkPatchDocument**](JsonApiJwkPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiJwkOutDocument**](JsonApiJwkOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_jwks** +> JsonApiJwkOutDocument update_entity_jwks(id, json_api_jwk_in_document) + +Put Jwk + +Updates JSON web key - used to verify JSON web tokens (Jwts) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import jwk_controller_api +from gooddata_api_client.model.json_api_jwk_in_document import JsonApiJwkInDocument +from gooddata_api_client.model.json_api_jwk_out_document import JsonApiJwkOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = jwk_controller_api.JwkControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + json_api_jwk_in_document = JsonApiJwkInDocument( + data=JsonApiJwkIn( + attributes=JsonApiJwkInAttributes( + content=JsonApiJwkInAttributesContent(), + ), + id="id1", + type="jwk", + ), + ) # JsonApiJwkInDocument | + filter = "content==JwkSpecificationValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Put Jwk + api_response = api_instance.update_entity_jwks(id, json_api_jwk_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling JwkControllerApi->update_entity_jwks: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put Jwk + api_response = api_instance.update_entity_jwks(id, json_api_jwk_in_document, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling JwkControllerApi->update_entity_jwks: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_jwk_in_document** | [**JsonApiJwkInDocument**](JsonApiJwkInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiJwkOutDocument**](JsonApiJwkOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/LabelControllerApi.md b/gooddata-api-client/docs/LabelControllerApi.md new file mode 100644 index 000000000..ef820851e --- /dev/null +++ b/gooddata-api-client/docs/LabelControllerApi.md @@ -0,0 +1,392 @@ +# gooddata_api_client.LabelControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_all_entities_labels**](LabelControllerApi.md#get_all_entities_labels) | **GET** /api/v1/entities/workspaces/{workspaceId}/labels | Get all Labels +[**get_entity_labels**](LabelControllerApi.md#get_entity_labels) | **GET** /api/v1/entities/workspaces/{workspaceId}/labels/{objectId} | Get a Label +[**patch_entity_labels**](LabelControllerApi.md#patch_entity_labels) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/labels/{objectId} | Patch a Label (beta) +[**search_entities_labels**](LabelControllerApi.md#search_entities_labels) | **POST** /api/v1/entities/workspaces/{workspaceId}/labels/search | The search endpoint (beta) + + +# **get_all_entities_labels** +> JsonApiLabelOutList get_all_entities_labels(workspace_id) + +Get all Labels + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import label_controller_api +from gooddata_api_client.model.json_api_label_out_list import JsonApiLabelOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = label_controller_api.LabelControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString;attribute.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "attribute", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Labels + api_response = api_instance.get_all_entities_labels(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling LabelControllerApi->get_all_entities_labels: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Labels + api_response = api_instance.get_all_entities_labels(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling LabelControllerApi->get_all_entities_labels: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiLabelOutList**](JsonApiLabelOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_labels** +> JsonApiLabelOutDocument get_entity_labels(workspace_id, object_id) + +Get a Label + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import label_controller_api +from gooddata_api_client.model.json_api_label_out_document import JsonApiLabelOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = label_controller_api.LabelControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;attribute.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "attribute", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get a Label + api_response = api_instance.get_entity_labels(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling LabelControllerApi->get_entity_labels: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a Label + api_response = api_instance.get_entity_labels(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling LabelControllerApi->get_entity_labels: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiLabelOutDocument**](JsonApiLabelOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_labels** +> JsonApiLabelOutDocument patch_entity_labels(workspace_id, object_id, json_api_label_patch_document) + +Patch a Label (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import label_controller_api +from gooddata_api_client.model.json_api_label_patch_document import JsonApiLabelPatchDocument +from gooddata_api_client.model.json_api_label_out_document import JsonApiLabelOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = label_controller_api.LabelControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_label_patch_document = JsonApiLabelPatchDocument( + data=JsonApiLabelPatch( + attributes=JsonApiAttributePatchAttributes( + description="description_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="label", + ), + ) # JsonApiLabelPatchDocument | + filter = "title==someString;description==someString;attribute.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "attribute", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch a Label (beta) + api_response = api_instance.patch_entity_labels(workspace_id, object_id, json_api_label_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling LabelControllerApi->patch_entity_labels: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch a Label (beta) + api_response = api_instance.patch_entity_labels(workspace_id, object_id, json_api_label_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling LabelControllerApi->patch_entity_labels: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_label_patch_document** | [**JsonApiLabelPatchDocument**](JsonApiLabelPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiLabelOutDocument**](JsonApiLabelOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_labels** +> JsonApiLabelOutList search_entities_labels(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import label_controller_api +from gooddata_api_client.model.json_api_label_out_list import JsonApiLabelOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = label_controller_api.LabelControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_labels(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling LabelControllerApi->search_entities_labels: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_labels(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling LabelControllerApi->search_entities_labels: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiLabelOutList**](JsonApiLabelOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/ListLlmProviderModelsRequest.md b/gooddata-api-client/docs/ListLlmProviderModelsRequest.md new file mode 100644 index 000000000..8432da2c1 --- /dev/null +++ b/gooddata-api-client/docs/ListLlmProviderModelsRequest.md @@ -0,0 +1,12 @@ +# ListLlmProviderModelsRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_config** | [**ListLlmProviderModelsRequestProviderConfig**](ListLlmProviderModelsRequestProviderConfig.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ListLlmProviderModelsRequestProviderConfig.md b/gooddata-api-client/docs/ListLlmProviderModelsRequestProviderConfig.md new file mode 100644 index 000000000..7c86d8997 --- /dev/null +++ b/gooddata-api-client/docs/ListLlmProviderModelsRequestProviderConfig.md @@ -0,0 +1,17 @@ +# ListLlmProviderModelsRequestProviderConfig + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_url** | **str** | Custom base URL for OpenAI API. | [optional] if omitted the server will use the default value of "https://api.openai.com/v1" +**organization** | **str, none_type** | OpenAI organization ID. | [optional] +**auth** | [**OpenAiProviderAuth**](OpenAiProviderAuth.md) | | [optional] +**region** | **str** | AWS region for Bedrock. | [optional] +**type** | **str** | Provider type. | [optional] if omitted the server will use the default value of "OPENAI" +**endpoint** | **str** | Azure OpenAI endpoint URL. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ListLlmProviderModelsResponse.md b/gooddata-api-client/docs/ListLlmProviderModelsResponse.md new file mode 100644 index 000000000..b3b81a65b --- /dev/null +++ b/gooddata-api-client/docs/ListLlmProviderModelsResponse.md @@ -0,0 +1,14 @@ +# ListLlmProviderModelsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | Message about the listing result. | +**models** | [**[LlmModel]**](LlmModel.md) | Available models on the provider. | +**success** | **bool** | Whether the model listing succeeded. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/MetricControllerApi.md b/gooddata-api-client/docs/MetricControllerApi.md new file mode 100644 index 000000000..304f59e83 --- /dev/null +++ b/gooddata-api-client/docs/MetricControllerApi.md @@ -0,0 +1,688 @@ +# gooddata_api_client.MetricControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_metrics**](MetricControllerApi.md#create_entity_metrics) | **POST** /api/v1/entities/workspaces/{workspaceId}/metrics | Post Metrics +[**delete_entity_metrics**](MetricControllerApi.md#delete_entity_metrics) | **DELETE** /api/v1/entities/workspaces/{workspaceId}/metrics/{objectId} | Delete a Metric +[**get_all_entities_metrics**](MetricControllerApi.md#get_all_entities_metrics) | **GET** /api/v1/entities/workspaces/{workspaceId}/metrics | Get all Metrics +[**get_entity_metrics**](MetricControllerApi.md#get_entity_metrics) | **GET** /api/v1/entities/workspaces/{workspaceId}/metrics/{objectId} | Get a Metric +[**patch_entity_metrics**](MetricControllerApi.md#patch_entity_metrics) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/metrics/{objectId} | Patch a Metric +[**search_entities_metrics**](MetricControllerApi.md#search_entities_metrics) | **POST** /api/v1/entities/workspaces/{workspaceId}/metrics/search | The search endpoint (beta) +[**update_entity_metrics**](MetricControllerApi.md#update_entity_metrics) | **PUT** /api/v1/entities/workspaces/{workspaceId}/metrics/{objectId} | Put a Metric + + +# **create_entity_metrics** +> JsonApiMetricOutDocument create_entity_metrics(workspace_id, json_api_metric_post_optional_id_document) + +Post Metrics + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import metric_controller_api +from gooddata_api_client.model.json_api_metric_post_optional_id_document import JsonApiMetricPostOptionalIdDocument +from gooddata_api_client.model.json_api_metric_out_document import JsonApiMetricOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = metric_controller_api.MetricControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_metric_post_optional_id_document = JsonApiMetricPostOptionalIdDocument( + data=JsonApiMetricPostOptionalId( + attributes=JsonApiMetricInAttributes( + are_relations_valid=True, + content=JsonApiMetricInAttributesContent( + format="format_example", + maql="maql_example", + metric_type="UNSPECIFIED", + ), + description="description_example", + is_hidden=True, + is_hidden_from_kda=True, + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="metric", + ), + ) # JsonApiMetricPostOptionalIdDocument | + include = [ + "createdBy,modifiedBy,certifiedBy,facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Post Metrics + api_response = api_instance.create_entity_metrics(workspace_id, json_api_metric_post_optional_id_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling MetricControllerApi->create_entity_metrics: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post Metrics + api_response = api_instance.create_entity_metrics(workspace_id, json_api_metric_post_optional_id_document, include=include, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling MetricControllerApi->create_entity_metrics: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_metric_post_optional_id_document** | [**JsonApiMetricPostOptionalIdDocument**](JsonApiMetricPostOptionalIdDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiMetricOutDocument**](JsonApiMetricOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_metrics** +> delete_entity_metrics(workspace_id, object_id) + +Delete a Metric + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import metric_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = metric_controller_api.MetricControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete a Metric + api_instance.delete_entity_metrics(workspace_id, object_id) + except gooddata_api_client.ApiException as e: + print("Exception when calling MetricControllerApi->delete_entity_metrics: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete a Metric + api_instance.delete_entity_metrics(workspace_id, object_id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling MetricControllerApi->delete_entity_metrics: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_metrics** +> JsonApiMetricOutList get_all_entities_metrics(workspace_id) + +Get all Metrics + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import metric_controller_api +from gooddata_api_client.model.json_api_metric_out_list import JsonApiMetricOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = metric_controller_api.MetricControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,certifiedBy,facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Metrics + api_response = api_instance.get_all_entities_metrics(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling MetricControllerApi->get_all_entities_metrics: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Metrics + api_response = api_instance.get_all_entities_metrics(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling MetricControllerApi->get_all_entities_metrics: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiMetricOutList**](JsonApiMetricOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_metrics** +> JsonApiMetricOutDocument get_entity_metrics(workspace_id, object_id) + +Get a Metric + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import metric_controller_api +from gooddata_api_client.model.json_api_metric_out_document import JsonApiMetricOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = metric_controller_api.MetricControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,certifiedBy,facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get a Metric + api_response = api_instance.get_entity_metrics(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling MetricControllerApi->get_entity_metrics: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a Metric + api_response = api_instance.get_entity_metrics(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling MetricControllerApi->get_entity_metrics: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiMetricOutDocument**](JsonApiMetricOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_metrics** +> JsonApiMetricOutDocument patch_entity_metrics(workspace_id, object_id, json_api_metric_patch_document) + +Patch a Metric + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import metric_controller_api +from gooddata_api_client.model.json_api_metric_patch_document import JsonApiMetricPatchDocument +from gooddata_api_client.model.json_api_metric_out_document import JsonApiMetricOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = metric_controller_api.MetricControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_metric_patch_document = JsonApiMetricPatchDocument( + data=JsonApiMetricPatch( + attributes=JsonApiMetricPatchAttributes( + are_relations_valid=True, + content=JsonApiMetricInAttributesContent( + format="format_example", + maql="maql_example", + metric_type="UNSPECIFIED", + ), + description="description_example", + is_hidden=True, + is_hidden_from_kda=True, + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="metric", + ), + ) # JsonApiMetricPatchDocument | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,certifiedBy,facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch a Metric + api_response = api_instance.patch_entity_metrics(workspace_id, object_id, json_api_metric_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling MetricControllerApi->patch_entity_metrics: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch a Metric + api_response = api_instance.patch_entity_metrics(workspace_id, object_id, json_api_metric_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling MetricControllerApi->patch_entity_metrics: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_metric_patch_document** | [**JsonApiMetricPatchDocument**](JsonApiMetricPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiMetricOutDocument**](JsonApiMetricOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_metrics** +> JsonApiMetricOutList search_entities_metrics(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import metric_controller_api +from gooddata_api_client.model.json_api_metric_out_list import JsonApiMetricOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = metric_controller_api.MetricControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_metrics(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling MetricControllerApi->search_entities_metrics: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_metrics(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling MetricControllerApi->search_entities_metrics: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiMetricOutList**](JsonApiMetricOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_metrics** +> JsonApiMetricOutDocument update_entity_metrics(workspace_id, object_id, json_api_metric_in_document) + +Put a Metric + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import metric_controller_api +from gooddata_api_client.model.json_api_metric_in_document import JsonApiMetricInDocument +from gooddata_api_client.model.json_api_metric_out_document import JsonApiMetricOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = metric_controller_api.MetricControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_metric_in_document = JsonApiMetricInDocument( + data=JsonApiMetricIn( + attributes=JsonApiMetricInAttributes( + are_relations_valid=True, + content=JsonApiMetricInAttributesContent( + format="format_example", + maql="maql_example", + metric_type="UNSPECIFIED", + ), + description="description_example", + is_hidden=True, + is_hidden_from_kda=True, + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="metric", + ), + ) # JsonApiMetricInDocument | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,certifiedBy,facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Put a Metric + api_response = api_instance.update_entity_metrics(workspace_id, object_id, json_api_metric_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling MetricControllerApi->update_entity_metrics: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put a Metric + api_response = api_instance.update_entity_metrics(workspace_id, object_id, json_api_metric_in_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling MetricControllerApi->update_entity_metrics: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_metric_in_document** | [**JsonApiMetricInDocument**](JsonApiMetricInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiMetricOutDocument**](JsonApiMetricOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/OGCAPIFeaturesApi.md b/gooddata-api-client/docs/OGCAPIFeaturesApi.md new file mode 100644 index 000000000..4ae74c704 --- /dev/null +++ b/gooddata-api-client/docs/OGCAPIFeaturesApi.md @@ -0,0 +1,180 @@ +# gooddata_api_client.OGCAPIFeaturesApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_collection_items**](OGCAPIFeaturesApi.md#get_collection_items) | **GET** /api/v1/location/collections/{collectionId}/items | Get collection features +[**get_custom_collection_items**](OGCAPIFeaturesApi.md#get_custom_collection_items) | **GET** /api/v1/location/custom/collections/{collectionId}/items | Get custom collection features + + +# **get_collection_items** +> GeoJsonFeatureCollection get_collection_items(collection_id) + +Get collection features + +Retrieve features from a GeoCollections collection as GeoJSON + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import ogcapi_features_api +from gooddata_api_client.model.geo_json_feature_collection import GeoJsonFeatureCollection +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = ogcapi_features_api.OGCAPIFeaturesApi(api_client) + collection_id = "countries" # str | Collection identifier + limit = 100 # int | Maximum number of features to return (optional) + bbox = "-180,-90,180,90" # str | Bounding box filter (minx,miny,maxx,maxy) (optional) + values = [ + "US,CA,MX", + ] # [str] | List of values to filter features by (optional) + + # example passing only required values which don't have defaults set + try: + # Get collection features + api_response = api_instance.get_collection_items(collection_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling OGCAPIFeaturesApi->get_collection_items: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get collection features + api_response = api_instance.get_collection_items(collection_id, limit=limit, bbox=bbox, values=values) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling OGCAPIFeaturesApi->get_collection_items: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection_id** | **str**| Collection identifier | + **limit** | **int**| Maximum number of features to return | [optional] + **bbox** | **str**| Bounding box filter (minx,miny,maxx,maxy) | [optional] + **values** | **[str]**| List of values to filter features by | [optional] + +### Return type + +[**GeoJsonFeatureCollection**](GeoJsonFeatureCollection.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Features retrieved successfully | - | +**404** | Collection 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_custom_collection_items** +> GeoJsonFeatureCollection get_custom_collection_items(collection_id) + +Get custom collection features + +Retrieve features from a custom (organization-scoped) GeoCollections collection as GeoJSON + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import ogcapi_features_api +from gooddata_api_client.model.geo_json_feature_collection import GeoJsonFeatureCollection +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = ogcapi_features_api.OGCAPIFeaturesApi(api_client) + collection_id = "my-custom-collection" # str | Collection identifier + limit = 100 # int | Maximum number of features to return (optional) + bbox = "-180,-90,180,90" # str | Bounding box filter (minx,miny,maxx,maxy) (optional) + values = [ + "US,CA,MX", + ] # [str] | List of values to filter features by (optional) + + # example passing only required values which don't have defaults set + try: + # Get custom collection features + api_response = api_instance.get_custom_collection_items(collection_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling OGCAPIFeaturesApi->get_custom_collection_items: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get custom collection features + api_response = api_instance.get_custom_collection_items(collection_id, limit=limit, bbox=bbox, values=values) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling OGCAPIFeaturesApi->get_custom_collection_items: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection_id** | **str**| Collection identifier | + **limit** | **int**| Maximum number of features to return | [optional] + **bbox** | **str**| Bounding box filter (minx,miny,maxx,maxy) | [optional] + **values** | **[str]**| List of values to filter features by | [optional] + +### Return type + +[**GeoJsonFeatureCollection**](GeoJsonFeatureCollection.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Features retrieved successfully | - | +**404** | Collection 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/gooddata-api-client/docs/ObjectReference.md b/gooddata-api-client/docs/ObjectReference.md new file mode 100644 index 000000000..a559f3bb5 --- /dev/null +++ b/gooddata-api-client/docs/ObjectReference.md @@ -0,0 +1,13 @@ +# ObjectReference + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Object identifier (e.g. widget ID, metric ID). | +**type** | **str** | Type of the referenced object. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ObjectReferenceGroup.md b/gooddata-api-client/docs/ObjectReferenceGroup.md new file mode 100644 index 000000000..fdabb612f --- /dev/null +++ b/gooddata-api-client/docs/ObjectReferenceGroup.md @@ -0,0 +1,13 @@ +# ObjectReferenceGroup + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**objects** | [**[ObjectReference]**](ObjectReference.md) | Objects the user explicitly referenced within this context. | +**context** | [**ObjectReference**](ObjectReference.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/OrganizationCacheSettings.md b/gooddata-api-client/docs/OrganizationCacheSettings.md new file mode 100644 index 000000000..56159c965 --- /dev/null +++ b/gooddata-api-client/docs/OrganizationCacheSettings.md @@ -0,0 +1,13 @@ +# OrganizationCacheSettings + +Settings for organization cache. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**extra_cache_budget** | **int** | Extra cache budget the organization can allocate among its workspaces, in bytes. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/OrganizationCacheUsage.md b/gooddata-api-client/docs/OrganizationCacheUsage.md new file mode 100644 index 000000000..4263bbe07 --- /dev/null +++ b/gooddata-api-client/docs/OrganizationCacheUsage.md @@ -0,0 +1,15 @@ +# OrganizationCacheUsage + +Data about the whole organization's cache usage. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**current** | [**OrganizationCurrentCacheUsage**](OrganizationCurrentCacheUsage.md) | | +**removal_intervals** | [**[CacheRemovalInterval]**](CacheRemovalInterval.md) | List of cache removal intervals. | +**settings** | [**OrganizationCacheSettings**](OrganizationCacheSettings.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/OrganizationCurrentCacheUsage.md b/gooddata-api-client/docs/OrganizationCurrentCacheUsage.md new file mode 100644 index 000000000..edef8764f --- /dev/null +++ b/gooddata-api-client/docs/OrganizationCurrentCacheUsage.md @@ -0,0 +1,15 @@ +# OrganizationCurrentCacheUsage + +Current cache usage of the organization. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cache_used** | **int** | Cache currently used by the organization, in bytes. | +**removed_since_start** | **int** | Bytes removed since start due to insufficient cache. | +**removal_period_start** | **datetime** | Start timestamp of removal period. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/OrganizationEntityControllerApi.md b/gooddata-api-client/docs/OrganizationEntityControllerApi.md new file mode 100644 index 000000000..412aab308 --- /dev/null +++ b/gooddata-api-client/docs/OrganizationEntityControllerApi.md @@ -0,0 +1,303 @@ +# gooddata_api_client.OrganizationEntityControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_entity_organizations**](OrganizationEntityControllerApi.md#get_entity_organizations) | **GET** /api/v1/entities/admin/organizations/{id} | Get Organizations +[**patch_entity_organizations**](OrganizationEntityControllerApi.md#patch_entity_organizations) | **PATCH** /api/v1/entities/admin/organizations/{id} | Patch Organization +[**update_entity_organizations**](OrganizationEntityControllerApi.md#update_entity_organizations) | **PUT** /api/v1/entities/admin/organizations/{id} | Put Organization + + +# **get_entity_organizations** +> JsonApiOrganizationOutDocument get_entity_organizations(id) + +Get Organizations + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import organization_entity_controller_api +from gooddata_api_client.model.json_api_organization_out_document import JsonApiOrganizationOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_entity_controller_api.OrganizationEntityControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + filter = "name==someString;hostname==someString;bootstrapUser.id==321;bootstrapUserGroup.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "bootstrapUser,bootstrapUserGroup,identityProvider", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + meta_include = [ + "metaInclude=permissions,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get Organizations + api_response = api_instance.get_entity_organizations(id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling OrganizationEntityControllerApi->get_entity_organizations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get Organizations + api_response = api_instance.get_entity_organizations(id, filter=filter, include=include, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling OrganizationEntityControllerApi->get_entity_organizations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiOrganizationOutDocument**](JsonApiOrganizationOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_organizations** +> JsonApiOrganizationOutDocument patch_entity_organizations(id, json_api_organization_patch_document) + +Patch Organization + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import organization_entity_controller_api +from gooddata_api_client.model.json_api_organization_out_document import JsonApiOrganizationOutDocument +from gooddata_api_client.model.json_api_organization_patch_document import JsonApiOrganizationPatchDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_entity_controller_api.OrganizationEntityControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + json_api_organization_patch_document = JsonApiOrganizationPatchDocument( + data=JsonApiOrganizationPatch( + attributes=JsonApiOrganizationInAttributes( + allowed_origins=[ + "allowed_origins_example", + ], + early_access="early_access_example", + early_access_values=[ + "early_access_values_example", + ], + hostname="hostname_example", + name="name_example", + ), + id="id1", + relationships=JsonApiOrganizationInRelationships( + identity_provider=JsonApiOrganizationInRelationshipsIdentityProvider( + data=JsonApiIdentityProviderToOneLinkage(None), + ), + ), + type="organization", + ), + ) # JsonApiOrganizationPatchDocument | + filter = "name==someString;hostname==someString;bootstrapUser.id==321;bootstrapUserGroup.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "bootstrapUser,bootstrapUserGroup,identityProvider", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch Organization + api_response = api_instance.patch_entity_organizations(id, json_api_organization_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling OrganizationEntityControllerApi->patch_entity_organizations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch Organization + api_response = api_instance.patch_entity_organizations(id, json_api_organization_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling OrganizationEntityControllerApi->patch_entity_organizations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_organization_patch_document** | [**JsonApiOrganizationPatchDocument**](JsonApiOrganizationPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiOrganizationOutDocument**](JsonApiOrganizationOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_organizations** +> JsonApiOrganizationOutDocument update_entity_organizations(id, json_api_organization_in_document) + +Put Organization + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import organization_entity_controller_api +from gooddata_api_client.model.json_api_organization_out_document import JsonApiOrganizationOutDocument +from gooddata_api_client.model.json_api_organization_in_document import JsonApiOrganizationInDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_entity_controller_api.OrganizationEntityControllerApi(api_client) + id = "/6bUUGjjNSwg0_bs" # str | + json_api_organization_in_document = JsonApiOrganizationInDocument( + data=JsonApiOrganizationIn( + attributes=JsonApiOrganizationInAttributes( + allowed_origins=[ + "allowed_origins_example", + ], + early_access="early_access_example", + early_access_values=[ + "early_access_values_example", + ], + hostname="hostname_example", + name="name_example", + ), + id="id1", + relationships=JsonApiOrganizationInRelationships( + identity_provider=JsonApiOrganizationInRelationshipsIdentityProvider( + data=JsonApiIdentityProviderToOneLinkage(None), + ), + ), + type="organization", + ), + ) # JsonApiOrganizationInDocument | + filter = "name==someString;hostname==someString;bootstrapUser.id==321;bootstrapUserGroup.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "bootstrapUser,bootstrapUserGroup,identityProvider", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Put Organization + api_response = api_instance.update_entity_organizations(id, json_api_organization_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling OrganizationEntityControllerApi->update_entity_organizations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put Organization + api_response = api_instance.update_entity_organizations(id, json_api_organization_in_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling OrganizationEntityControllerApi->update_entity_organizations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_organization_in_document** | [**JsonApiOrganizationInDocument**](JsonApiOrganizationInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiOrganizationOutDocument**](JsonApiOrganizationOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/ReadCsvFileManifestsRequest.md b/gooddata-api-client/docs/ReadCsvFileManifestsRequest.md new file mode 100644 index 000000000..8ab382add --- /dev/null +++ b/gooddata-api-client/docs/ReadCsvFileManifestsRequest.md @@ -0,0 +1,13 @@ +# ReadCsvFileManifestsRequest + +Request to read the manifests of the specified CSV files. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**manifest_requests** | [**[ReadCsvFileManifestsRequestItem]**](ReadCsvFileManifestsRequestItem.md) | Files to read the manifests for. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ReadCsvFileManifestsRequestItem.md b/gooddata-api-client/docs/ReadCsvFileManifestsRequestItem.md new file mode 100644 index 000000000..6f85b235e --- /dev/null +++ b/gooddata-api-client/docs/ReadCsvFileManifestsRequestItem.md @@ -0,0 +1,14 @@ +# ReadCsvFileManifestsRequestItem + +Request to read the manifest of a single CSV file. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_name** | **str** | Name of the CSV file to read the manifest for. | +**version** | **int** | Optional version of the file to read the manifest for. If null or not specified, the latest version is read. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ReadCsvFileManifestsResponse.md b/gooddata-api-client/docs/ReadCsvFileManifestsResponse.md new file mode 100644 index 000000000..8819669cb --- /dev/null +++ b/gooddata-api-client/docs/ReadCsvFileManifestsResponse.md @@ -0,0 +1,15 @@ +# ReadCsvFileManifestsResponse + +Describes the results of a CSV manifest read of a single file. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**manifest** | [**CsvManifestBody**](CsvManifestBody.md) | | +**name** | **str** | Name of the file in the source data source. | +**version** | **int** | Version of the file in the source data source. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/RichTextWidgetDescriptor.md b/gooddata-api-client/docs/RichTextWidgetDescriptor.md new file mode 100644 index 000000000..e0b482541 --- /dev/null +++ b/gooddata-api-client/docs/RichTextWidgetDescriptor.md @@ -0,0 +1,15 @@ +# RichTextWidgetDescriptor + +Rich text widget displaying static content. Has no execution result. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | Widget title as displayed on the dashboard. | +**widget_id** | **str** | Widget object ID. | +**widget_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/RichTextWidgetDescriptorAllOf.md b/gooddata-api-client/docs/RichTextWidgetDescriptorAllOf.md new file mode 100644 index 000000000..06f207309 --- /dev/null +++ b/gooddata-api-client/docs/RichTextWidgetDescriptorAllOf.md @@ -0,0 +1,13 @@ +# RichTextWidgetDescriptorAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | Widget title as displayed on the dashboard. | [optional] +**widget_id** | **str** | Widget object ID. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/TestLlmProviderByIdRequest.md b/gooddata-api-client/docs/TestLlmProviderByIdRequest.md new file mode 100644 index 000000000..a4b9e4929 --- /dev/null +++ b/gooddata-api-client/docs/TestLlmProviderByIdRequest.md @@ -0,0 +1,13 @@ +# TestLlmProviderByIdRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**models** | [**[LlmModel]**](LlmModel.md) | Models overrides. | [optional] +**provider_config** | [**ListLlmProviderModelsRequestProviderConfig**](ListLlmProviderModelsRequestProviderConfig.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/ToolCallEventResult.md b/gooddata-api-client/docs/ToolCallEventResult.md new file mode 100644 index 000000000..692f44653 --- /dev/null +++ b/gooddata-api-client/docs/ToolCallEventResult.md @@ -0,0 +1,15 @@ +# ToolCallEventResult + +Tool call events emitted during the agentic loop (only present when GEN_AI_YIELD_TOOL_CALL_EVENTS is enabled). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_arguments** | **str** | JSON-encoded arguments passed to the tool function. | +**function_name** | **str** | Name of the tool function that was called. | +**result** | **str** | Result returned by the tool function. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/TrendingObjectItem.md b/gooddata-api-client/docs/TrendingObjectItem.md new file mode 100644 index 000000000..ff577d66f --- /dev/null +++ b/gooddata-api-client/docs/TrendingObjectItem.md @@ -0,0 +1,30 @@ +# TrendingObjectItem + +Trending analytics catalog objects + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Object ID. | +**tags** | **[str]** | | +**title** | **str** | Object title. | +**type** | **str** | Object type, e.g. dashboard, visualization, metric. | +**usage_count** | **int** | Number of times this object has been used/referenced. | +**workspace_id** | **str** | Workspace ID the object belongs to. | +**created_at** | **datetime** | Timestamp when object was created. | [optional] +**created_by** | **str** | ID of the user who created the object. | [optional] +**dataset_id** | **str** | ID of the associated dataset, if applicable. | [optional] +**dataset_title** | **str** | Title of the associated dataset, if applicable. | [optional] +**dataset_type** | **str** | Type of the associated dataset, if applicable. | [optional] +**description** | **str** | Object description. | [optional] +**is_hidden** | **bool** | If true, this object is hidden from AI search results by default. | [optional] +**is_hidden_from_kda** | **bool** | If true, this object is hidden from KDA. | [optional] +**metric_type** | **str** | Type of the metric (e.g. MAQL), if applicable. | [optional] +**modified_at** | **datetime** | Timestamp when object was last modified. | [optional] +**modified_by** | **str** | ID of the user who last modified the object. | [optional] +**visualization_url** | **str** | URL of the visualization, if applicable. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/TrendingObjectsResult.md b/gooddata-api-client/docs/TrendingObjectsResult.md new file mode 100644 index 000000000..8c33e779f --- /dev/null +++ b/gooddata-api-client/docs/TrendingObjectsResult.md @@ -0,0 +1,12 @@ +# TrendingObjectsResult + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**objects** | [**[TrendingObjectItem]**](TrendingObjectItem.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/UIContext.md b/gooddata-api-client/docs/UIContext.md new file mode 100644 index 000000000..35c989c34 --- /dev/null +++ b/gooddata-api-client/docs/UIContext.md @@ -0,0 +1,13 @@ +# UIContext + +Ambient UI state: what the user is currently looking at (dashboard, visible widgets). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dashboard** | [**DashboardContext**](DashboardContext.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/UploadFileResponse.md b/gooddata-api-client/docs/UploadFileResponse.md new file mode 100644 index 000000000..901d8ef7e --- /dev/null +++ b/gooddata-api-client/docs/UploadFileResponse.md @@ -0,0 +1,13 @@ +# UploadFileResponse + +Information related to the file uploaded to the staging area. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**location** | **str** | Location to use when referencing the uploaded file in subsequent requests. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/UploadGeoCollectionFileResponse.md b/gooddata-api-client/docs/UploadGeoCollectionFileResponse.md new file mode 100644 index 000000000..4a5b03e60 --- /dev/null +++ b/gooddata-api-client/docs/UploadGeoCollectionFileResponse.md @@ -0,0 +1,13 @@ +# UploadGeoCollectionFileResponse + +Information related to the geo collection file uploaded to the staging area. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**location** | **str** | Location to use when referencing the uploaded file in subsequent requests. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/UserDataFilterControllerApi.md b/gooddata-api-client/docs/UserDataFilterControllerApi.md new file mode 100644 index 000000000..494cf1cff --- /dev/null +++ b/gooddata-api-client/docs/UserDataFilterControllerApi.md @@ -0,0 +1,694 @@ +# gooddata_api_client.UserDataFilterControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_user_data_filters**](UserDataFilterControllerApi.md#create_entity_user_data_filters) | **POST** /api/v1/entities/workspaces/{workspaceId}/userDataFilters | Post User Data Filters +[**delete_entity_user_data_filters**](UserDataFilterControllerApi.md#delete_entity_user_data_filters) | **DELETE** /api/v1/entities/workspaces/{workspaceId}/userDataFilters/{objectId} | Delete a User Data Filter +[**get_all_entities_user_data_filters**](UserDataFilterControllerApi.md#get_all_entities_user_data_filters) | **GET** /api/v1/entities/workspaces/{workspaceId}/userDataFilters | Get all User Data Filters +[**get_entity_user_data_filters**](UserDataFilterControllerApi.md#get_entity_user_data_filters) | **GET** /api/v1/entities/workspaces/{workspaceId}/userDataFilters/{objectId} | Get a User Data Filter +[**patch_entity_user_data_filters**](UserDataFilterControllerApi.md#patch_entity_user_data_filters) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/userDataFilters/{objectId} | Patch a User Data Filter +[**search_entities_user_data_filters**](UserDataFilterControllerApi.md#search_entities_user_data_filters) | **POST** /api/v1/entities/workspaces/{workspaceId}/userDataFilters/search | The search endpoint (beta) +[**update_entity_user_data_filters**](UserDataFilterControllerApi.md#update_entity_user_data_filters) | **PUT** /api/v1/entities/workspaces/{workspaceId}/userDataFilters/{objectId} | Put a User Data Filter + + +# **create_entity_user_data_filters** +> JsonApiUserDataFilterOutDocument create_entity_user_data_filters(workspace_id, json_api_user_data_filter_post_optional_id_document) + +Post User Data Filters + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import user_data_filter_controller_api +from gooddata_api_client.model.json_api_user_data_filter_out_document import JsonApiUserDataFilterOutDocument +from gooddata_api_client.model.json_api_user_data_filter_post_optional_id_document import JsonApiUserDataFilterPostOptionalIdDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_data_filter_controller_api.UserDataFilterControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_user_data_filter_post_optional_id_document = JsonApiUserDataFilterPostOptionalIdDocument( + data=JsonApiUserDataFilterPostOptionalId( + attributes=JsonApiUserDataFilterInAttributes( + are_relations_valid=True, + description="description_example", + maql="maql_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + relationships=JsonApiUserDataFilterInRelationships( + user=JsonApiFilterViewInRelationshipsUser( + data=JsonApiUserToOneLinkage(None), + ), + user_group=JsonApiOrganizationOutRelationshipsBootstrapUserGroup( + data=JsonApiUserGroupToOneLinkage(None), + ), + ), + type="userDataFilter", + ), + ) # JsonApiUserDataFilterPostOptionalIdDocument | + include = [ + "user,userGroup,facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Post User Data Filters + api_response = api_instance.create_entity_user_data_filters(workspace_id, json_api_user_data_filter_post_optional_id_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserDataFilterControllerApi->create_entity_user_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post User Data Filters + api_response = api_instance.create_entity_user_data_filters(workspace_id, json_api_user_data_filter_post_optional_id_document, include=include, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserDataFilterControllerApi->create_entity_user_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_user_data_filter_post_optional_id_document** | [**JsonApiUserDataFilterPostOptionalIdDocument**](JsonApiUserDataFilterPostOptionalIdDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiUserDataFilterOutDocument**](JsonApiUserDataFilterOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_user_data_filters** +> delete_entity_user_data_filters(workspace_id, object_id) + +Delete a User Data Filter + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import user_data_filter_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_data_filter_controller_api.UserDataFilterControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;user.id==321;userGroup.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete a User Data Filter + api_instance.delete_entity_user_data_filters(workspace_id, object_id) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserDataFilterControllerApi->delete_entity_user_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete a User Data Filter + api_instance.delete_entity_user_data_filters(workspace_id, object_id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserDataFilterControllerApi->delete_entity_user_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_user_data_filters** +> JsonApiUserDataFilterOutList get_all_entities_user_data_filters(workspace_id) + +Get all User Data Filters + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import user_data_filter_controller_api +from gooddata_api_client.model.json_api_user_data_filter_out_list import JsonApiUserDataFilterOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_data_filter_controller_api.UserDataFilterControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString;user.id==321;userGroup.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "user,userGroup,facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all User Data Filters + api_response = api_instance.get_all_entities_user_data_filters(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserDataFilterControllerApi->get_all_entities_user_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all User Data Filters + api_response = api_instance.get_all_entities_user_data_filters(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserDataFilterControllerApi->get_all_entities_user_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiUserDataFilterOutList**](JsonApiUserDataFilterOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_user_data_filters** +> JsonApiUserDataFilterOutDocument get_entity_user_data_filters(workspace_id, object_id) + +Get a User Data Filter + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import user_data_filter_controller_api +from gooddata_api_client.model.json_api_user_data_filter_out_document import JsonApiUserDataFilterOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_data_filter_controller_api.UserDataFilterControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;user.id==321;userGroup.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "user,userGroup,facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get a User Data Filter + api_response = api_instance.get_entity_user_data_filters(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserDataFilterControllerApi->get_entity_user_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a User Data Filter + api_response = api_instance.get_entity_user_data_filters(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserDataFilterControllerApi->get_entity_user_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiUserDataFilterOutDocument**](JsonApiUserDataFilterOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_user_data_filters** +> JsonApiUserDataFilterOutDocument patch_entity_user_data_filters(workspace_id, object_id, json_api_user_data_filter_patch_document) + +Patch a User Data Filter + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import user_data_filter_controller_api +from gooddata_api_client.model.json_api_user_data_filter_out_document import JsonApiUserDataFilterOutDocument +from gooddata_api_client.model.json_api_user_data_filter_patch_document import JsonApiUserDataFilterPatchDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_data_filter_controller_api.UserDataFilterControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_user_data_filter_patch_document = JsonApiUserDataFilterPatchDocument( + data=JsonApiUserDataFilterPatch( + attributes=JsonApiUserDataFilterPatchAttributes( + are_relations_valid=True, + description="description_example", + maql="maql_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + relationships=JsonApiUserDataFilterInRelationships( + user=JsonApiFilterViewInRelationshipsUser( + data=JsonApiUserToOneLinkage(None), + ), + user_group=JsonApiOrganizationOutRelationshipsBootstrapUserGroup( + data=JsonApiUserGroupToOneLinkage(None), + ), + ), + type="userDataFilter", + ), + ) # JsonApiUserDataFilterPatchDocument | + filter = "title==someString;description==someString;user.id==321;userGroup.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "user,userGroup,facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch a User Data Filter + api_response = api_instance.patch_entity_user_data_filters(workspace_id, object_id, json_api_user_data_filter_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserDataFilterControllerApi->patch_entity_user_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch a User Data Filter + api_response = api_instance.patch_entity_user_data_filters(workspace_id, object_id, json_api_user_data_filter_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserDataFilterControllerApi->patch_entity_user_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_user_data_filter_patch_document** | [**JsonApiUserDataFilterPatchDocument**](JsonApiUserDataFilterPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiUserDataFilterOutDocument**](JsonApiUserDataFilterOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_user_data_filters** +> JsonApiUserDataFilterOutList search_entities_user_data_filters(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import user_data_filter_controller_api +from gooddata_api_client.model.json_api_user_data_filter_out_list import JsonApiUserDataFilterOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_data_filter_controller_api.UserDataFilterControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_user_data_filters(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserDataFilterControllerApi->search_entities_user_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_user_data_filters(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserDataFilterControllerApi->search_entities_user_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiUserDataFilterOutList**](JsonApiUserDataFilterOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_user_data_filters** +> JsonApiUserDataFilterOutDocument update_entity_user_data_filters(workspace_id, object_id, json_api_user_data_filter_in_document) + +Put a User Data Filter + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import user_data_filter_controller_api +from gooddata_api_client.model.json_api_user_data_filter_out_document import JsonApiUserDataFilterOutDocument +from gooddata_api_client.model.json_api_user_data_filter_in_document import JsonApiUserDataFilterInDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_data_filter_controller_api.UserDataFilterControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_user_data_filter_in_document = JsonApiUserDataFilterInDocument( + data=JsonApiUserDataFilterIn( + attributes=JsonApiUserDataFilterInAttributes( + are_relations_valid=True, + description="description_example", + maql="maql_example", + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + relationships=JsonApiUserDataFilterInRelationships( + user=JsonApiFilterViewInRelationshipsUser( + data=JsonApiUserToOneLinkage(None), + ), + user_group=JsonApiOrganizationOutRelationshipsBootstrapUserGroup( + data=JsonApiUserGroupToOneLinkage(None), + ), + ), + type="userDataFilter", + ), + ) # JsonApiUserDataFilterInDocument | + filter = "title==someString;description==someString;user.id==321;userGroup.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "user,userGroup,facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Put a User Data Filter + api_response = api_instance.update_entity_user_data_filters(workspace_id, object_id, json_api_user_data_filter_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserDataFilterControllerApi->update_entity_user_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put a User Data Filter + api_response = api_instance.update_entity_user_data_filters(workspace_id, object_id, json_api_user_data_filter_in_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserDataFilterControllerApi->update_entity_user_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_user_data_filter_in_document** | [**JsonApiUserDataFilterInDocument**](JsonApiUserDataFilterInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiUserDataFilterOutDocument**](JsonApiUserDataFilterOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/UserSettingControllerApi.md b/gooddata-api-client/docs/UserSettingControllerApi.md new file mode 100644 index 000000000..f490be11e --- /dev/null +++ b/gooddata-api-client/docs/UserSettingControllerApi.md @@ -0,0 +1,421 @@ +# gooddata_api_client.UserSettingControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_user_settings**](UserSettingControllerApi.md#create_entity_user_settings) | **POST** /api/v1/entities/users/{userId}/userSettings | Post new user settings for the user +[**delete_entity_user_settings**](UserSettingControllerApi.md#delete_entity_user_settings) | **DELETE** /api/v1/entities/users/{userId}/userSettings/{id} | Delete a setting for a user +[**get_all_entities_user_settings**](UserSettingControllerApi.md#get_all_entities_user_settings) | **GET** /api/v1/entities/users/{userId}/userSettings | List all settings for a user +[**get_entity_user_settings**](UserSettingControllerApi.md#get_entity_user_settings) | **GET** /api/v1/entities/users/{userId}/userSettings/{id} | Get a setting for a user +[**update_entity_user_settings**](UserSettingControllerApi.md#update_entity_user_settings) | **PUT** /api/v1/entities/users/{userId}/userSettings/{id} | Put new user settings for the user + + +# **create_entity_user_settings** +> JsonApiUserSettingOutDocument create_entity_user_settings(user_id, json_api_user_setting_in_document) + +Post new user settings for the user + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import user_setting_controller_api +from gooddata_api_client.model.json_api_user_setting_out_document import JsonApiUserSettingOutDocument +from gooddata_api_client.model.json_api_user_setting_in_document import JsonApiUserSettingInDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_setting_controller_api.UserSettingControllerApi(api_client) + user_id = "userId_example" # str | + json_api_user_setting_in_document = JsonApiUserSettingInDocument( + data=JsonApiUserSettingIn( + attributes=JsonApiOrganizationSettingInAttributes( + content={}, + type="TIMEZONE", + ), + id="id1", + type="userSetting", + ), + ) # JsonApiUserSettingInDocument | + + # example passing only required values which don't have defaults set + try: + # Post new user settings for the user + api_response = api_instance.create_entity_user_settings(user_id, json_api_user_setting_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserSettingControllerApi->create_entity_user_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **json_api_user_setting_in_document** | [**JsonApiUserSettingInDocument**](JsonApiUserSettingInDocument.md)| | + +### Return type + +[**JsonApiUserSettingOutDocument**](JsonApiUserSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_user_settings** +> delete_entity_user_settings(user_id, id) + +Delete a setting for a user + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import user_setting_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_setting_controller_api.UserSettingControllerApi(api_client) + user_id = "userId_example" # str | + id = "/6bUUGjjNSwg0_bs" # str | + filter = "content==JsonNodeValue;type==SettingTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete a setting for a user + api_instance.delete_entity_user_settings(user_id, id) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserSettingControllerApi->delete_entity_user_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete a setting for a user + api_instance.delete_entity_user_settings(user_id, id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserSettingControllerApi->delete_entity_user_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_user_settings** +> JsonApiUserSettingOutList get_all_entities_user_settings(user_id) + +List all settings for a user + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import user_setting_controller_api +from gooddata_api_client.model.json_api_user_setting_out_list import JsonApiUserSettingOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_setting_controller_api.UserSettingControllerApi(api_client) + user_id = "userId_example" # str | + filter = "content==JsonNodeValue;type==SettingTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + meta_include = [ + "metaInclude=page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # List all settings for a user + api_response = api_instance.get_all_entities_user_settings(user_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserSettingControllerApi->get_all_entities_user_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List all settings for a user + api_response = api_instance.get_all_entities_user_settings(user_id, filter=filter, page=page, size=size, sort=sort, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserSettingControllerApi->get_all_entities_user_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiUserSettingOutList**](JsonApiUserSettingOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_user_settings** +> JsonApiUserSettingOutDocument get_entity_user_settings(user_id, id) + +Get a setting for a user + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import user_setting_controller_api +from gooddata_api_client.model.json_api_user_setting_out_document import JsonApiUserSettingOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_setting_controller_api.UserSettingControllerApi(api_client) + user_id = "userId_example" # str | + id = "/6bUUGjjNSwg0_bs" # str | + filter = "content==JsonNodeValue;type==SettingTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Get a setting for a user + api_response = api_instance.get_entity_user_settings(user_id, id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserSettingControllerApi->get_entity_user_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a setting for a user + api_response = api_instance.get_entity_user_settings(user_id, id, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserSettingControllerApi->get_entity_user_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiUserSettingOutDocument**](JsonApiUserSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_user_settings** +> JsonApiUserSettingOutDocument update_entity_user_settings(user_id, id, json_api_user_setting_in_document) + +Put new user settings for the user + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import user_setting_controller_api +from gooddata_api_client.model.json_api_user_setting_out_document import JsonApiUserSettingOutDocument +from gooddata_api_client.model.json_api_user_setting_in_document import JsonApiUserSettingInDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_setting_controller_api.UserSettingControllerApi(api_client) + user_id = "userId_example" # str | + id = "/6bUUGjjNSwg0_bs" # str | + json_api_user_setting_in_document = JsonApiUserSettingInDocument( + data=JsonApiUserSettingIn( + attributes=JsonApiOrganizationSettingInAttributes( + content={}, + type="TIMEZONE", + ), + id="id1", + type="userSetting", + ), + ) # JsonApiUserSettingInDocument | + filter = "content==JsonNodeValue;type==SettingTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Put new user settings for the user + api_response = api_instance.update_entity_user_settings(user_id, id, json_api_user_setting_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserSettingControllerApi->update_entity_user_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put new user settings for the user + api_response = api_instance.update_entity_user_settings(user_id, id, json_api_user_setting_in_document, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling UserSettingControllerApi->update_entity_user_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **id** | **str**| | + **json_api_user_setting_in_document** | [**JsonApiUserSettingInDocument**](JsonApiUserSettingInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiUserSettingOutDocument**](JsonApiUserSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/VisualizationObjectControllerApi.md b/gooddata-api-client/docs/VisualizationObjectControllerApi.md new file mode 100644 index 000000000..cd9e75ea9 --- /dev/null +++ b/gooddata-api-client/docs/VisualizationObjectControllerApi.md @@ -0,0 +1,673 @@ +# gooddata_api_client.VisualizationObjectControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_visualization_objects**](VisualizationObjectControllerApi.md#create_entity_visualization_objects) | **POST** /api/v1/entities/workspaces/{workspaceId}/visualizationObjects | Post Visualization Objects +[**delete_entity_visualization_objects**](VisualizationObjectControllerApi.md#delete_entity_visualization_objects) | **DELETE** /api/v1/entities/workspaces/{workspaceId}/visualizationObjects/{objectId} | Delete a Visualization Object +[**get_all_entities_visualization_objects**](VisualizationObjectControllerApi.md#get_all_entities_visualization_objects) | **GET** /api/v1/entities/workspaces/{workspaceId}/visualizationObjects | Get all Visualization Objects +[**get_entity_visualization_objects**](VisualizationObjectControllerApi.md#get_entity_visualization_objects) | **GET** /api/v1/entities/workspaces/{workspaceId}/visualizationObjects/{objectId} | Get a Visualization Object +[**patch_entity_visualization_objects**](VisualizationObjectControllerApi.md#patch_entity_visualization_objects) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/visualizationObjects/{objectId} | Patch a Visualization Object +[**search_entities_visualization_objects**](VisualizationObjectControllerApi.md#search_entities_visualization_objects) | **POST** /api/v1/entities/workspaces/{workspaceId}/visualizationObjects/search | The search endpoint (beta) +[**update_entity_visualization_objects**](VisualizationObjectControllerApi.md#update_entity_visualization_objects) | **PUT** /api/v1/entities/workspaces/{workspaceId}/visualizationObjects/{objectId} | Put a Visualization Object + + +# **create_entity_visualization_objects** +> JsonApiVisualizationObjectOutDocument create_entity_visualization_objects(workspace_id, json_api_visualization_object_post_optional_id_document) + +Post Visualization Objects + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import visualization_object_controller_api +from gooddata_api_client.model.json_api_visualization_object_out_document import JsonApiVisualizationObjectOutDocument +from gooddata_api_client.model.json_api_visualization_object_post_optional_id_document import JsonApiVisualizationObjectPostOptionalIdDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = visualization_object_controller_api.VisualizationObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_visualization_object_post_optional_id_document = JsonApiVisualizationObjectPostOptionalIdDocument( + data=JsonApiVisualizationObjectPostOptionalId( + attributes=JsonApiVisualizationObjectInAttributes( + are_relations_valid=True, + content={}, + description="description_example", + is_hidden=True, + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="visualizationObject", + ), + ) # JsonApiVisualizationObjectPostOptionalIdDocument | + include = [ + "createdBy,modifiedBy,certifiedBy,facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Post Visualization Objects + api_response = api_instance.create_entity_visualization_objects(workspace_id, json_api_visualization_object_post_optional_id_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling VisualizationObjectControllerApi->create_entity_visualization_objects: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post Visualization Objects + api_response = api_instance.create_entity_visualization_objects(workspace_id, json_api_visualization_object_post_optional_id_document, include=include, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling VisualizationObjectControllerApi->create_entity_visualization_objects: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_visualization_object_post_optional_id_document** | [**JsonApiVisualizationObjectPostOptionalIdDocument**](JsonApiVisualizationObjectPostOptionalIdDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiVisualizationObjectOutDocument**](JsonApiVisualizationObjectOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_visualization_objects** +> delete_entity_visualization_objects(workspace_id, object_id) + +Delete a Visualization Object + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import visualization_object_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = visualization_object_controller_api.VisualizationObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete a Visualization Object + api_instance.delete_entity_visualization_objects(workspace_id, object_id) + except gooddata_api_client.ApiException as e: + print("Exception when calling VisualizationObjectControllerApi->delete_entity_visualization_objects: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete a Visualization Object + api_instance.delete_entity_visualization_objects(workspace_id, object_id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling VisualizationObjectControllerApi->delete_entity_visualization_objects: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_visualization_objects** +> JsonApiVisualizationObjectOutList get_all_entities_visualization_objects(workspace_id) + +Get all Visualization Objects + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import visualization_object_controller_api +from gooddata_api_client.model.json_api_visualization_object_out_list import JsonApiVisualizationObjectOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = visualization_object_controller_api.VisualizationObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,certifiedBy,facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Visualization Objects + api_response = api_instance.get_all_entities_visualization_objects(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling VisualizationObjectControllerApi->get_all_entities_visualization_objects: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Visualization Objects + api_response = api_instance.get_all_entities_visualization_objects(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling VisualizationObjectControllerApi->get_all_entities_visualization_objects: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiVisualizationObjectOutList**](JsonApiVisualizationObjectOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_visualization_objects** +> JsonApiVisualizationObjectOutDocument get_entity_visualization_objects(workspace_id, object_id) + +Get a Visualization Object + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import visualization_object_controller_api +from gooddata_api_client.model.json_api_visualization_object_out_document import JsonApiVisualizationObjectOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = visualization_object_controller_api.VisualizationObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,certifiedBy,facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get a Visualization Object + api_response = api_instance.get_entity_visualization_objects(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling VisualizationObjectControllerApi->get_entity_visualization_objects: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a Visualization Object + api_response = api_instance.get_entity_visualization_objects(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling VisualizationObjectControllerApi->get_entity_visualization_objects: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiVisualizationObjectOutDocument**](JsonApiVisualizationObjectOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_visualization_objects** +> JsonApiVisualizationObjectOutDocument patch_entity_visualization_objects(workspace_id, object_id, json_api_visualization_object_patch_document) + +Patch a Visualization Object + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import visualization_object_controller_api +from gooddata_api_client.model.json_api_visualization_object_out_document import JsonApiVisualizationObjectOutDocument +from gooddata_api_client.model.json_api_visualization_object_patch_document import JsonApiVisualizationObjectPatchDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = visualization_object_controller_api.VisualizationObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_visualization_object_patch_document = JsonApiVisualizationObjectPatchDocument( + data=JsonApiVisualizationObjectPatch( + attributes=JsonApiVisualizationObjectPatchAttributes( + are_relations_valid=True, + content={}, + description="description_example", + is_hidden=True, + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="visualizationObject", + ), + ) # JsonApiVisualizationObjectPatchDocument | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,certifiedBy,facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch a Visualization Object + api_response = api_instance.patch_entity_visualization_objects(workspace_id, object_id, json_api_visualization_object_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling VisualizationObjectControllerApi->patch_entity_visualization_objects: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch a Visualization Object + api_response = api_instance.patch_entity_visualization_objects(workspace_id, object_id, json_api_visualization_object_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling VisualizationObjectControllerApi->patch_entity_visualization_objects: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_visualization_object_patch_document** | [**JsonApiVisualizationObjectPatchDocument**](JsonApiVisualizationObjectPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiVisualizationObjectOutDocument**](JsonApiVisualizationObjectOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_visualization_objects** +> JsonApiVisualizationObjectOutList search_entities_visualization_objects(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import visualization_object_controller_api +from gooddata_api_client.model.json_api_visualization_object_out_list import JsonApiVisualizationObjectOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = visualization_object_controller_api.VisualizationObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_visualization_objects(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling VisualizationObjectControllerApi->search_entities_visualization_objects: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_visualization_objects(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling VisualizationObjectControllerApi->search_entities_visualization_objects: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiVisualizationObjectOutList**](JsonApiVisualizationObjectOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_visualization_objects** +> JsonApiVisualizationObjectOutDocument update_entity_visualization_objects(workspace_id, object_id, json_api_visualization_object_in_document) + +Put a Visualization Object + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import visualization_object_controller_api +from gooddata_api_client.model.json_api_visualization_object_out_document import JsonApiVisualizationObjectOutDocument +from gooddata_api_client.model.json_api_visualization_object_in_document import JsonApiVisualizationObjectInDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = visualization_object_controller_api.VisualizationObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_visualization_object_in_document = JsonApiVisualizationObjectInDocument( + data=JsonApiVisualizationObjectIn( + attributes=JsonApiVisualizationObjectInAttributes( + are_relations_valid=True, + content={}, + description="description_example", + is_hidden=True, + tags=[ + "tags_example", + ], + title="title_example", + ), + id="id1", + type="visualizationObject", + ), + ) # JsonApiVisualizationObjectInDocument | + filter = "title==someString;description==someString;createdBy.id==321;modifiedBy.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "createdBy,modifiedBy,certifiedBy,facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Put a Visualization Object + api_response = api_instance.update_entity_visualization_objects(workspace_id, object_id, json_api_visualization_object_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling VisualizationObjectControllerApi->update_entity_visualization_objects: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put a Visualization Object + api_response = api_instance.update_entity_visualization_objects(workspace_id, object_id, json_api_visualization_object_in_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling VisualizationObjectControllerApi->update_entity_visualization_objects: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_visualization_object_in_document** | [**JsonApiVisualizationObjectInDocument**](JsonApiVisualizationObjectInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiVisualizationObjectOutDocument**](JsonApiVisualizationObjectOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/VisualizationSwitcherWidgetDescriptor.md b/gooddata-api-client/docs/VisualizationSwitcherWidgetDescriptor.md new file mode 100644 index 000000000..14833c12c --- /dev/null +++ b/gooddata-api-client/docs/VisualizationSwitcherWidgetDescriptor.md @@ -0,0 +1,18 @@ +# VisualizationSwitcherWidgetDescriptor + +Visualization switcher widget allowing users to toggle between multiple visualizations. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active_visualization_id** | **str** | ID of the currently active visualization in the switcher. | +**title** | **str** | Widget title as displayed on the dashboard. | +**visualization_ids** | **[str]** | IDs of all visualizations available in the switcher. | +**widget_id** | **str** | Widget object ID. | +**widget_type** | **str** | | +**result_id** | **str** | Signed result ID for the currently active visualization's execution result. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/VisualizationSwitcherWidgetDescriptorAllOf.md b/gooddata-api-client/docs/VisualizationSwitcherWidgetDescriptorAllOf.md new file mode 100644 index 000000000..6a1a2e592 --- /dev/null +++ b/gooddata-api-client/docs/VisualizationSwitcherWidgetDescriptorAllOf.md @@ -0,0 +1,16 @@ +# VisualizationSwitcherWidgetDescriptorAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active_visualization_id** | **str** | ID of the currently active visualization in the switcher. | [optional] +**result_id** | **str** | Signed result ID for the currently active visualization's execution result. | [optional] +**title** | **str** | Widget title as displayed on the dashboard. | [optional] +**visualization_ids** | **[str]** | IDs of all visualizations available in the switcher. | [optional] +**widget_id** | **str** | Widget object ID. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/WidgetDescriptor.md b/gooddata-api-client/docs/WidgetDescriptor.md new file mode 100644 index 000000000..2a88d122d --- /dev/null +++ b/gooddata-api-client/docs/WidgetDescriptor.md @@ -0,0 +1,15 @@ +# WidgetDescriptor + +Descriptor for a widget on the dashboard. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | | +**widget_id** | **str** | | +**widget_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/WorkspaceCacheSettings.md b/gooddata-api-client/docs/WorkspaceCacheSettings.md new file mode 100644 index 000000000..cdaf219b5 --- /dev/null +++ b/gooddata-api-client/docs/WorkspaceCacheSettings.md @@ -0,0 +1,13 @@ +# WorkspaceCacheSettings + +Cache settings for the workspace. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**extra_cache** | **int** | Extra cache for the workspace, in bytes. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/WorkspaceCacheUsage.md b/gooddata-api-client/docs/WorkspaceCacheUsage.md new file mode 100644 index 000000000..206f58e5d --- /dev/null +++ b/gooddata-api-client/docs/WorkspaceCacheUsage.md @@ -0,0 +1,15 @@ +# WorkspaceCacheUsage + +Data about a particular workspace cache usage. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**current** | [**WorkspaceCurrentCacheUsage**](WorkspaceCurrentCacheUsage.md) | | +**removal_intervals** | [**[CacheRemovalInterval]**](CacheRemovalInterval.md) | List of cache removal intervals for workspace. | +**settings** | [**WorkspaceCacheSettings**](WorkspaceCacheSettings.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/WorkspaceCurrentCacheUsage.md b/gooddata-api-client/docs/WorkspaceCurrentCacheUsage.md new file mode 100644 index 000000000..3f35ad54f --- /dev/null +++ b/gooddata-api-client/docs/WorkspaceCurrentCacheUsage.md @@ -0,0 +1,16 @@ +# WorkspaceCurrentCacheUsage + +Current cache usage of the workspace. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cache_available** | **int** | Cache available for the workspace. | +**cache_used** | **int** | Cache used by the workspace. | +**removal_period_start** | **datetime** | Start timestamp of removal period for the workspace. | +**removed_since_start** | **int** | Bytes removed since start due to insufficient cache for the workspace. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/gooddata-api-client/docs/WorkspaceDataFilterControllerApi.md b/gooddata-api-client/docs/WorkspaceDataFilterControllerApi.md new file mode 100644 index 000000000..85f4a6655 --- /dev/null +++ b/gooddata-api-client/docs/WorkspaceDataFilterControllerApi.md @@ -0,0 +1,688 @@ +# gooddata_api_client.WorkspaceDataFilterControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_workspace_data_filters**](WorkspaceDataFilterControllerApi.md#create_entity_workspace_data_filters) | **POST** /api/v1/entities/workspaces/{workspaceId}/workspaceDataFilters | Post Workspace Data Filters +[**delete_entity_workspace_data_filters**](WorkspaceDataFilterControllerApi.md#delete_entity_workspace_data_filters) | **DELETE** /api/v1/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId} | Delete a Workspace Data Filter +[**get_all_entities_workspace_data_filters**](WorkspaceDataFilterControllerApi.md#get_all_entities_workspace_data_filters) | **GET** /api/v1/entities/workspaces/{workspaceId}/workspaceDataFilters | Get all Workspace Data Filters +[**get_entity_workspace_data_filters**](WorkspaceDataFilterControllerApi.md#get_entity_workspace_data_filters) | **GET** /api/v1/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId} | Get a Workspace Data Filter +[**patch_entity_workspace_data_filters**](WorkspaceDataFilterControllerApi.md#patch_entity_workspace_data_filters) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId} | Patch a Workspace Data Filter +[**search_entities_workspace_data_filters**](WorkspaceDataFilterControllerApi.md#search_entities_workspace_data_filters) | **POST** /api/v1/entities/workspaces/{workspaceId}/workspaceDataFilters/search | The search endpoint (beta) +[**update_entity_workspace_data_filters**](WorkspaceDataFilterControllerApi.md#update_entity_workspace_data_filters) | **PUT** /api/v1/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId} | Put a Workspace Data Filter + + +# **create_entity_workspace_data_filters** +> JsonApiWorkspaceDataFilterOutDocument create_entity_workspace_data_filters(workspace_id, json_api_workspace_data_filter_in_document) + +Post Workspace Data Filters + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_data_filter_controller_api +from gooddata_api_client.model.json_api_workspace_data_filter_out_document import JsonApiWorkspaceDataFilterOutDocument +from gooddata_api_client.model.json_api_workspace_data_filter_in_document import JsonApiWorkspaceDataFilterInDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_data_filter_controller_api.WorkspaceDataFilterControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_workspace_data_filter_in_document = JsonApiWorkspaceDataFilterInDocument( + data=JsonApiWorkspaceDataFilterIn( + attributes=JsonApiWorkspaceDataFilterInAttributes( + column_name="column_name_example", + description="description_example", + title="title_example", + ), + id="id1", + relationships=JsonApiWorkspaceDataFilterInRelationships( + filter_settings=JsonApiWorkspaceDataFilterInRelationshipsFilterSettings( + data=JsonApiWorkspaceDataFilterSettingToManyLinkage([ + JsonApiWorkspaceDataFilterSettingLinkage( + id="id_example", + type="workspaceDataFilterSetting", + ), + ]), + ), + ), + type="workspaceDataFilter", + ), + ) # JsonApiWorkspaceDataFilterInDocument | + include = [ + "filterSettings", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Post Workspace Data Filters + api_response = api_instance.create_entity_workspace_data_filters(workspace_id, json_api_workspace_data_filter_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterControllerApi->create_entity_workspace_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post Workspace Data Filters + api_response = api_instance.create_entity_workspace_data_filters(workspace_id, json_api_workspace_data_filter_in_document, include=include, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterControllerApi->create_entity_workspace_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_workspace_data_filter_in_document** | [**JsonApiWorkspaceDataFilterInDocument**](JsonApiWorkspaceDataFilterInDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiWorkspaceDataFilterOutDocument**](JsonApiWorkspaceDataFilterOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_workspace_data_filters** +> delete_entity_workspace_data_filters(workspace_id, object_id) + +Delete a Workspace Data Filter + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_data_filter_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_data_filter_controller_api.WorkspaceDataFilterControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete a Workspace Data Filter + api_instance.delete_entity_workspace_data_filters(workspace_id, object_id) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterControllerApi->delete_entity_workspace_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete a Workspace Data Filter + api_instance.delete_entity_workspace_data_filters(workspace_id, object_id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterControllerApi->delete_entity_workspace_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_workspace_data_filters** +> JsonApiWorkspaceDataFilterOutList get_all_entities_workspace_data_filters(workspace_id) + +Get all Workspace Data Filters + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_data_filter_controller_api +from gooddata_api_client.model.json_api_workspace_data_filter_out_list import JsonApiWorkspaceDataFilterOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_data_filter_controller_api.WorkspaceDataFilterControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "filterSettings", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Workspace Data Filters + api_response = api_instance.get_all_entities_workspace_data_filters(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterControllerApi->get_all_entities_workspace_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Workspace Data Filters + api_response = api_instance.get_all_entities_workspace_data_filters(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterControllerApi->get_all_entities_workspace_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiWorkspaceDataFilterOutList**](JsonApiWorkspaceDataFilterOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_workspace_data_filters** +> JsonApiWorkspaceDataFilterOutDocument get_entity_workspace_data_filters(workspace_id, object_id) + +Get a Workspace Data Filter + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_data_filter_controller_api +from gooddata_api_client.model.json_api_workspace_data_filter_out_document import JsonApiWorkspaceDataFilterOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_data_filter_controller_api.WorkspaceDataFilterControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "filterSettings", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get a Workspace Data Filter + api_response = api_instance.get_entity_workspace_data_filters(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterControllerApi->get_entity_workspace_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a Workspace Data Filter + api_response = api_instance.get_entity_workspace_data_filters(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterControllerApi->get_entity_workspace_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiWorkspaceDataFilterOutDocument**](JsonApiWorkspaceDataFilterOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_workspace_data_filters** +> JsonApiWorkspaceDataFilterOutDocument patch_entity_workspace_data_filters(workspace_id, object_id, json_api_workspace_data_filter_patch_document) + +Patch a Workspace Data Filter + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_data_filter_controller_api +from gooddata_api_client.model.json_api_workspace_data_filter_out_document import JsonApiWorkspaceDataFilterOutDocument +from gooddata_api_client.model.json_api_workspace_data_filter_patch_document import JsonApiWorkspaceDataFilterPatchDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_data_filter_controller_api.WorkspaceDataFilterControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_workspace_data_filter_patch_document = JsonApiWorkspaceDataFilterPatchDocument( + data=JsonApiWorkspaceDataFilterPatch( + attributes=JsonApiWorkspaceDataFilterInAttributes( + column_name="column_name_example", + description="description_example", + title="title_example", + ), + id="id1", + relationships=JsonApiWorkspaceDataFilterInRelationships( + filter_settings=JsonApiWorkspaceDataFilterInRelationshipsFilterSettings( + data=JsonApiWorkspaceDataFilterSettingToManyLinkage([ + JsonApiWorkspaceDataFilterSettingLinkage( + id="id_example", + type="workspaceDataFilterSetting", + ), + ]), + ), + ), + type="workspaceDataFilter", + ), + ) # JsonApiWorkspaceDataFilterPatchDocument | + filter = "title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "filterSettings", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch a Workspace Data Filter + api_response = api_instance.patch_entity_workspace_data_filters(workspace_id, object_id, json_api_workspace_data_filter_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterControllerApi->patch_entity_workspace_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch a Workspace Data Filter + api_response = api_instance.patch_entity_workspace_data_filters(workspace_id, object_id, json_api_workspace_data_filter_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterControllerApi->patch_entity_workspace_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_workspace_data_filter_patch_document** | [**JsonApiWorkspaceDataFilterPatchDocument**](JsonApiWorkspaceDataFilterPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiWorkspaceDataFilterOutDocument**](JsonApiWorkspaceDataFilterOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_workspace_data_filters** +> JsonApiWorkspaceDataFilterOutList search_entities_workspace_data_filters(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_data_filter_controller_api +from gooddata_api_client.model.json_api_workspace_data_filter_out_list import JsonApiWorkspaceDataFilterOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_data_filter_controller_api.WorkspaceDataFilterControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_workspace_data_filters(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterControllerApi->search_entities_workspace_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_workspace_data_filters(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterControllerApi->search_entities_workspace_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiWorkspaceDataFilterOutList**](JsonApiWorkspaceDataFilterOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_workspace_data_filters** +> JsonApiWorkspaceDataFilterOutDocument update_entity_workspace_data_filters(workspace_id, object_id, json_api_workspace_data_filter_in_document) + +Put a Workspace Data Filter + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_data_filter_controller_api +from gooddata_api_client.model.json_api_workspace_data_filter_out_document import JsonApiWorkspaceDataFilterOutDocument +from gooddata_api_client.model.json_api_workspace_data_filter_in_document import JsonApiWorkspaceDataFilterInDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_data_filter_controller_api.WorkspaceDataFilterControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_workspace_data_filter_in_document = JsonApiWorkspaceDataFilterInDocument( + data=JsonApiWorkspaceDataFilterIn( + attributes=JsonApiWorkspaceDataFilterInAttributes( + column_name="column_name_example", + description="description_example", + title="title_example", + ), + id="id1", + relationships=JsonApiWorkspaceDataFilterInRelationships( + filter_settings=JsonApiWorkspaceDataFilterInRelationshipsFilterSettings( + data=JsonApiWorkspaceDataFilterSettingToManyLinkage([ + JsonApiWorkspaceDataFilterSettingLinkage( + id="id_example", + type="workspaceDataFilterSetting", + ), + ]), + ), + ), + type="workspaceDataFilter", + ), + ) # JsonApiWorkspaceDataFilterInDocument | + filter = "title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "filterSettings", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Put a Workspace Data Filter + api_response = api_instance.update_entity_workspace_data_filters(workspace_id, object_id, json_api_workspace_data_filter_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterControllerApi->update_entity_workspace_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put a Workspace Data Filter + api_response = api_instance.update_entity_workspace_data_filters(workspace_id, object_id, json_api_workspace_data_filter_in_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterControllerApi->update_entity_workspace_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_workspace_data_filter_in_document** | [**JsonApiWorkspaceDataFilterInDocument**](JsonApiWorkspaceDataFilterInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiWorkspaceDataFilterOutDocument**](JsonApiWorkspaceDataFilterOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/WorkspaceDataFilterSettingControllerApi.md b/gooddata-api-client/docs/WorkspaceDataFilterSettingControllerApi.md new file mode 100644 index 000000000..d658c554a --- /dev/null +++ b/gooddata-api-client/docs/WorkspaceDataFilterSettingControllerApi.md @@ -0,0 +1,679 @@ +# gooddata_api_client.WorkspaceDataFilterSettingControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_workspace_data_filter_settings**](WorkspaceDataFilterSettingControllerApi.md#create_entity_workspace_data_filter_settings) | **POST** /api/v1/entities/workspaces/{workspaceId}/workspaceDataFilterSettings | Post Settings for Workspace Data Filters +[**delete_entity_workspace_data_filter_settings**](WorkspaceDataFilterSettingControllerApi.md#delete_entity_workspace_data_filter_settings) | **DELETE** /api/v1/entities/workspaces/{workspaceId}/workspaceDataFilterSettings/{objectId} | Delete a Settings for Workspace Data Filter +[**get_all_entities_workspace_data_filter_settings**](WorkspaceDataFilterSettingControllerApi.md#get_all_entities_workspace_data_filter_settings) | **GET** /api/v1/entities/workspaces/{workspaceId}/workspaceDataFilterSettings | Get all Settings for Workspace Data Filters +[**get_entity_workspace_data_filter_settings**](WorkspaceDataFilterSettingControllerApi.md#get_entity_workspace_data_filter_settings) | **GET** /api/v1/entities/workspaces/{workspaceId}/workspaceDataFilterSettings/{objectId} | Get a Setting for Workspace Data Filter +[**patch_entity_workspace_data_filter_settings**](WorkspaceDataFilterSettingControllerApi.md#patch_entity_workspace_data_filter_settings) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/workspaceDataFilterSettings/{objectId} | Patch a Settings for Workspace Data Filter +[**search_entities_workspace_data_filter_settings**](WorkspaceDataFilterSettingControllerApi.md#search_entities_workspace_data_filter_settings) | **POST** /api/v1/entities/workspaces/{workspaceId}/workspaceDataFilterSettings/search | The search endpoint (beta) +[**update_entity_workspace_data_filter_settings**](WorkspaceDataFilterSettingControllerApi.md#update_entity_workspace_data_filter_settings) | **PUT** /api/v1/entities/workspaces/{workspaceId}/workspaceDataFilterSettings/{objectId} | Put a Settings for Workspace Data Filter + + +# **create_entity_workspace_data_filter_settings** +> JsonApiWorkspaceDataFilterSettingOutDocument create_entity_workspace_data_filter_settings(workspace_id, json_api_workspace_data_filter_setting_in_document) + +Post Settings for Workspace Data Filters + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_data_filter_setting_controller_api +from gooddata_api_client.model.json_api_workspace_data_filter_setting_in_document import JsonApiWorkspaceDataFilterSettingInDocument +from gooddata_api_client.model.json_api_workspace_data_filter_setting_out_document import JsonApiWorkspaceDataFilterSettingOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_data_filter_setting_controller_api.WorkspaceDataFilterSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_workspace_data_filter_setting_in_document = JsonApiWorkspaceDataFilterSettingInDocument( + data=JsonApiWorkspaceDataFilterSettingIn( + attributes=JsonApiWorkspaceDataFilterSettingInAttributes( + description="description_example", + filter_values=[ + "filter_values_example", + ], + title="title_example", + ), + id="id1", + relationships=JsonApiWorkspaceDataFilterSettingInRelationships( + workspace_data_filter=JsonApiWorkspaceDataFilterSettingInRelationshipsWorkspaceDataFilter( + data=JsonApiWorkspaceDataFilterToOneLinkage(None), + ), + ), + type="workspaceDataFilterSetting", + ), + ) # JsonApiWorkspaceDataFilterSettingInDocument | + include = [ + "workspaceDataFilter", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Post Settings for Workspace Data Filters + api_response = api_instance.create_entity_workspace_data_filter_settings(workspace_id, json_api_workspace_data_filter_setting_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterSettingControllerApi->create_entity_workspace_data_filter_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post Settings for Workspace Data Filters + api_response = api_instance.create_entity_workspace_data_filter_settings(workspace_id, json_api_workspace_data_filter_setting_in_document, include=include, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterSettingControllerApi->create_entity_workspace_data_filter_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_workspace_data_filter_setting_in_document** | [**JsonApiWorkspaceDataFilterSettingInDocument**](JsonApiWorkspaceDataFilterSettingInDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiWorkspaceDataFilterSettingOutDocument**](JsonApiWorkspaceDataFilterSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_workspace_data_filter_settings** +> delete_entity_workspace_data_filter_settings(workspace_id, object_id) + +Delete a Settings for Workspace Data Filter + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_data_filter_setting_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_data_filter_setting_controller_api.WorkspaceDataFilterSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;workspaceDataFilter.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete a Settings for Workspace Data Filter + api_instance.delete_entity_workspace_data_filter_settings(workspace_id, object_id) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterSettingControllerApi->delete_entity_workspace_data_filter_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete a Settings for Workspace Data Filter + api_instance.delete_entity_workspace_data_filter_settings(workspace_id, object_id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterSettingControllerApi->delete_entity_workspace_data_filter_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_workspace_data_filter_settings** +> JsonApiWorkspaceDataFilterSettingOutList get_all_entities_workspace_data_filter_settings(workspace_id) + +Get all Settings for Workspace Data Filters + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_data_filter_setting_controller_api +from gooddata_api_client.model.json_api_workspace_data_filter_setting_out_list import JsonApiWorkspaceDataFilterSettingOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_data_filter_setting_controller_api.WorkspaceDataFilterSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "title==someString;description==someString;workspaceDataFilter.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "workspaceDataFilter", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Settings for Workspace Data Filters + api_response = api_instance.get_all_entities_workspace_data_filter_settings(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterSettingControllerApi->get_all_entities_workspace_data_filter_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Settings for Workspace Data Filters + api_response = api_instance.get_all_entities_workspace_data_filter_settings(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterSettingControllerApi->get_all_entities_workspace_data_filter_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiWorkspaceDataFilterSettingOutList**](JsonApiWorkspaceDataFilterSettingOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_workspace_data_filter_settings** +> JsonApiWorkspaceDataFilterSettingOutDocument get_entity_workspace_data_filter_settings(workspace_id, object_id) + +Get a Setting for Workspace Data Filter + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_data_filter_setting_controller_api +from gooddata_api_client.model.json_api_workspace_data_filter_setting_out_document import JsonApiWorkspaceDataFilterSettingOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_data_filter_setting_controller_api.WorkspaceDataFilterSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "title==someString;description==someString;workspaceDataFilter.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "workspaceDataFilter", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get a Setting for Workspace Data Filter + api_response = api_instance.get_entity_workspace_data_filter_settings(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterSettingControllerApi->get_entity_workspace_data_filter_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a Setting for Workspace Data Filter + api_response = api_instance.get_entity_workspace_data_filter_settings(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterSettingControllerApi->get_entity_workspace_data_filter_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiWorkspaceDataFilterSettingOutDocument**](JsonApiWorkspaceDataFilterSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_workspace_data_filter_settings** +> JsonApiWorkspaceDataFilterSettingOutDocument patch_entity_workspace_data_filter_settings(workspace_id, object_id, json_api_workspace_data_filter_setting_patch_document) + +Patch a Settings for Workspace Data Filter + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_data_filter_setting_controller_api +from gooddata_api_client.model.json_api_workspace_data_filter_setting_patch_document import JsonApiWorkspaceDataFilterSettingPatchDocument +from gooddata_api_client.model.json_api_workspace_data_filter_setting_out_document import JsonApiWorkspaceDataFilterSettingOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_data_filter_setting_controller_api.WorkspaceDataFilterSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_workspace_data_filter_setting_patch_document = JsonApiWorkspaceDataFilterSettingPatchDocument( + data=JsonApiWorkspaceDataFilterSettingPatch( + attributes=JsonApiWorkspaceDataFilterSettingInAttributes( + description="description_example", + filter_values=[ + "filter_values_example", + ], + title="title_example", + ), + id="id1", + relationships=JsonApiWorkspaceDataFilterSettingInRelationships( + workspace_data_filter=JsonApiWorkspaceDataFilterSettingInRelationshipsWorkspaceDataFilter( + data=JsonApiWorkspaceDataFilterToOneLinkage(None), + ), + ), + type="workspaceDataFilterSetting", + ), + ) # JsonApiWorkspaceDataFilterSettingPatchDocument | + filter = "title==someString;description==someString;workspaceDataFilter.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "workspaceDataFilter", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Patch a Settings for Workspace Data Filter + api_response = api_instance.patch_entity_workspace_data_filter_settings(workspace_id, object_id, json_api_workspace_data_filter_setting_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterSettingControllerApi->patch_entity_workspace_data_filter_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch a Settings for Workspace Data Filter + api_response = api_instance.patch_entity_workspace_data_filter_settings(workspace_id, object_id, json_api_workspace_data_filter_setting_patch_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterSettingControllerApi->patch_entity_workspace_data_filter_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_workspace_data_filter_setting_patch_document** | [**JsonApiWorkspaceDataFilterSettingPatchDocument**](JsonApiWorkspaceDataFilterSettingPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiWorkspaceDataFilterSettingOutDocument**](JsonApiWorkspaceDataFilterSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_workspace_data_filter_settings** +> JsonApiWorkspaceDataFilterSettingOutList search_entities_workspace_data_filter_settings(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_data_filter_setting_controller_api +from gooddata_api_client.model.json_api_workspace_data_filter_setting_out_list import JsonApiWorkspaceDataFilterSettingOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_data_filter_setting_controller_api.WorkspaceDataFilterSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_workspace_data_filter_settings(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterSettingControllerApi->search_entities_workspace_data_filter_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_workspace_data_filter_settings(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterSettingControllerApi->search_entities_workspace_data_filter_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiWorkspaceDataFilterSettingOutList**](JsonApiWorkspaceDataFilterSettingOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_workspace_data_filter_settings** +> JsonApiWorkspaceDataFilterSettingOutDocument update_entity_workspace_data_filter_settings(workspace_id, object_id, json_api_workspace_data_filter_setting_in_document) + +Put a Settings for Workspace Data Filter + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_data_filter_setting_controller_api +from gooddata_api_client.model.json_api_workspace_data_filter_setting_in_document import JsonApiWorkspaceDataFilterSettingInDocument +from gooddata_api_client.model.json_api_workspace_data_filter_setting_out_document import JsonApiWorkspaceDataFilterSettingOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_data_filter_setting_controller_api.WorkspaceDataFilterSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_workspace_data_filter_setting_in_document = JsonApiWorkspaceDataFilterSettingInDocument( + data=JsonApiWorkspaceDataFilterSettingIn( + attributes=JsonApiWorkspaceDataFilterSettingInAttributes( + description="description_example", + filter_values=[ + "filter_values_example", + ], + title="title_example", + ), + id="id1", + relationships=JsonApiWorkspaceDataFilterSettingInRelationships( + workspace_data_filter=JsonApiWorkspaceDataFilterSettingInRelationshipsWorkspaceDataFilter( + data=JsonApiWorkspaceDataFilterToOneLinkage(None), + ), + ), + type="workspaceDataFilterSetting", + ), + ) # JsonApiWorkspaceDataFilterSettingInDocument | + filter = "title==someString;description==someString;workspaceDataFilter.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + include = [ + "workspaceDataFilter", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + # Put a Settings for Workspace Data Filter + api_response = api_instance.update_entity_workspace_data_filter_settings(workspace_id, object_id, json_api_workspace_data_filter_setting_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterSettingControllerApi->update_entity_workspace_data_filter_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put a Settings for Workspace Data Filter + api_response = api_instance.update_entity_workspace_data_filter_settings(workspace_id, object_id, json_api_workspace_data_filter_setting_in_document, filter=filter, include=include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceDataFilterSettingControllerApi->update_entity_workspace_data_filter_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_workspace_data_filter_setting_in_document** | [**JsonApiWorkspaceDataFilterSettingInDocument**](JsonApiWorkspaceDataFilterSettingInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiWorkspaceDataFilterSettingOutDocument**](JsonApiWorkspaceDataFilterSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/docs/WorkspaceSettingControllerApi.md b/gooddata-api-client/docs/WorkspaceSettingControllerApi.md new file mode 100644 index 000000000..634267afa --- /dev/null +++ b/gooddata-api-client/docs/WorkspaceSettingControllerApi.md @@ -0,0 +1,635 @@ +# gooddata_api_client.WorkspaceSettingControllerApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_workspace_settings**](WorkspaceSettingControllerApi.md#create_entity_workspace_settings) | **POST** /api/v1/entities/workspaces/{workspaceId}/workspaceSettings | Post Settings for Workspaces +[**delete_entity_workspace_settings**](WorkspaceSettingControllerApi.md#delete_entity_workspace_settings) | **DELETE** /api/v1/entities/workspaces/{workspaceId}/workspaceSettings/{objectId} | Delete a Setting for Workspace +[**get_all_entities_workspace_settings**](WorkspaceSettingControllerApi.md#get_all_entities_workspace_settings) | **GET** /api/v1/entities/workspaces/{workspaceId}/workspaceSettings | Get all Setting for Workspaces +[**get_entity_workspace_settings**](WorkspaceSettingControllerApi.md#get_entity_workspace_settings) | **GET** /api/v1/entities/workspaces/{workspaceId}/workspaceSettings/{objectId} | Get a Setting for Workspace +[**patch_entity_workspace_settings**](WorkspaceSettingControllerApi.md#patch_entity_workspace_settings) | **PATCH** /api/v1/entities/workspaces/{workspaceId}/workspaceSettings/{objectId} | Patch a Setting for Workspace +[**search_entities_workspace_settings**](WorkspaceSettingControllerApi.md#search_entities_workspace_settings) | **POST** /api/v1/entities/workspaces/{workspaceId}/workspaceSettings/search | The search endpoint (beta) +[**update_entity_workspace_settings**](WorkspaceSettingControllerApi.md#update_entity_workspace_settings) | **PUT** /api/v1/entities/workspaces/{workspaceId}/workspaceSettings/{objectId} | Put a Setting for a Workspace + + +# **create_entity_workspace_settings** +> JsonApiWorkspaceSettingOutDocument create_entity_workspace_settings(workspace_id, json_api_workspace_setting_post_optional_id_document) + +Post Settings for Workspaces + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_setting_controller_api +from gooddata_api_client.model.json_api_workspace_setting_post_optional_id_document import JsonApiWorkspaceSettingPostOptionalIdDocument +from gooddata_api_client.model.json_api_workspace_setting_out_document import JsonApiWorkspaceSettingOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_setting_controller_api.WorkspaceSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_workspace_setting_post_optional_id_document = JsonApiWorkspaceSettingPostOptionalIdDocument( + data=JsonApiWorkspaceSettingPostOptionalId( + attributes=JsonApiOrganizationSettingInAttributes( + content={}, + type="TIMEZONE", + ), + id="id1", + type="workspaceSetting", + ), + ) # JsonApiWorkspaceSettingPostOptionalIdDocument | + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Post Settings for Workspaces + api_response = api_instance.create_entity_workspace_settings(workspace_id, json_api_workspace_setting_post_optional_id_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceSettingControllerApi->create_entity_workspace_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post Settings for Workspaces + api_response = api_instance.create_entity_workspace_settings(workspace_id, json_api_workspace_setting_post_optional_id_document, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceSettingControllerApi->create_entity_workspace_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_workspace_setting_post_optional_id_document** | [**JsonApiWorkspaceSettingPostOptionalIdDocument**](JsonApiWorkspaceSettingPostOptionalIdDocument.md)| | + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiWorkspaceSettingOutDocument**](JsonApiWorkspaceSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[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) + +# **delete_entity_workspace_settings** +> delete_entity_workspace_settings(workspace_id, object_id) + +Delete a Setting for Workspace + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_setting_controller_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_setting_controller_api.WorkspaceSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "content==JsonNodeValue;type==SettingTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Delete a Setting for Workspace + api_instance.delete_entity_workspace_settings(workspace_id, object_id) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceSettingControllerApi->delete_entity_workspace_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete a Setting for Workspace + api_instance.delete_entity_workspace_settings(workspace_id, object_id, filter=filter) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceSettingControllerApi->delete_entity_workspace_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[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_all_entities_workspace_settings** +> JsonApiWorkspaceSettingOutList get_all_entities_workspace_settings(workspace_id) + +Get all Setting for Workspaces + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_setting_controller_api +from gooddata_api_client.model.json_api_workspace_setting_out_list import JsonApiWorkspaceSettingOutList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_setting_controller_api.WorkspaceSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + filter = "content==JsonNodeValue;type==SettingTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,page,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get all Setting for Workspaces + api_response = api_instance.get_all_entities_workspace_settings(workspace_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceSettingControllerApi->get_all_entities_workspace_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get all Setting for Workspaces + api_response = api_instance.get_all_entities_workspace_settings(workspace_id, origin=origin, filter=filter, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceSettingControllerApi->get_all_entities_workspace_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiWorkspaceSettingOutList**](JsonApiWorkspaceSettingOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_workspace_settings** +> JsonApiWorkspaceSettingOutDocument get_entity_workspace_settings(workspace_id, object_id) + +Get a Setting for Workspace + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_setting_controller_api +from gooddata_api_client.model.json_api_workspace_setting_out_document import JsonApiWorkspaceSettingOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_setting_controller_api.WorkspaceSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + filter = "content==JsonNodeValue;type==SettingTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + meta_include = [ + "metaInclude=origin,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + # Get a Setting for Workspace + api_response = api_instance.get_entity_workspace_settings(workspace_id, object_id) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceSettingControllerApi->get_entity_workspace_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a Setting for Workspace + api_response = api_instance.get_entity_workspace_settings(workspace_id, object_id, filter=filter, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceSettingControllerApi->get_entity_workspace_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiWorkspaceSettingOutDocument**](JsonApiWorkspaceSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **patch_entity_workspace_settings** +> JsonApiWorkspaceSettingOutDocument patch_entity_workspace_settings(workspace_id, object_id, json_api_workspace_setting_patch_document) + +Patch a Setting for Workspace + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_setting_controller_api +from gooddata_api_client.model.json_api_workspace_setting_out_document import JsonApiWorkspaceSettingOutDocument +from gooddata_api_client.model.json_api_workspace_setting_patch_document import JsonApiWorkspaceSettingPatchDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_setting_controller_api.WorkspaceSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_workspace_setting_patch_document = JsonApiWorkspaceSettingPatchDocument( + data=JsonApiWorkspaceSettingPatch( + attributes=JsonApiOrganizationSettingInAttributes( + content={}, + type="TIMEZONE", + ), + id="id1", + type="workspaceSetting", + ), + ) # JsonApiWorkspaceSettingPatchDocument | + filter = "content==JsonNodeValue;type==SettingTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Patch a Setting for Workspace + api_response = api_instance.patch_entity_workspace_settings(workspace_id, object_id, json_api_workspace_setting_patch_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceSettingControllerApi->patch_entity_workspace_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Patch a Setting for Workspace + api_response = api_instance.patch_entity_workspace_settings(workspace_id, object_id, json_api_workspace_setting_patch_document, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceSettingControllerApi->patch_entity_workspace_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_workspace_setting_patch_document** | [**JsonApiWorkspaceSettingPatchDocument**](JsonApiWorkspaceSettingPatchDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiWorkspaceSettingOutDocument**](JsonApiWorkspaceSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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) + +# **search_entities_workspace_settings** +> JsonApiWorkspaceSettingOutList search_entities_workspace_settings(workspace_id, entity_search_body) + +The search endpoint (beta) + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_setting_controller_api +from gooddata_api_client.model.json_api_workspace_setting_out_list import JsonApiWorkspaceSettingOutList +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_setting_controller_api.WorkspaceSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + entity_search_body = EntitySearchBody( + filter="filter_example", + include=[ + "include_example", + ], + meta_include=[ + "meta_include_example", + ], + page=EntitySearchPage( + index=0, + size=100, + ), + sort=[ + EntitySearchSort( + direction="ASC", + _property="_property_example", + ), + ], + ) # EntitySearchBody | Search request body with filter, pagination, and sorting options + origin = "ALL" # str | (optional) if omitted the server will use the default value of "ALL" + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_workspace_settings(workspace_id, entity_search_body) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceSettingControllerApi->search_entities_workspace_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # The search endpoint (beta) + api_response = api_instance.search_entities_workspace_settings(workspace_id, entity_search_body, origin=origin, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceSettingControllerApi->search_entities_workspace_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **entity_search_body** | [**EntitySearchBody**](EntitySearchBody.md)| Search request body with filter, pagination, and sorting options | + **origin** | **str**| | [optional] if omitted the server will use the default value of "ALL" + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiWorkspaceSettingOutList**](JsonApiWorkspaceSettingOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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_entity_workspace_settings** +> JsonApiWorkspaceSettingOutDocument update_entity_workspace_settings(workspace_id, object_id, json_api_workspace_setting_in_document) + +Put a Setting for a Workspace + +### Example + + +```python +import time +import gooddata_api_client +from gooddata_api_client.api import workspace_setting_controller_api +from gooddata_api_client.model.json_api_workspace_setting_in_document import JsonApiWorkspaceSettingInDocument +from gooddata_api_client.model.json_api_workspace_setting_out_document import JsonApiWorkspaceSettingOutDocument +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_api_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with gooddata_api_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_setting_controller_api.WorkspaceSettingControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_workspace_setting_in_document = JsonApiWorkspaceSettingInDocument( + data=JsonApiWorkspaceSettingIn( + attributes=JsonApiOrganizationSettingInAttributes( + content={}, + type="TIMEZONE", + ), + id="id1", + type="workspaceSetting", + ), + ) # JsonApiWorkspaceSettingInDocument | + filter = "content==JsonNodeValue;type==SettingTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional) + + # example passing only required values which don't have defaults set + try: + # Put a Setting for a Workspace + api_response = api_instance.update_entity_workspace_settings(workspace_id, object_id, json_api_workspace_setting_in_document) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceSettingControllerApi->update_entity_workspace_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Put a Setting for a Workspace + api_response = api_instance.update_entity_workspace_settings(workspace_id, object_id, json_api_workspace_setting_in_document, filter=filter) + pprint(api_response) + except gooddata_api_client.ApiException as e: + print("Exception when calling WorkspaceSettingControllerApi->update_entity_workspace_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_workspace_setting_in_document** | [**JsonApiWorkspaceSettingInDocument**](JsonApiWorkspaceSettingInDocument.md)| | + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). | [optional] + +### Return type + +[**JsonApiWorkspaceSettingOutDocument**](JsonApiWorkspaceSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/vnd.gooddata.api+json + - **Accept**: application/json, application/vnd.gooddata.api+json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[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/gooddata-api-client/gooddata_api_client/api/actions_api.py b/gooddata-api-client/gooddata_api_client/api/actions_api.py index a578be876..c2597c74b 100644 --- a/gooddata-api-client/gooddata_api_client/api/actions_api.py +++ b/gooddata-api-client/gooddata_api_client/api/actions_api.py @@ -32,10 +32,13 @@ from gooddata_api_client.model.afm_valid_objects_response import AfmValidObjectsResponse from gooddata_api_client.model.analytics_catalog_created_by import AnalyticsCatalogCreatedBy from gooddata_api_client.model.analytics_catalog_tags import AnalyticsCatalogTags +from gooddata_api_client.model.analyze_csv_request import AnalyzeCsvRequest +from gooddata_api_client.model.analyze_csv_response import AnalyzeCsvResponse from gooddata_api_client.model.anomaly_detection_request import AnomalyDetectionRequest from gooddata_api_client.model.anomaly_detection_result import AnomalyDetectionResult from gooddata_api_client.model.api_entitlement import ApiEntitlement from gooddata_api_client.model.available_assignees import AvailableAssignees +from gooddata_api_client.model.cache_usage_data import CacheUsageData from gooddata_api_client.model.change_analysis_request import ChangeAnalysisRequest from gooddata_api_client.model.change_analysis_response import ChangeAnalysisResponse from gooddata_api_client.model.change_analysis_result import ChangeAnalysisResult @@ -48,6 +51,8 @@ from gooddata_api_client.model.clustering_result import ClusteringResult from gooddata_api_client.model.column_statistics_request import ColumnStatisticsRequest from gooddata_api_client.model.column_statistics_response import ColumnStatisticsResponse +from gooddata_api_client.model.convert_geo_file_request import ConvertGeoFileRequest +from gooddata_api_client.model.convert_geo_file_response import ConvertGeoFileResponse from gooddata_api_client.model.create_knowledge_document_request_dto import CreateKnowledgeDocumentRequestDto from gooddata_api_client.model.create_knowledge_document_response_dto import CreateKnowledgeDocumentResponseDto from gooddata_api_client.model.dashboard_permissions import DashboardPermissions @@ -55,6 +60,7 @@ from gooddata_api_client.model.data_source_permission_assignment import DataSourcePermissionAssignment from gooddata_api_client.model.data_source_schemata import DataSourceSchemata from gooddata_api_client.model.declarative_model import DeclarativeModel +from gooddata_api_client.model.delete_files_request import DeleteFilesRequest from gooddata_api_client.model.delete_knowledge_document_response_dto import DeleteKnowledgeDocumentResponseDto from gooddata_api_client.model.dependent_entities_request import DependentEntitiesRequest from gooddata_api_client.model.dependent_entities_response import DependentEntitiesResponse @@ -65,6 +71,7 @@ from gooddata_api_client.model.export_response import ExportResponse from gooddata_api_client.model.forecast_request import ForecastRequest from gooddata_api_client.model.forecast_result import ForecastResult +from gooddata_api_client.model.gd_storage_file import GdStorageFile from gooddata_api_client.model.generate_description_request import GenerateDescriptionRequest from gooddata_api_client.model.generate_description_response import GenerateDescriptionResponse from gooddata_api_client.model.generate_ldm_request import GenerateLdmRequest @@ -75,6 +82,10 @@ from gooddata_api_client.model.hierarchy_object_identification import HierarchyObjectIdentification from gooddata_api_client.model.identifier_duplications import IdentifierDuplications from gooddata_api_client.model.image_export_request import ImageExportRequest +from gooddata_api_client.model.import_csv_request import ImportCsvRequest +from gooddata_api_client.model.import_csv_response import ImportCsvResponse +from gooddata_api_client.model.import_geo_collection_request import ImportGeoCollectionRequest +from gooddata_api_client.model.import_geo_collection_response import ImportGeoCollectionResponse from gooddata_api_client.model.key_drivers_request import KeyDriversRequest from gooddata_api_client.model.key_drivers_response import KeyDriversResponse from gooddata_api_client.model.key_drivers_result import KeyDriversResult @@ -94,6 +105,8 @@ from gooddata_api_client.model.platform_usage_request import PlatformUsageRequest from gooddata_api_client.model.quality_issues_calculation_status_response import QualityIssuesCalculationStatusResponse from gooddata_api_client.model.raw_export_request import RawExportRequest +from gooddata_api_client.model.read_csv_file_manifests_request import ReadCsvFileManifestsRequest +from gooddata_api_client.model.read_csv_file_manifests_response import ReadCsvFileManifestsResponse from gooddata_api_client.model.resolve_settings_request import ResolveSettingsRequest from gooddata_api_client.model.resolved_llm_endpoints import ResolvedLlmEndpoints from gooddata_api_client.model.resolved_setting import ResolvedSetting @@ -118,6 +131,8 @@ from gooddata_api_client.model.test_response import TestResponse from gooddata_api_client.model.trigger_automation_request import TriggerAutomationRequest from gooddata_api_client.model.trigger_quality_issues_calculation_response import TriggerQualityIssuesCalculationResponse +from gooddata_api_client.model.upload_file_response import UploadFileResponse +from gooddata_api_client.model.upload_geo_collection_file_response import UploadGeoCollectionFileResponse from gooddata_api_client.model.upsert_knowledge_document_request_dto import UpsertKnowledgeDocumentRequestDto from gooddata_api_client.model.upsert_knowledge_document_response_dto import UpsertKnowledgeDocumentResponseDto from gooddata_api_client.model.validate_llm_endpoint_by_id_request import ValidateLLMEndpointByIdRequest @@ -492,6 +507,56 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.analyze_csv_endpoint = _Endpoint( + settings={ + 'response_type': ([AnalyzeCsvResponse],), + 'auth': [], + 'endpoint_path': '/api/v1/actions/fileStorage/staging/analyzeCsv', + 'operation_id': 'analyze_csv', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'analyze_csv_request', + ], + 'required': [ + 'analyze_csv_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'analyze_csv_request': + (AnalyzeCsvRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'analyze_csv_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) self.anomaly_detection_endpoint = _Endpoint( settings={ 'response_type': (SmartFunctionResponse,), @@ -1137,6 +1202,48 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.collect_cache_usage_endpoint = _Endpoint( + settings={ + 'response_type': (CacheUsageData,), + 'auth': [], + 'endpoint_path': '/api/v1/actions/collectCacheUsage', + 'operation_id': 'collect_cache_usage', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) self.column_statistics_endpoint = _Endpoint( settings={ 'response_type': (ColumnStatisticsResponse,), @@ -1482,6 +1589,56 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.convert_geo_file_endpoint = _Endpoint( + settings={ + 'response_type': (ConvertGeoFileResponse,), + 'auth': [], + 'endpoint_path': '/api/v1/actions/customGeoCollection/convert', + 'operation_id': 'convert_geo_file', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'convert_geo_file_request', + ], + 'required': [ + 'convert_geo_file_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'convert_geo_file_request': + (ConvertGeoFileRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'convert_geo_file_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) self.create_dashboard_export_request_endpoint = _Endpoint( settings={ 'response_type': (ExportResponse,), @@ -1953,6 +2110,57 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.custom_geo_collection_staging_upload_endpoint = _Endpoint( + settings={ + 'response_type': (UploadGeoCollectionFileResponse,), + 'auth': [], + 'endpoint_path': '/api/v1/actions/customGeoCollection/staging/upload', + 'operation_id': 'custom_geo_collection_staging_upload', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'file', + ], + 'required': [ + 'file', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'file': + (file_type,), + }, + 'attribute_map': { + 'file': 'file', + }, + 'location_map': { + 'file': 'form', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [ + 'multipart/form-data' + ] + }, + api_client=api_client + ) self.dashboard_permissions_endpoint = _Endpoint( settings={ 'response_type': (DashboardPermissions,), @@ -2070,6 +2278,60 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.delete_files_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/actions/fileStorage/dataSources/{dataSourceId}/deleteFiles', + 'operation_id': 'delete_files', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'data_source_id', + 'delete_files_request', + ], + 'required': [ + 'data_source_id', + 'delete_files_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'data_source_id': + (str,), + 'delete_files_request': + (DeleteFilesRequest,), + }, + 'attribute_map': { + 'data_source_id': 'dataSourceId', + }, + 'location_map': { + 'data_source_id': 'path', + 'delete_files_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) self.delete_organization_automations_endpoint = _Endpoint( settings={ 'response_type': None, @@ -3567,21 +3829,23 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.inherited_entity_conflicts_endpoint = _Endpoint( + self.import_csv_endpoint = _Endpoint( settings={ - 'response_type': ([IdentifierDuplications],), + 'response_type': ([ImportCsvResponse],), 'auth': [], - 'endpoint_path': '/api/v1/actions/workspaces/{workspaceId}/inheritedEntityConflicts', - 'operation_id': 'inherited_entity_conflicts', - 'http_method': 'GET', + 'endpoint_path': '/api/v1/actions/fileStorage/dataSources/{dataSourceId}/importCsv', + 'operation_id': 'import_csv', + 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ - 'workspace_id', + 'data_source_id', + 'import_csv_request', ], 'required': [ - 'workspace_id', + 'data_source_id', + 'import_csv_request', ], 'nullable': [ ], @@ -3596,14 +3860,17 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'workspace_id': + 'data_source_id': (str,), + 'import_csv_request': + (ImportCsvRequest,), }, 'attribute_map': { - 'workspace_id': 'workspaceId', + 'data_source_id': 'dataSourceId', }, 'location_map': { - 'workspace_id': 'path', + 'data_source_id': 'path', + 'import_csv_request': 'body', }, 'collection_format_map': { } @@ -3612,25 +3879,29 @@ def __init__(self, api_client=None): 'accept': [ 'application/json' ], - 'content_type': [], + 'content_type': [ + 'application/json' + ] }, api_client=api_client ) - self.inherited_entity_prefixes_endpoint = _Endpoint( + self.import_custom_geo_collection_endpoint = _Endpoint( settings={ - 'response_type': ([str],), + 'response_type': (ImportGeoCollectionResponse,), 'auth': [], - 'endpoint_path': '/api/v1/actions/workspaces/{workspaceId}/inheritedEntityPrefixes', - 'operation_id': 'inherited_entity_prefixes', - 'http_method': 'GET', + 'endpoint_path': '/api/v1/actions/customGeoCollection/{collectionId}/import', + 'operation_id': 'import_custom_geo_collection', + 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ - 'workspace_id', + 'collection_id', + 'import_geo_collection_request', ], 'required': [ - 'workspace_id', + 'collection_id', + 'import_geo_collection_request', ], 'nullable': [ ], @@ -3645,57 +3916,160 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'workspace_id': + 'collection_id': (str,), + 'import_geo_collection_request': + (ImportGeoCollectionRequest,), }, 'attribute_map': { - 'workspace_id': 'workspaceId', + 'collection_id': 'collectionId', }, 'location_map': { - 'workspace_id': 'path', + 'collection_id': 'path', + 'import_geo_collection_request': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/json' + '*/*' ], - 'content_type': [], + 'content_type': [ + 'application/json' + ] }, api_client=api_client ) - self.key_driver_analysis_endpoint = _Endpoint( + self.inherited_entity_conflicts_endpoint = _Endpoint( settings={ - 'response_type': (KeyDriversResponse,), + 'response_type': ([IdentifierDuplications],), 'auth': [], - 'endpoint_path': '/api/v1/actions/workspaces/{workspaceId}/execution/computeKeyDrivers', - 'operation_id': 'key_driver_analysis', - 'http_method': 'POST', + 'endpoint_path': '/api/v1/actions/workspaces/{workspaceId}/inheritedEntityConflicts', + 'operation_id': 'inherited_entity_conflicts', + 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'workspace_id', - 'key_drivers_request', - 'skip_cache', ], 'required': [ 'workspace_id', - 'key_drivers_request', ], 'nullable': [ ], 'enum': [ ], 'validation': [ - 'workspace_id', ] }, root_map={ 'validations': { - ('workspace_id',): { - + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + }, + 'location_map': { + 'workspace_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.inherited_entity_prefixes_endpoint = _Endpoint( + settings={ + 'response_type': ([str],), + 'auth': [], + 'endpoint_path': '/api/v1/actions/workspaces/{workspaceId}/inheritedEntityPrefixes', + 'operation_id': 'inherited_entity_prefixes', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + }, + 'location_map': { + 'workspace_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.key_driver_analysis_endpoint = _Endpoint( + settings={ + 'response_type': (KeyDriversResponse,), + 'auth': [], + 'endpoint_path': '/api/v1/actions/workspaces/{workspaceId}/execution/computeKeyDrivers', + 'operation_id': 'key_driver_analysis', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'key_drivers_request', + 'skip_cache', + ], + 'required': [ + 'workspace_id', + 'key_drivers_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'workspace_id', + ] + }, + root_map={ + 'validations': { + ('workspace_id',): { + 'regex': { 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 }, @@ -3882,6 +4256,55 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.list_files_endpoint = _Endpoint( + settings={ + 'response_type': ([GdStorageFile],), + 'auth': [], + 'endpoint_path': '/api/v1/actions/fileStorage/dataSources/{dataSourceId}/listFiles', + 'operation_id': 'list_files', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'data_source_id', + ], + 'required': [ + 'data_source_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'data_source_id': + (str,), + }, + 'attribute_map': { + 'data_source_id': 'dataSourceId', + }, + 'location_map': { + 'data_source_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) self.list_workspace_user_groups_endpoint = _Endpoint( settings={ 'response_type': (WorkspaceUserGroups,), @@ -4911,6 +5334,62 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.read_csv_file_manifests_endpoint = _Endpoint( + settings={ + 'response_type': ([ReadCsvFileManifestsResponse],), + 'auth': [], + 'endpoint_path': '/api/v1/actions/fileStorage/dataSources/{dataSourceId}/readCsvFileManifests', + 'operation_id': 'read_csv_file_manifests', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'data_source_id', + 'read_csv_file_manifests_request', + ], + 'required': [ + 'data_source_id', + 'read_csv_file_manifests_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'data_source_id': + (str,), + 'read_csv_file_manifests_request': + (ReadCsvFileManifestsRequest,), + }, + 'attribute_map': { + 'data_source_id': 'dataSourceId', + }, + 'location_map': { + 'data_source_id': 'path', + 'read_csv_file_manifests_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) self.register_upload_notification_endpoint = _Endpoint( settings={ 'response_type': None, @@ -5723,6 +6202,57 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.staging_upload_endpoint = _Endpoint( + settings={ + 'response_type': (UploadFileResponse,), + 'auth': [], + 'endpoint_path': '/api/v1/actions/fileStorage/staging/upload', + 'operation_id': 'staging_upload', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'file', + ], + 'required': [ + 'file', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'file': + (file_type,), + }, + 'attribute_map': { + 'file': 'file', + }, + 'location_map': { + 'file': 'form', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'multipart/form-data' + ] + }, + api_client=api_client + ) self.switch_active_identity_provider_endpoint = _Endpoint( settings={ 'response_type': None, @@ -7444,29 +7974,24 @@ def all_platform_usage( kwargs['_request_auths'] = kwargs.get('_request_auths', None) return self.all_platform_usage_endpoint.call_with_http_info(**kwargs) - def anomaly_detection( + def analyze_csv( self, - workspace_id, - result_id, - anomaly_detection_request, + analyze_csv_request, **kwargs ): - """(EXPERIMENTAL) Smart functions - Anomaly Detection # noqa: E501 + """Analyze CSV # noqa: E501 - (EXPERIMENTAL) Computes anomaly detection. # noqa: E501 + Analyzes CSV files at the given locations # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.anomaly_detection(workspace_id, result_id, anomaly_detection_request, async_req=True) + >>> thread = api.analyze_csv(analyze_csv_request, async_req=True) >>> result = thread.get() Args: - workspace_id (str): Workspace identifier - result_id (str): Input result ID to be used in the computation - anomaly_detection_request (AnomalyDetectionRequest): + analyze_csv_request (AnalyzeCsvRequest): Keyword Args: - skip_cache (bool): Ignore all caches during execution of current request.. [optional] if omitted the server will use the default value of False _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -7499,7 +8024,7 @@ def anomaly_detection( async_req (bool): execute request asynchronously Returns: - SmartFunctionResponse + [AnalyzeCsvResponse] If the method is called asynchronously, returns the request thread. """ @@ -7528,15 +8053,103 @@ def anomaly_detection( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['workspace_id'] = \ - workspace_id - kwargs['result_id'] = \ - result_id - kwargs['anomaly_detection_request'] = \ - anomaly_detection_request - return self.anomaly_detection_endpoint.call_with_http_info(**kwargs) + kwargs['analyze_csv_request'] = \ + analyze_csv_request + return self.analyze_csv_endpoint.call_with_http_info(**kwargs) - def anomaly_detection_result( + def anomaly_detection( + self, + workspace_id, + result_id, + anomaly_detection_request, + **kwargs + ): + """(EXPERIMENTAL) Smart functions - Anomaly Detection # noqa: E501 + + (EXPERIMENTAL) Computes anomaly detection. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.anomaly_detection(workspace_id, result_id, anomaly_detection_request, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): Workspace identifier + result_id (str): Input result ID to be used in the computation + anomaly_detection_request (AnomalyDetectionRequest): + + Keyword Args: + skip_cache (bool): Ignore all caches during execution of current request.. [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + SmartFunctionResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['result_id'] = \ + result_id + kwargs['anomaly_detection_request'] = \ + anomaly_detection_request + return self.anomaly_detection_endpoint.call_with_http_info(**kwargs) + + def anomaly_detection_result( self, workspace_id, result_id, @@ -8327,6 +8940,84 @@ def clustering_result( result_id return self.clustering_result_endpoint.call_with_http_info(**kwargs) + def collect_cache_usage( + self, + **kwargs + ): + """Collect data about the current cache usage # noqa: E501 + + Get the detailed data about how much cache your organization is currently using, broken down by individual workspaces. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.collect_cache_usage(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + CacheUsageData + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.collect_cache_usage_endpoint.call_with_http_info(**kwargs) + def column_statistics( self, data_source_id, @@ -8767,6 +9458,89 @@ def compute_valid_objects( afm_valid_objects_query return self.compute_valid_objects_endpoint.call_with_http_info(**kwargs) + def convert_geo_file( + self, + convert_geo_file_request, + **kwargs + ): + """Convert a geo file to GeoParquet format # noqa: E501 + + Converts a geo file from the staging area to GeoParquet format. Supported source formats: GeoJSON (.geojson, .json), ESRI Shapefile (.zip). If the source file is already in GeoParquet format, the same location is returned without conversion. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.convert_geo_file(convert_geo_file_request, async_req=True) + >>> result = thread.get() + + Args: + convert_geo_file_request (ConvertGeoFileRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ConvertGeoFileResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['convert_geo_file_request'] = \ + convert_geo_file_request + return self.convert_geo_file_endpoint.call_with_http_info(**kwargs) + def create_dashboard_export_request( self, workspace_id, @@ -9209,24 +9983,196 @@ def create_raw_export( def create_slides_export( self, workspace_id, - slides_export_request, + slides_export_request, + **kwargs + ): + """(EXPERIMENTAL) Create slides export request # noqa: E501 + + Note: This API is an experimental and is going to change. Please, use it accordingly. A slides export job will be created based on the export request and put to queue to be executed. The result of the operation will be an exportResult identifier that will be assembled by the client into a url that can be polled. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_slides_export(workspace_id, slides_export_request, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + slides_export_request (SlidesExportRequest): + + Keyword Args: + x_gdc_debug (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ExportResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['slides_export_request'] = \ + slides_export_request + return self.create_slides_export_endpoint.call_with_http_info(**kwargs) + + def create_tabular_export( + self, + workspace_id, + tabular_export_request, + **kwargs + ): + """Create tabular export request # noqa: E501 + + An tabular export job will be created based on the export request and put to queue to be executed. The result of the operation will be an exportResult identifier that will be assembled by the client into a url that can be polled. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tabular_export(workspace_id, tabular_export_request, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + tabular_export_request (TabularExportRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ExportResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['tabular_export_request'] = \ + tabular_export_request + return self.create_tabular_export_endpoint.call_with_http_info(**kwargs) + + def created_by( + self, + workspace_id, **kwargs ): - """(EXPERIMENTAL) Create slides export request # noqa: E501 + """Get Analytics Catalog CreatedBy Users # noqa: E501 - Note: This API is an experimental and is going to change. Please, use it accordingly. A slides export job will be created based on the export request and put to queue to be executed. The result of the operation will be an exportResult identifier that will be assembled by the client into a url that can be polled. # noqa: E501 + Returns a list of Users who created any object for this workspace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_slides_export(workspace_id, slides_export_request, async_req=True) + >>> thread = api.created_by(workspace_id, async_req=True) >>> result = thread.get() Args: - workspace_id (str): - slides_export_request (SlidesExportRequest): + workspace_id (str): Workspace identifier Keyword Args: - x_gdc_debug (bool): [optional] if omitted the server will use the default value of False _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -9259,7 +10205,7 @@ def create_slides_export( async_req (bool): execute request asynchronously Returns: - ExportResponse + AnalyticsCatalogCreatedBy If the method is called asynchronously, returns the request thread. """ @@ -9290,28 +10236,24 @@ def create_slides_export( kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['workspace_id'] = \ workspace_id - kwargs['slides_export_request'] = \ - slides_export_request - return self.create_slides_export_endpoint.call_with_http_info(**kwargs) + return self.created_by_endpoint.call_with_http_info(**kwargs) - def create_tabular_export( + def custom_geo_collection_staging_upload( self, - workspace_id, - tabular_export_request, + file, **kwargs ): - """Create tabular export request # noqa: E501 + """Upload a geo collection file to the staging area # noqa: E501 - An tabular export job will be created based on the export request and put to queue to be executed. The result of the operation will be an exportResult identifier that will be assembled by the client into a url that can be polled. # noqa: E501 + Provides a location for uploading staging files for custom geo collections. Supported file types: GeoParquet (.parquet), GeoJSON (.geojson, .json), ESRI Shapefile (.zip). Maximum file size: 100 MB. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_tabular_export(workspace_id, tabular_export_request, async_req=True) + >>> thread = api.custom_geo_collection_staging_upload(file, async_req=True) >>> result = thread.get() Args: - workspace_id (str): - tabular_export_request (TabularExportRequest): + file (file_type): The geo collection file to upload. Supported formats: GeoParquet (.parquet), GeoJSON (.geojson, .json), ESRI Shapefile (.zip). Keyword Args: _return_http_data_only (bool): response data without head status @@ -9346,7 +10288,7 @@ def create_tabular_export( async_req (bool): execute request asynchronously Returns: - ExportResponse + UploadGeoCollectionFileResponse If the method is called asynchronously, returns the request thread. """ @@ -9375,28 +10317,27 @@ def create_tabular_export( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['workspace_id'] = \ - workspace_id - kwargs['tabular_export_request'] = \ - tabular_export_request - return self.create_tabular_export_endpoint.call_with_http_info(**kwargs) + kwargs['file'] = \ + file + return self.custom_geo_collection_staging_upload_endpoint.call_with_http_info(**kwargs) - def created_by( + def dashboard_permissions( self, workspace_id, + dashboard_id, **kwargs ): - """Get Analytics Catalog CreatedBy Users # noqa: E501 + """Get Dashboard Permissions # noqa: E501 - Returns a list of Users who created any object for this workspace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.created_by(workspace_id, async_req=True) + >>> thread = api.dashboard_permissions(workspace_id, dashboard_id, async_req=True) >>> result = thread.get() Args: - workspace_id (str): Workspace identifier + workspace_id (str): + dashboard_id (str): Keyword Args: _return_http_data_only (bool): response data without head status @@ -9431,7 +10372,7 @@ def created_by( async_req (bool): execute request asynchronously Returns: - AnalyticsCatalogCreatedBy + DashboardPermissions If the method is called asynchronously, returns the request thread. """ @@ -9462,25 +10403,27 @@ def created_by( kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['workspace_id'] = \ workspace_id - return self.created_by_endpoint.call_with_http_info(**kwargs) + kwargs['dashboard_id'] = \ + dashboard_id + return self.dashboard_permissions_endpoint.call_with_http_info(**kwargs) - def dashboard_permissions( + def delete_document( self, workspace_id, - dashboard_id, + filename, **kwargs ): - """Get Dashboard Permissions # noqa: E501 + """delete_document # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.dashboard_permissions(workspace_id, dashboard_id, async_req=True) + >>> thread = api.delete_document(workspace_id, filename, async_req=True) >>> result = thread.get() Args: - workspace_id (str): - dashboard_id (str): + workspace_id (str): Workspace identifier + filename (str): Keyword Args: _return_http_data_only (bool): response data without head status @@ -9515,7 +10458,7 @@ def dashboard_permissions( async_req (bool): execute request asynchronously Returns: - DashboardPermissions + DeleteKnowledgeDocumentResponseDto If the method is called asynchronously, returns the request thread. """ @@ -9546,27 +10489,28 @@ def dashboard_permissions( kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['workspace_id'] = \ workspace_id - kwargs['dashboard_id'] = \ - dashboard_id - return self.dashboard_permissions_endpoint.call_with_http_info(**kwargs) + kwargs['filename'] = \ + filename + return self.delete_document_endpoint.call_with_http_info(**kwargs) - def delete_document( + def delete_files( self, - workspace_id, - filename, + data_source_id, + delete_files_request, **kwargs ): - """delete_document # noqa: E501 + """Delete datasource files # noqa: E501 + Delete the files in the given data source. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_document(workspace_id, filename, async_req=True) + >>> thread = api.delete_files(data_source_id, delete_files_request, async_req=True) >>> result = thread.get() Args: - workspace_id (str): Workspace identifier - filename (str): + data_source_id (str): + delete_files_request (DeleteFilesRequest): Keyword Args: _return_http_data_only (bool): response data without head status @@ -9601,7 +10545,7 @@ def delete_document( async_req (bool): execute request asynchronously Returns: - DeleteKnowledgeDocumentResponseDto + None If the method is called asynchronously, returns the request thread. """ @@ -9630,11 +10574,11 @@ def delete_document( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['workspace_id'] = \ - workspace_id - kwargs['filename'] = \ - filename - return self.delete_document_endpoint.call_with_http_info(**kwargs) + kwargs['data_source_id'] = \ + data_source_id + kwargs['delete_files_request'] = \ + delete_files_request + return self.delete_files_endpoint.call_with_http_info(**kwargs) def delete_organization_automations( self, @@ -11622,24 +12566,194 @@ def get_slides_export_metadata( export_id return self.get_slides_export_metadata_endpoint.call_with_http_info(**kwargs) - def get_tabular_export( + def get_tabular_export( + self, + workspace_id, + export_id, + **kwargs + ): + """Retrieve exported files # noqa: E501 + + After clients creates a POST export request, the processing of it will start shortly asynchronously. To retrieve the result, client has to check periodically for the result on this endpoint. In case the result isn't ready yet, the service returns 202. If the result is ready, it returns 200 and octet stream of the result file with provided filename. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tabular_export(workspace_id, export_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + export_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + file_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['export_id'] = \ + export_id + return self.get_tabular_export_endpoint.call_with_http_info(**kwargs) + + def get_translation_tags( + self, + workspace_id, + **kwargs + ): + """Get translation tags. # noqa: E501 + + Provides a list of effective translation tags. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_translation_tags(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [str] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_translation_tags_endpoint.call_with_http_info(**kwargs) + + def import_csv( self, - workspace_id, - export_id, + data_source_id, + import_csv_request, **kwargs ): - """Retrieve exported files # noqa: E501 + """Import CSV # noqa: E501 - After clients creates a POST export request, the processing of it will start shortly asynchronously. To retrieve the result, client has to check periodically for the result on this endpoint. In case the result isn't ready yet, the service returns 202. If the result is ready, it returns 200 and octet stream of the result file with provided filename. # noqa: E501 + Import the CSV files at the given locations in the staging area to the final location. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_tabular_export(workspace_id, export_id, async_req=True) + >>> thread = api.import_csv(data_source_id, import_csv_request, async_req=True) >>> result = thread.get() Args: - workspace_id (str): - export_id (str): + data_source_id (str): + import_csv_request (ImportCsvRequest): Keyword Args: _return_http_data_only (bool): response data without head status @@ -11674,7 +12788,7 @@ def get_tabular_export( async_req (bool): execute request asynchronously Returns: - file_type + [ImportCsvResponse] If the method is called asynchronously, returns the request thread. """ @@ -11703,28 +12817,30 @@ def get_tabular_export( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['workspace_id'] = \ - workspace_id - kwargs['export_id'] = \ - export_id - return self.get_tabular_export_endpoint.call_with_http_info(**kwargs) + kwargs['data_source_id'] = \ + data_source_id + kwargs['import_csv_request'] = \ + import_csv_request + return self.import_csv_endpoint.call_with_http_info(**kwargs) - def get_translation_tags( + def import_custom_geo_collection( self, - workspace_id, + collection_id, + import_geo_collection_request, **kwargs ): - """Get translation tags. # noqa: E501 + """Import custom geo collection # noqa: E501 - Provides a list of effective translation tags. # noqa: E501 + Import a geo collection file from the staging area to be available for use. The file must be in GeoParquet format (use the convert endpoint first for other formats). Validates file size (max 100 MB), organization storage quota (max 1 GB total), and GeoParquet schema (requires id, geometry, and bbox columns). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_translation_tags(workspace_id, async_req=True) + >>> thread = api.import_custom_geo_collection(collection_id, import_geo_collection_request, async_req=True) >>> result = thread.get() Args: - workspace_id (str): + collection_id (str): + import_geo_collection_request (ImportGeoCollectionRequest): Keyword Args: _return_http_data_only (bool): response data without head status @@ -11759,7 +12875,7 @@ def get_translation_tags( async_req (bool): execute request asynchronously Returns: - [str] + ImportGeoCollectionResponse If the method is called asynchronously, returns the request thread. """ @@ -11788,9 +12904,11 @@ def get_translation_tags( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['workspace_id'] = \ - workspace_id - return self.get_translation_tags_endpoint.call_with_http_info(**kwargs) + kwargs['collection_id'] = \ + collection_id + kwargs['import_geo_collection_request'] = \ + import_geo_collection_request + return self.import_custom_geo_collection_endpoint.call_with_http_info(**kwargs) def inherited_entity_conflicts( self, @@ -12221,6 +13339,89 @@ def list_documents( workspace_id return self.list_documents_endpoint.call_with_http_info(**kwargs) + def list_files( + self, + data_source_id, + **kwargs + ): + """List datasource files # noqa: E501 + + List all the files in the given data source. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_files(data_source_id, async_req=True) + >>> result = thread.get() + + Args: + data_source_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [GdStorageFile] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['data_source_id'] = \ + data_source_id + return self.list_files_endpoint.call_with_http_info(**kwargs) + def list_workspace_user_groups( self, workspace_id, @@ -13823,6 +15024,93 @@ def pause_workspace_automations( workspace_automation_management_bulk_request return self.pause_workspace_automations_endpoint.call_with_http_info(**kwargs) + def read_csv_file_manifests( + self, + data_source_id, + read_csv_file_manifests_request, + **kwargs + ): + """Read CSV file manifests # noqa: E501 + + Read the manifests of the CSV files in the given data source. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_csv_file_manifests(data_source_id, read_csv_file_manifests_request, async_req=True) + >>> result = thread.get() + + Args: + data_source_id (str): + read_csv_file_manifests_request (ReadCsvFileManifestsRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ReadCsvFileManifestsResponse] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['data_source_id'] = \ + data_source_id + kwargs['read_csv_file_manifests_request'] = \ + read_csv_file_manifests_request + return self.read_csv_file_manifests_endpoint.call_with_http_info(**kwargs) + def register_upload_notification( self, data_source_id, @@ -15015,6 +16303,89 @@ def set_translations( xliff return self.set_translations_endpoint.call_with_http_info(**kwargs) + def staging_upload( + self, + file, + **kwargs + ): + """Upload a file to the staging area # noqa: E501 + + Provides a location for uploading staging files. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.staging_upload(file, async_req=True) + >>> result = thread.get() + + Args: + file (file_type): The file to upload. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + UploadFileResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['file'] = \ + file + return self.staging_upload_endpoint.call_with_http_info(**kwargs) + def switch_active_identity_provider( self, switch_identity_provider_request, diff --git a/gooddata-api-client/gooddata_api_client/api/analytical_dashboard_controller_api.py b/gooddata-api-client/gooddata_api_client/api/analytical_dashboard_controller_api.py new file mode 100644 index 000000000..d8b434ff4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/analytical_dashboard_controller_api.py @@ -0,0 +1,1321 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_analytical_dashboard_in_document import JsonApiAnalyticalDashboardInDocument +from gooddata_api_client.model.json_api_analytical_dashboard_out_document import JsonApiAnalyticalDashboardOutDocument +from gooddata_api_client.model.json_api_analytical_dashboard_out_list import JsonApiAnalyticalDashboardOutList +from gooddata_api_client.model.json_api_analytical_dashboard_patch_document import JsonApiAnalyticalDashboardPatchDocument +from gooddata_api_client.model.json_api_analytical_dashboard_post_optional_id_document import JsonApiAnalyticalDashboardPostOptionalIdDocument + + +class AnalyticalDashboardControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_analytical_dashboards_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAnalyticalDashboardOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/analyticalDashboards', + 'operation_id': 'create_entity_analytical_dashboards', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_analytical_dashboard_post_optional_id_document', + 'include', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'json_api_analytical_dashboard_post_optional_id_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "VISUALIZATIONOBJECTS": "visualizationObjects", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "FILTERCONTEXTS": "filterContexts", + "DASHBOARDPLUGINS": "dashboardPlugins", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "CERTIFIEDBY": "certifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "PERMISSIONS": "permissions", + "ORIGIN": "origin", + "ACCESSINFO": "accessInfo", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_analytical_dashboard_post_optional_id_document': + (JsonApiAnalyticalDashboardPostOptionalIdDocument,), + 'include': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'include': 'include', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_analytical_dashboard_post_optional_id_document': 'body', + 'include': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_analytical_dashboards_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId}', + 'operation_id': 'delete_entity_analytical_dashboards', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_analytical_dashboards_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAnalyticalDashboardOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/analyticalDashboards', + 'operation_id': 'get_all_entities_analytical_dashboards', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "VISUALIZATIONOBJECTS": "visualizationObjects", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "FILTERCONTEXTS": "filterContexts", + "DASHBOARDPLUGINS": "dashboardPlugins", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "CERTIFIEDBY": "certifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "PERMISSIONS": "permissions", + "ORIGIN": "origin", + "ACCESSINFO": "accessInfo", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_analytical_dashboards_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAnalyticalDashboardOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId}', + 'operation_id': 'get_entity_analytical_dashboards', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "VISUALIZATIONOBJECTS": "visualizationObjects", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "FILTERCONTEXTS": "filterContexts", + "DASHBOARDPLUGINS": "dashboardPlugins", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "CERTIFIEDBY": "certifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "PERMISSIONS": "permissions", + "ORIGIN": "origin", + "ACCESSINFO": "accessInfo", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_analytical_dashboards_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAnalyticalDashboardOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId}', + 'operation_id': 'patch_entity_analytical_dashboards', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_analytical_dashboard_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_analytical_dashboard_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "VISUALIZATIONOBJECTS": "visualizationObjects", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "FILTERCONTEXTS": "filterContexts", + "DASHBOARDPLUGINS": "dashboardPlugins", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "CERTIFIEDBY": "certifiedBy", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_analytical_dashboard_patch_document': + (JsonApiAnalyticalDashboardPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_analytical_dashboard_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_analytical_dashboards_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAnalyticalDashboardOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/analyticalDashboards/search', + 'operation_id': 'search_entities_analytical_dashboards', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_entity_analytical_dashboards_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAnalyticalDashboardOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId}', + 'operation_id': 'update_entity_analytical_dashboards', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_analytical_dashboard_in_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_analytical_dashboard_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "VISUALIZATIONOBJECTS": "visualizationObjects", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "FILTERCONTEXTS": "filterContexts", + "DASHBOARDPLUGINS": "dashboardPlugins", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "CERTIFIEDBY": "certifiedBy", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_analytical_dashboard_in_document': + (JsonApiAnalyticalDashboardInDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_analytical_dashboard_in_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_analytical_dashboards( + self, + workspace_id, + json_api_analytical_dashboard_post_optional_id_document, + **kwargs + ): + """Post Dashboards # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_analytical_dashboards(workspace_id, json_api_analytical_dashboard_post_optional_id_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_analytical_dashboard_post_optional_id_document (JsonApiAnalyticalDashboardPostOptionalIdDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAnalyticalDashboardOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_analytical_dashboard_post_optional_id_document'] = \ + json_api_analytical_dashboard_post_optional_id_document + return self.create_entity_analytical_dashboards_endpoint.call_with_http_info(**kwargs) + + def delete_entity_analytical_dashboards( + self, + workspace_id, + object_id, + **kwargs + ): + """Delete a Dashboard # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_analytical_dashboards(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.delete_entity_analytical_dashboards_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_analytical_dashboards( + self, + workspace_id, + **kwargs + ): + """Get all Dashboards # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_analytical_dashboards(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAnalyticalDashboardOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_analytical_dashboards_endpoint.call_with_http_info(**kwargs) + + def get_entity_analytical_dashboards( + self, + workspace_id, + object_id, + **kwargs + ): + """Get a Dashboard # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_analytical_dashboards(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAnalyticalDashboardOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_analytical_dashboards_endpoint.call_with_http_info(**kwargs) + + def patch_entity_analytical_dashboards( + self, + workspace_id, + object_id, + json_api_analytical_dashboard_patch_document, + **kwargs + ): + """Patch a Dashboard # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_analytical_dashboards(workspace_id, object_id, json_api_analytical_dashboard_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_analytical_dashboard_patch_document (JsonApiAnalyticalDashboardPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAnalyticalDashboardOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_analytical_dashboard_patch_document'] = \ + json_api_analytical_dashboard_patch_document + return self.patch_entity_analytical_dashboards_endpoint.call_with_http_info(**kwargs) + + def search_entities_analytical_dashboards( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_analytical_dashboards(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAnalyticalDashboardOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_analytical_dashboards_endpoint.call_with_http_info(**kwargs) + + def update_entity_analytical_dashboards( + self, + workspace_id, + object_id, + json_api_analytical_dashboard_in_document, + **kwargs + ): + """Put Dashboards # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_analytical_dashboards(workspace_id, object_id, json_api_analytical_dashboard_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_analytical_dashboard_in_document (JsonApiAnalyticalDashboardInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAnalyticalDashboardOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_analytical_dashboard_in_document'] = \ + json_api_analytical_dashboard_in_document + return self.update_entity_analytical_dashboards_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/api_token_controller_api.py b/gooddata-api-client/gooddata_api_client/api/api_token_controller_api.py new file mode 100644 index 000000000..db7a27f79 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/api_token_controller_api.py @@ -0,0 +1,667 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.json_api_api_token_in_document import JsonApiApiTokenInDocument +from gooddata_api_client.model.json_api_api_token_out_document import JsonApiApiTokenOutDocument +from gooddata_api_client.model.json_api_api_token_out_list import JsonApiApiTokenOutList + + +class ApiTokenControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_api_tokens_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiApiTokenOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/users/{userId}/apiTokens', + 'operation_id': 'create_entity_api_tokens', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'json_api_api_token_in_document', + ], + 'required': [ + 'user_id', + 'json_api_api_token_in_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'json_api_api_token_in_document': + (JsonApiApiTokenInDocument,), + }, + 'attribute_map': { + 'user_id': 'userId', + }, + 'location_map': { + 'user_id': 'path', + 'json_api_api_token_in_document': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_api_tokens_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/users/{userId}/apiTokens/{id}', + 'operation_id': 'delete_entity_api_tokens', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'id', + 'filter', + ], + 'required': [ + 'user_id', + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'user_id': 'userId', + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'user_id': 'path', + 'id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_api_tokens_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiApiTokenOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/users/{userId}/apiTokens', + 'operation_id': 'get_all_entities_api_tokens', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'filter', + 'page', + 'size', + 'sort', + 'meta_include', + ], + 'required': [ + 'user_id', + ], + 'nullable': [ + ], + 'enum': [ + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('meta_include',): { + + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'user_id': + (str,), + 'filter': + (str,), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'user_id': 'userId', + 'filter': 'filter', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'user_id': 'path', + 'filter': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_api_tokens_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiApiTokenOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/users/{userId}/apiTokens/{id}', + 'operation_id': 'get_entity_api_tokens', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'id', + 'filter', + ], + 'required': [ + 'user_id', + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'user_id': 'userId', + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'user_id': 'path', + 'id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def create_entity_api_tokens( + self, + user_id, + json_api_api_token_in_document, + **kwargs + ): + """Post a new API token for the user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_api_tokens(user_id, json_api_api_token_in_document, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + json_api_api_token_in_document (JsonApiApiTokenInDocument): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiApiTokenOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user_id'] = \ + user_id + kwargs['json_api_api_token_in_document'] = \ + json_api_api_token_in_document + return self.create_entity_api_tokens_endpoint.call_with_http_info(**kwargs) + + def delete_entity_api_tokens( + self, + user_id, + id, + **kwargs + ): + """Delete an API Token for a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_api_tokens(user_id, id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user_id'] = \ + user_id + kwargs['id'] = \ + id + return self.delete_entity_api_tokens_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_api_tokens( + self, + user_id, + **kwargs + ): + """List all api tokens for a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_api_tokens(user_id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiApiTokenOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user_id'] = \ + user_id + return self.get_all_entities_api_tokens_endpoint.call_with_http_info(**kwargs) + + def get_entity_api_tokens( + self, + user_id, + id, + **kwargs + ): + """Get an API Token for a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_api_tokens(user_id, id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiApiTokenOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user_id'] = \ + user_id + kwargs['id'] = \ + id + return self.get_entity_api_tokens_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/attribute_controller_api.py b/gooddata-api-client/gooddata_api_client/api/attribute_controller_api.py new file mode 100644 index 000000000..65c6f8a76 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/attribute_controller_api.py @@ -0,0 +1,782 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_attribute_out_document import JsonApiAttributeOutDocument +from gooddata_api_client.model.json_api_attribute_out_list import JsonApiAttributeOutList +from gooddata_api_client.model.json_api_attribute_patch_document import JsonApiAttributePatchDocument + + +class AttributeControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_all_entities_attributes_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAttributeOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/attributes', + 'operation_id': 'get_all_entities_attributes', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "DATASETS": "datasets", + "LABELS": "labels", + "ATTRIBUTEHIERARCHIES": "attributeHierarchies", + "DATASET": "dataset", + "DEFAULTVIEW": "defaultView", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_attributes_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAttributeOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/attributes/{objectId}', + 'operation_id': 'get_entity_attributes', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "DATASETS": "datasets", + "LABELS": "labels", + "ATTRIBUTEHIERARCHIES": "attributeHierarchies", + "DATASET": "dataset", + "DEFAULTVIEW": "defaultView", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_attributes_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAttributeOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/attributes/{objectId}', + 'operation_id': 'patch_entity_attributes', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_attribute_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_attribute_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "DATASETS": "datasets", + "LABELS": "labels", + "ATTRIBUTEHIERARCHIES": "attributeHierarchies", + "DATASET": "dataset", + "DEFAULTVIEW": "defaultView", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_attribute_patch_document': + (JsonApiAttributePatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_attribute_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_attributes_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAttributeOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/attributes/search', + 'operation_id': 'search_entities_attributes', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def get_all_entities_attributes( + self, + workspace_id, + **kwargs + ): + """Get all Attributes # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_attributes(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAttributeOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_attributes_endpoint.call_with_http_info(**kwargs) + + def get_entity_attributes( + self, + workspace_id, + object_id, + **kwargs + ): + """Get an Attribute # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_attributes(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAttributeOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_attributes_endpoint.call_with_http_info(**kwargs) + + def patch_entity_attributes( + self, + workspace_id, + object_id, + json_api_attribute_patch_document, + **kwargs + ): + """Patch an Attribute (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_attributes(workspace_id, object_id, json_api_attribute_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_attribute_patch_document (JsonApiAttributePatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAttributeOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_attribute_patch_document'] = \ + json_api_attribute_patch_document + return self.patch_entity_attributes_endpoint.call_with_http_info(**kwargs) + + def search_entities_attributes( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_attributes(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAttributeOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_attributes_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/attribute_hierarchy_controller_api.py b/gooddata-api-client/gooddata_api_client/api/attribute_hierarchy_controller_api.py new file mode 100644 index 000000000..9be5c8c0e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/attribute_hierarchy_controller_api.py @@ -0,0 +1,1279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_attribute_hierarchy_in_document import JsonApiAttributeHierarchyInDocument +from gooddata_api_client.model.json_api_attribute_hierarchy_out_document import JsonApiAttributeHierarchyOutDocument +from gooddata_api_client.model.json_api_attribute_hierarchy_out_list import JsonApiAttributeHierarchyOutList +from gooddata_api_client.model.json_api_attribute_hierarchy_patch_document import JsonApiAttributeHierarchyPatchDocument + + +class AttributeHierarchyControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_attribute_hierarchies_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAttributeHierarchyOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/attributeHierarchies', + 'operation_id': 'create_entity_attribute_hierarchies', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_attribute_hierarchy_in_document', + 'include', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'json_api_attribute_hierarchy_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "ATTRIBUTES": "attributes", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_attribute_hierarchy_in_document': + (JsonApiAttributeHierarchyInDocument,), + 'include': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'include': 'include', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_attribute_hierarchy_in_document': 'body', + 'include': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_attribute_hierarchies_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/attributeHierarchies/{objectId}', + 'operation_id': 'delete_entity_attribute_hierarchies', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_attribute_hierarchies_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAttributeHierarchyOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/attributeHierarchies', + 'operation_id': 'get_all_entities_attribute_hierarchies', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "ATTRIBUTES": "attributes", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_attribute_hierarchies_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAttributeHierarchyOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/attributeHierarchies/{objectId}', + 'operation_id': 'get_entity_attribute_hierarchies', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "ATTRIBUTES": "attributes", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_attribute_hierarchies_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAttributeHierarchyOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/attributeHierarchies/{objectId}', + 'operation_id': 'patch_entity_attribute_hierarchies', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_attribute_hierarchy_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_attribute_hierarchy_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "ATTRIBUTES": "attributes", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_attribute_hierarchy_patch_document': + (JsonApiAttributeHierarchyPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_attribute_hierarchy_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_attribute_hierarchies_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAttributeHierarchyOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/attributeHierarchies/search', + 'operation_id': 'search_entities_attribute_hierarchies', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_entity_attribute_hierarchies_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAttributeHierarchyOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/attributeHierarchies/{objectId}', + 'operation_id': 'update_entity_attribute_hierarchies', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_attribute_hierarchy_in_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_attribute_hierarchy_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "ATTRIBUTES": "attributes", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_attribute_hierarchy_in_document': + (JsonApiAttributeHierarchyInDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_attribute_hierarchy_in_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_attribute_hierarchies( + self, + workspace_id, + json_api_attribute_hierarchy_in_document, + **kwargs + ): + """Post Attribute Hierarchies # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_attribute_hierarchies(workspace_id, json_api_attribute_hierarchy_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_attribute_hierarchy_in_document (JsonApiAttributeHierarchyInDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAttributeHierarchyOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_attribute_hierarchy_in_document'] = \ + json_api_attribute_hierarchy_in_document + return self.create_entity_attribute_hierarchies_endpoint.call_with_http_info(**kwargs) + + def delete_entity_attribute_hierarchies( + self, + workspace_id, + object_id, + **kwargs + ): + """Delete an Attribute Hierarchy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_attribute_hierarchies(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.delete_entity_attribute_hierarchies_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_attribute_hierarchies( + self, + workspace_id, + **kwargs + ): + """Get all Attribute Hierarchies # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_attribute_hierarchies(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAttributeHierarchyOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_attribute_hierarchies_endpoint.call_with_http_info(**kwargs) + + def get_entity_attribute_hierarchies( + self, + workspace_id, + object_id, + **kwargs + ): + """Get an Attribute Hierarchy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_attribute_hierarchies(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAttributeHierarchyOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_attribute_hierarchies_endpoint.call_with_http_info(**kwargs) + + def patch_entity_attribute_hierarchies( + self, + workspace_id, + object_id, + json_api_attribute_hierarchy_patch_document, + **kwargs + ): + """Patch an Attribute Hierarchy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_attribute_hierarchies(workspace_id, object_id, json_api_attribute_hierarchy_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_attribute_hierarchy_patch_document (JsonApiAttributeHierarchyPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAttributeHierarchyOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_attribute_hierarchy_patch_document'] = \ + json_api_attribute_hierarchy_patch_document + return self.patch_entity_attribute_hierarchies_endpoint.call_with_http_info(**kwargs) + + def search_entities_attribute_hierarchies( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_attribute_hierarchies(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAttributeHierarchyOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_attribute_hierarchies_endpoint.call_with_http_info(**kwargs) + + def update_entity_attribute_hierarchies( + self, + workspace_id, + object_id, + json_api_attribute_hierarchy_in_document, + **kwargs + ): + """Put an Attribute Hierarchy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_attribute_hierarchies(workspace_id, object_id, json_api_attribute_hierarchy_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_attribute_hierarchy_in_document (JsonApiAttributeHierarchyInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAttributeHierarchyOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_attribute_hierarchy_in_document'] = \ + json_api_attribute_hierarchy_in_document + return self.update_entity_attribute_hierarchies_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/automation_controller_api.py b/gooddata-api-client/gooddata_api_client/api/automation_controller_api.py new file mode 100644 index 000000000..15cbaac6e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/automation_controller_api.py @@ -0,0 +1,1314 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_automation_in_document import JsonApiAutomationInDocument +from gooddata_api_client.model.json_api_automation_out_document import JsonApiAutomationOutDocument +from gooddata_api_client.model.json_api_automation_out_list import JsonApiAutomationOutList +from gooddata_api_client.model.json_api_automation_patch_document import JsonApiAutomationPatchDocument + + +class AutomationControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_automations_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAutomationOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/automations', + 'operation_id': 'create_entity_automations', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_automation_in_document', + 'include', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'json_api_automation_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "NOTIFICATIONCHANNELS": "notificationChannels", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "USERIDENTIFIERS": "userIdentifiers", + "EXPORTDEFINITIONS": "exportDefinitions", + "USERS": "users", + "AUTOMATIONRESULTS": "automationResults", + "NOTIFICATIONCHANNEL": "notificationChannel", + "ANALYTICALDASHBOARD": "analyticalDashboard", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "RECIPIENTS": "recipients", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_automation_in_document': + (JsonApiAutomationInDocument,), + 'include': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'include': 'include', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_automation_in_document': 'body', + 'include': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_automations_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/automations/{objectId}', + 'operation_id': 'delete_entity_automations', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_automations_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAutomationOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/automations', + 'operation_id': 'get_all_entities_automations', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "NOTIFICATIONCHANNELS": "notificationChannels", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "USERIDENTIFIERS": "userIdentifiers", + "EXPORTDEFINITIONS": "exportDefinitions", + "USERS": "users", + "AUTOMATIONRESULTS": "automationResults", + "NOTIFICATIONCHANNEL": "notificationChannel", + "ANALYTICALDASHBOARD": "analyticalDashboard", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "RECIPIENTS": "recipients", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_automations_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAutomationOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/automations/{objectId}', + 'operation_id': 'get_entity_automations', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "NOTIFICATIONCHANNELS": "notificationChannels", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "USERIDENTIFIERS": "userIdentifiers", + "EXPORTDEFINITIONS": "exportDefinitions", + "USERS": "users", + "AUTOMATIONRESULTS": "automationResults", + "NOTIFICATIONCHANNEL": "notificationChannel", + "ANALYTICALDASHBOARD": "analyticalDashboard", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "RECIPIENTS": "recipients", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_automations_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAutomationOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/automations/{objectId}', + 'operation_id': 'patch_entity_automations', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_automation_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_automation_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "NOTIFICATIONCHANNELS": "notificationChannels", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "USERIDENTIFIERS": "userIdentifiers", + "EXPORTDEFINITIONS": "exportDefinitions", + "USERS": "users", + "AUTOMATIONRESULTS": "automationResults", + "NOTIFICATIONCHANNEL": "notificationChannel", + "ANALYTICALDASHBOARD": "analyticalDashboard", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "RECIPIENTS": "recipients", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_automation_patch_document': + (JsonApiAutomationPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_automation_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_automations_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAutomationOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/automations/search', + 'operation_id': 'search_entities_automations', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_entity_automations_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiAutomationOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/automations/{objectId}', + 'operation_id': 'update_entity_automations', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_automation_in_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_automation_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "NOTIFICATIONCHANNELS": "notificationChannels", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "USERIDENTIFIERS": "userIdentifiers", + "EXPORTDEFINITIONS": "exportDefinitions", + "USERS": "users", + "AUTOMATIONRESULTS": "automationResults", + "NOTIFICATIONCHANNEL": "notificationChannel", + "ANALYTICALDASHBOARD": "analyticalDashboard", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "RECIPIENTS": "recipients", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_automation_in_document': + (JsonApiAutomationInDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_automation_in_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_automations( + self, + workspace_id, + json_api_automation_in_document, + **kwargs + ): + """Post Automations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_automations(workspace_id, json_api_automation_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_automation_in_document (JsonApiAutomationInDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAutomationOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_automation_in_document'] = \ + json_api_automation_in_document + return self.create_entity_automations_endpoint.call_with_http_info(**kwargs) + + def delete_entity_automations( + self, + workspace_id, + object_id, + **kwargs + ): + """Delete an Automation # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_automations(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.delete_entity_automations_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_automations( + self, + workspace_id, + **kwargs + ): + """Get all Automations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_automations(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAutomationOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_automations_endpoint.call_with_http_info(**kwargs) + + def get_entity_automations( + self, + workspace_id, + object_id, + **kwargs + ): + """Get an Automation # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_automations(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAutomationOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_automations_endpoint.call_with_http_info(**kwargs) + + def patch_entity_automations( + self, + workspace_id, + object_id, + json_api_automation_patch_document, + **kwargs + ): + """Patch an Automation # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_automations(workspace_id, object_id, json_api_automation_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_automation_patch_document (JsonApiAutomationPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAutomationOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_automation_patch_document'] = \ + json_api_automation_patch_document + return self.patch_entity_automations_endpoint.call_with_http_info(**kwargs) + + def search_entities_automations( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_automations(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAutomationOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_automations_endpoint.call_with_http_info(**kwargs) + + def update_entity_automations( + self, + workspace_id, + object_id, + json_api_automation_in_document, + **kwargs + ): + """Put an Automation # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_automations(workspace_id, object_id, json_api_automation_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_automation_in_document (JsonApiAutomationInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiAutomationOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_automation_in_document'] = \ + json_api_automation_in_document + return self.update_entity_automations_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/cache_usage_api.py b/gooddata-api-client/gooddata_api_client/api/cache_usage_api.py new file mode 100644 index 000000000..93363f3ae --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/cache_usage_api.py @@ -0,0 +1,159 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.cache_usage_data import CacheUsageData + + +class CacheUsageApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.collect_cache_usage_endpoint = _Endpoint( + settings={ + 'response_type': (CacheUsageData,), + 'auth': [], + 'endpoint_path': '/api/v1/actions/collectCacheUsage', + 'operation_id': 'collect_cache_usage', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def collect_cache_usage( + self, + **kwargs + ): + """Collect data about the current cache usage # noqa: E501 + + Get the detailed data about how much cache your organization is currently using, broken down by individual workspaces. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.collect_cache_usage(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + CacheUsageData + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.collect_cache_usage_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/cookie_security_configuration_controller_api.py b/gooddata-api-client/gooddata_api_client/api/cookie_security_configuration_controller_api.py new file mode 100644 index 000000000..9b5647dcc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/cookie_security_configuration_controller_api.py @@ -0,0 +1,500 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.json_api_cookie_security_configuration_in_document import JsonApiCookieSecurityConfigurationInDocument +from gooddata_api_client.model.json_api_cookie_security_configuration_out_document import JsonApiCookieSecurityConfigurationOutDocument +from gooddata_api_client.model.json_api_cookie_security_configuration_patch_document import JsonApiCookieSecurityConfigurationPatchDocument + + +class CookieSecurityConfigurationControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_entity_cookie_security_configurations_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiCookieSecurityConfigurationOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/admin/cookieSecurityConfigurations/{id}', + 'operation_id': 'get_entity_cookie_security_configurations', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'filter', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_cookie_security_configurations_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiCookieSecurityConfigurationOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/admin/cookieSecurityConfigurations/{id}', + 'operation_id': 'patch_entity_cookie_security_configurations', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_cookie_security_configuration_patch_document', + 'filter', + ], + 'required': [ + 'id', + 'json_api_cookie_security_configuration_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_cookie_security_configuration_patch_document': + (JsonApiCookieSecurityConfigurationPatchDocument,), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'json_api_cookie_security_configuration_patch_document': 'body', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.update_entity_cookie_security_configurations_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiCookieSecurityConfigurationOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/admin/cookieSecurityConfigurations/{id}', + 'operation_id': 'update_entity_cookie_security_configurations', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_cookie_security_configuration_in_document', + 'filter', + ], + 'required': [ + 'id', + 'json_api_cookie_security_configuration_in_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_cookie_security_configuration_in_document': + (JsonApiCookieSecurityConfigurationInDocument,), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'json_api_cookie_security_configuration_in_document': 'body', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def get_entity_cookie_security_configurations( + self, + id, + **kwargs + ): + """Get CookieSecurityConfiguration # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_cookie_security_configurations(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiCookieSecurityConfigurationOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.get_entity_cookie_security_configurations_endpoint.call_with_http_info(**kwargs) + + def patch_entity_cookie_security_configurations( + self, + id, + json_api_cookie_security_configuration_patch_document, + **kwargs + ): + """Patch CookieSecurityConfiguration # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_cookie_security_configurations(id, json_api_cookie_security_configuration_patch_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_cookie_security_configuration_patch_document (JsonApiCookieSecurityConfigurationPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiCookieSecurityConfigurationOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['json_api_cookie_security_configuration_patch_document'] = \ + json_api_cookie_security_configuration_patch_document + return self.patch_entity_cookie_security_configurations_endpoint.call_with_http_info(**kwargs) + + def update_entity_cookie_security_configurations( + self, + id, + json_api_cookie_security_configuration_in_document, + **kwargs + ): + """Put CookieSecurityConfiguration # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_cookie_security_configurations(id, json_api_cookie_security_configuration_in_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_cookie_security_configuration_in_document (JsonApiCookieSecurityConfigurationInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiCookieSecurityConfigurationOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['json_api_cookie_security_configuration_in_document'] = \ + json_api_cookie_security_configuration_in_document + return self.update_entity_cookie_security_configurations_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/custom_application_setting_controller_api.py b/gooddata-api-client/gooddata_api_client/api/custom_application_setting_controller_api.py new file mode 100644 index 000000000..a89f8f7f2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/custom_application_setting_controller_api.py @@ -0,0 +1,1200 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_custom_application_setting_in_document import JsonApiCustomApplicationSettingInDocument +from gooddata_api_client.model.json_api_custom_application_setting_out_document import JsonApiCustomApplicationSettingOutDocument +from gooddata_api_client.model.json_api_custom_application_setting_out_list import JsonApiCustomApplicationSettingOutList +from gooddata_api_client.model.json_api_custom_application_setting_patch_document import JsonApiCustomApplicationSettingPatchDocument +from gooddata_api_client.model.json_api_custom_application_setting_post_optional_id_document import JsonApiCustomApplicationSettingPostOptionalIdDocument + + +class CustomApplicationSettingControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_custom_application_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiCustomApplicationSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/customApplicationSettings', + 'operation_id': 'create_entity_custom_application_settings', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_custom_application_setting_post_optional_id_document', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'json_api_custom_application_setting_post_optional_id_document', + ], + 'nullable': [ + ], + 'enum': [ + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_custom_application_setting_post_optional_id_document': + (JsonApiCustomApplicationSettingPostOptionalIdDocument,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_custom_application_setting_post_optional_id_document': 'body', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_custom_application_settings_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/customApplicationSettings/{objectId}', + 'operation_id': 'delete_entity_custom_application_settings', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_custom_application_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiCustomApplicationSettingOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/customApplicationSettings', + 'operation_id': 'get_all_entities_custom_application_settings', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_custom_application_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiCustomApplicationSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/customApplicationSettings/{objectId}', + 'operation_id': 'get_entity_custom_application_settings', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_custom_application_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiCustomApplicationSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/customApplicationSettings/{objectId}', + 'operation_id': 'patch_entity_custom_application_settings', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_custom_application_setting_patch_document', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_custom_application_setting_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_custom_application_setting_patch_document': + (JsonApiCustomApplicationSettingPatchDocument,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_custom_application_setting_patch_document': 'body', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_custom_application_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiCustomApplicationSettingOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/customApplicationSettings/search', + 'operation_id': 'search_entities_custom_application_settings', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_entity_custom_application_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiCustomApplicationSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/customApplicationSettings/{objectId}', + 'operation_id': 'update_entity_custom_application_settings', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_custom_application_setting_in_document', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_custom_application_setting_in_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_custom_application_setting_in_document': + (JsonApiCustomApplicationSettingInDocument,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_custom_application_setting_in_document': 'body', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_custom_application_settings( + self, + workspace_id, + json_api_custom_application_setting_post_optional_id_document, + **kwargs + ): + """Post Custom Application Settings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_custom_application_settings(workspace_id, json_api_custom_application_setting_post_optional_id_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_custom_application_setting_post_optional_id_document (JsonApiCustomApplicationSettingPostOptionalIdDocument): + + Keyword Args: + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiCustomApplicationSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_custom_application_setting_post_optional_id_document'] = \ + json_api_custom_application_setting_post_optional_id_document + return self.create_entity_custom_application_settings_endpoint.call_with_http_info(**kwargs) + + def delete_entity_custom_application_settings( + self, + workspace_id, + object_id, + **kwargs + ): + """Delete a Custom Application Setting # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_custom_application_settings(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.delete_entity_custom_application_settings_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_custom_application_settings( + self, + workspace_id, + **kwargs + ): + """Get all Custom Application Settings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_custom_application_settings(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiCustomApplicationSettingOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_custom_application_settings_endpoint.call_with_http_info(**kwargs) + + def get_entity_custom_application_settings( + self, + workspace_id, + object_id, + **kwargs + ): + """Get a Custom Application Setting # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_custom_application_settings(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiCustomApplicationSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_custom_application_settings_endpoint.call_with_http_info(**kwargs) + + def patch_entity_custom_application_settings( + self, + workspace_id, + object_id, + json_api_custom_application_setting_patch_document, + **kwargs + ): + """Patch a Custom Application Setting # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_custom_application_settings(workspace_id, object_id, json_api_custom_application_setting_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_custom_application_setting_patch_document (JsonApiCustomApplicationSettingPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiCustomApplicationSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_custom_application_setting_patch_document'] = \ + json_api_custom_application_setting_patch_document + return self.patch_entity_custom_application_settings_endpoint.call_with_http_info(**kwargs) + + def search_entities_custom_application_settings( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_custom_application_settings(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiCustomApplicationSettingOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_custom_application_settings_endpoint.call_with_http_info(**kwargs) + + def update_entity_custom_application_settings( + self, + workspace_id, + object_id, + json_api_custom_application_setting_in_document, + **kwargs + ): + """Put a Custom Application Setting # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_custom_application_settings(workspace_id, object_id, json_api_custom_application_setting_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_custom_application_setting_in_document (JsonApiCustomApplicationSettingInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiCustomApplicationSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_custom_application_setting_in_document'] = \ + json_api_custom_application_setting_in_document + return self.update_entity_custom_application_settings_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/custom_geo_collection_controller_api.py b/gooddata-api-client/gooddata_api_client/api/custom_geo_collection_controller_api.py new file mode 100644 index 000000000..65abbddec --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/custom_geo_collection_controller_api.py @@ -0,0 +1,940 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.json_api_custom_geo_collection_in_document import JsonApiCustomGeoCollectionInDocument +from gooddata_api_client.model.json_api_custom_geo_collection_out_document import JsonApiCustomGeoCollectionOutDocument +from gooddata_api_client.model.json_api_custom_geo_collection_out_list import JsonApiCustomGeoCollectionOutList +from gooddata_api_client.model.json_api_custom_geo_collection_patch_document import JsonApiCustomGeoCollectionPatchDocument + + +class CustomGeoCollectionControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_custom_geo_collections_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiCustomGeoCollectionOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/customGeoCollections', + 'operation_id': 'create_entity_custom_geo_collections', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'json_api_custom_geo_collection_in_document', + ], + 'required': [ + 'json_api_custom_geo_collection_in_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'json_api_custom_geo_collection_in_document': + (JsonApiCustomGeoCollectionInDocument,), + }, + 'attribute_map': { + }, + 'location_map': { + 'json_api_custom_geo_collection_in_document': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_custom_geo_collections_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/customGeoCollections/{id}', + 'operation_id': 'delete_entity_custom_geo_collections', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'filter', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_custom_geo_collections_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiCustomGeoCollectionOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/customGeoCollections', + 'operation_id': 'get_all_entities_custom_geo_collections', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'filter', + 'page', + 'size', + 'sort', + 'meta_include', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('meta_include',): { + + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'filter': + (str,), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'filter': 'filter', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'filter': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_custom_geo_collections_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiCustomGeoCollectionOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/customGeoCollections/{id}', + 'operation_id': 'get_entity_custom_geo_collections', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'filter', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_custom_geo_collections_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiCustomGeoCollectionOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/customGeoCollections/{id}', + 'operation_id': 'patch_entity_custom_geo_collections', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_custom_geo_collection_patch_document', + 'filter', + ], + 'required': [ + 'id', + 'json_api_custom_geo_collection_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_custom_geo_collection_patch_document': + (JsonApiCustomGeoCollectionPatchDocument,), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'json_api_custom_geo_collection_patch_document': 'body', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.update_entity_custom_geo_collections_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiCustomGeoCollectionOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/customGeoCollections/{id}', + 'operation_id': 'update_entity_custom_geo_collections', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_custom_geo_collection_in_document', + 'filter', + ], + 'required': [ + 'id', + 'json_api_custom_geo_collection_in_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_custom_geo_collection_in_document': + (JsonApiCustomGeoCollectionInDocument,), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'json_api_custom_geo_collection_in_document': 'body', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_custom_geo_collections( + self, + json_api_custom_geo_collection_in_document, + **kwargs + ): + """Post Custom Geo Collections # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_custom_geo_collections(json_api_custom_geo_collection_in_document, async_req=True) + >>> result = thread.get() + + Args: + json_api_custom_geo_collection_in_document (JsonApiCustomGeoCollectionInDocument): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiCustomGeoCollectionOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['json_api_custom_geo_collection_in_document'] = \ + json_api_custom_geo_collection_in_document + return self.create_entity_custom_geo_collections_endpoint.call_with_http_info(**kwargs) + + def delete_entity_custom_geo_collections( + self, + id, + **kwargs + ): + """Delete Custom Geo Collection # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_custom_geo_collections(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.delete_entity_custom_geo_collections_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_custom_geo_collections( + self, + **kwargs + ): + """Get all Custom Geo Collections # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_custom_geo_collections(async_req=True) + >>> result = thread.get() + + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiCustomGeoCollectionOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.get_all_entities_custom_geo_collections_endpoint.call_with_http_info(**kwargs) + + def get_entity_custom_geo_collections( + self, + id, + **kwargs + ): + """Get Custom Geo Collection # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_custom_geo_collections(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiCustomGeoCollectionOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.get_entity_custom_geo_collections_endpoint.call_with_http_info(**kwargs) + + def patch_entity_custom_geo_collections( + self, + id, + json_api_custom_geo_collection_patch_document, + **kwargs + ): + """Patch Custom Geo Collection # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_custom_geo_collections(id, json_api_custom_geo_collection_patch_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_custom_geo_collection_patch_document (JsonApiCustomGeoCollectionPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiCustomGeoCollectionOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['json_api_custom_geo_collection_patch_document'] = \ + json_api_custom_geo_collection_patch_document + return self.patch_entity_custom_geo_collections_endpoint.call_with_http_info(**kwargs) + + def update_entity_custom_geo_collections( + self, + id, + json_api_custom_geo_collection_in_document, + **kwargs + ): + """Put Custom Geo Collection # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_custom_geo_collections(id, json_api_custom_geo_collection_in_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_custom_geo_collection_in_document (JsonApiCustomGeoCollectionInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiCustomGeoCollectionOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['json_api_custom_geo_collection_in_document'] = \ + json_api_custom_geo_collection_in_document + return self.update_entity_custom_geo_collections_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/dashboard_plugin_controller_api.py b/gooddata-api-client/gooddata_api_client/api/dashboard_plugin_controller_api.py new file mode 100644 index 000000000..1ea10bd41 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/dashboard_plugin_controller_api.py @@ -0,0 +1,1275 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_dashboard_plugin_in_document import JsonApiDashboardPluginInDocument +from gooddata_api_client.model.json_api_dashboard_plugin_out_document import JsonApiDashboardPluginOutDocument +from gooddata_api_client.model.json_api_dashboard_plugin_out_list import JsonApiDashboardPluginOutList +from gooddata_api_client.model.json_api_dashboard_plugin_patch_document import JsonApiDashboardPluginPatchDocument +from gooddata_api_client.model.json_api_dashboard_plugin_post_optional_id_document import JsonApiDashboardPluginPostOptionalIdDocument + + +class DashboardPluginControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_dashboard_plugins_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiDashboardPluginOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/dashboardPlugins', + 'operation_id': 'create_entity_dashboard_plugins', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_dashboard_plugin_post_optional_id_document', + 'include', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'json_api_dashboard_plugin_post_optional_id_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_dashboard_plugin_post_optional_id_document': + (JsonApiDashboardPluginPostOptionalIdDocument,), + 'include': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'include': 'include', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_dashboard_plugin_post_optional_id_document': 'body', + 'include': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_dashboard_plugins_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/dashboardPlugins/{objectId}', + 'operation_id': 'delete_entity_dashboard_plugins', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_dashboard_plugins_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiDashboardPluginOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/dashboardPlugins', + 'operation_id': 'get_all_entities_dashboard_plugins', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_dashboard_plugins_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiDashboardPluginOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/dashboardPlugins/{objectId}', + 'operation_id': 'get_entity_dashboard_plugins', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_dashboard_plugins_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiDashboardPluginOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/dashboardPlugins/{objectId}', + 'operation_id': 'patch_entity_dashboard_plugins', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_dashboard_plugin_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_dashboard_plugin_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_dashboard_plugin_patch_document': + (JsonApiDashboardPluginPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_dashboard_plugin_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_dashboard_plugins_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiDashboardPluginOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/dashboardPlugins/search', + 'operation_id': 'search_entities_dashboard_plugins', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_entity_dashboard_plugins_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiDashboardPluginOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/dashboardPlugins/{objectId}', + 'operation_id': 'update_entity_dashboard_plugins', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_dashboard_plugin_in_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_dashboard_plugin_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_dashboard_plugin_in_document': + (JsonApiDashboardPluginInDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_dashboard_plugin_in_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_dashboard_plugins( + self, + workspace_id, + json_api_dashboard_plugin_post_optional_id_document, + **kwargs + ): + """Post Plugins # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_dashboard_plugins(workspace_id, json_api_dashboard_plugin_post_optional_id_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_dashboard_plugin_post_optional_id_document (JsonApiDashboardPluginPostOptionalIdDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiDashboardPluginOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_dashboard_plugin_post_optional_id_document'] = \ + json_api_dashboard_plugin_post_optional_id_document + return self.create_entity_dashboard_plugins_endpoint.call_with_http_info(**kwargs) + + def delete_entity_dashboard_plugins( + self, + workspace_id, + object_id, + **kwargs + ): + """Delete a Plugin # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_dashboard_plugins(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.delete_entity_dashboard_plugins_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_dashboard_plugins( + self, + workspace_id, + **kwargs + ): + """Get all Plugins # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_dashboard_plugins(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiDashboardPluginOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_dashboard_plugins_endpoint.call_with_http_info(**kwargs) + + def get_entity_dashboard_plugins( + self, + workspace_id, + object_id, + **kwargs + ): + """Get a Plugin # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_dashboard_plugins(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiDashboardPluginOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_dashboard_plugins_endpoint.call_with_http_info(**kwargs) + + def patch_entity_dashboard_plugins( + self, + workspace_id, + object_id, + json_api_dashboard_plugin_patch_document, + **kwargs + ): + """Patch a Plugin # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_dashboard_plugins(workspace_id, object_id, json_api_dashboard_plugin_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_dashboard_plugin_patch_document (JsonApiDashboardPluginPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiDashboardPluginOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_dashboard_plugin_patch_document'] = \ + json_api_dashboard_plugin_patch_document + return self.patch_entity_dashboard_plugins_endpoint.call_with_http_info(**kwargs) + + def search_entities_dashboard_plugins( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_dashboard_plugins(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiDashboardPluginOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_dashboard_plugins_endpoint.call_with_http_info(**kwargs) + + def update_entity_dashboard_plugins( + self, + workspace_id, + object_id, + json_api_dashboard_plugin_in_document, + **kwargs + ): + """Put a Plugin # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_dashboard_plugins(workspace_id, object_id, json_api_dashboard_plugin_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_dashboard_plugin_in_document (JsonApiDashboardPluginInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiDashboardPluginOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_dashboard_plugin_in_document'] = \ + json_api_dashboard_plugin_in_document + return self.update_entity_dashboard_plugins_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/data_source_controller_api.py b/gooddata-api-client/gooddata_api_client/api/data_source_controller_api.py new file mode 100644 index 000000000..2bad124d5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/data_source_controller_api.py @@ -0,0 +1,983 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.json_api_data_source_in_document import JsonApiDataSourceInDocument +from gooddata_api_client.model.json_api_data_source_out_document import JsonApiDataSourceOutDocument +from gooddata_api_client.model.json_api_data_source_out_list import JsonApiDataSourceOutList +from gooddata_api_client.model.json_api_data_source_patch_document import JsonApiDataSourcePatchDocument + + +class DataSourceControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_data_sources_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiDataSourceOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/dataSources', + 'operation_id': 'create_entity_data_sources', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'json_api_data_source_in_document', + 'meta_include', + ], + 'required': [ + 'json_api_data_source_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('meta_include',): { + + "PERMISSIONS": "permissions", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'json_api_data_source_in_document': + (JsonApiDataSourceInDocument,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'json_api_data_source_in_document': 'body', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_data_sources_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/dataSources/{id}', + 'operation_id': 'delete_entity_data_sources', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'filter', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_data_sources_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiDataSourceOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/dataSources', + 'operation_id': 'get_all_entities_data_sources', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'filter', + 'page', + 'size', + 'sort', + 'meta_include', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('meta_include',): { + + "PERMISSIONS": "permissions", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'filter': + (str,), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'filter': 'filter', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'filter': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_data_sources_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiDataSourceOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/dataSources/{id}', + 'operation_id': 'get_entity_data_sources', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'filter', + 'meta_include', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + 'meta_include', + ], + 'validation': [ + 'id', + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('meta_include',): { + + "PERMISSIONS": "permissions", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'id': + (str,), + 'filter': + (str,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'id': 'path', + 'filter': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_data_sources_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiDataSourceOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/dataSources/{id}', + 'operation_id': 'patch_entity_data_sources', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_data_source_patch_document', + 'filter', + ], + 'required': [ + 'id', + 'json_api_data_source_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_data_source_patch_document': + (JsonApiDataSourcePatchDocument,), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'json_api_data_source_patch_document': 'body', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.update_entity_data_sources_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiDataSourceOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/dataSources/{id}', + 'operation_id': 'update_entity_data_sources', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_data_source_in_document', + 'filter', + ], + 'required': [ + 'id', + 'json_api_data_source_in_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_data_source_in_document': + (JsonApiDataSourceInDocument,), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'json_api_data_source_in_document': 'body', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_data_sources( + self, + json_api_data_source_in_document, + **kwargs + ): + """Post Data Sources # noqa: E501 + + Data Source - represents data source for the workspace # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_data_sources(json_api_data_source_in_document, async_req=True) + >>> result = thread.get() + + Args: + json_api_data_source_in_document (JsonApiDataSourceInDocument): + + Keyword Args: + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiDataSourceOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['json_api_data_source_in_document'] = \ + json_api_data_source_in_document + return self.create_entity_data_sources_endpoint.call_with_http_info(**kwargs) + + def delete_entity_data_sources( + self, + id, + **kwargs + ): + """Delete Data Source entity # noqa: E501 + + Data Source - represents data source for the workspace # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_data_sources(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.delete_entity_data_sources_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_data_sources( + self, + **kwargs + ): + """Get Data Source entities # noqa: E501 + + Data Source - represents data source for the workspace # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_data_sources(async_req=True) + >>> result = thread.get() + + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiDataSourceOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.get_all_entities_data_sources_endpoint.call_with_http_info(**kwargs) + + def get_entity_data_sources( + self, + id, + **kwargs + ): + """Get Data Source entity # noqa: E501 + + Data Source - represents data source for the workspace # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_data_sources(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiDataSourceOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.get_entity_data_sources_endpoint.call_with_http_info(**kwargs) + + def patch_entity_data_sources( + self, + id, + json_api_data_source_patch_document, + **kwargs + ): + """Patch Data Source entity # noqa: E501 + + Data Source - represents data source for the workspace # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_data_sources(id, json_api_data_source_patch_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_data_source_patch_document (JsonApiDataSourcePatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiDataSourceOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['json_api_data_source_patch_document'] = \ + json_api_data_source_patch_document + return self.patch_entity_data_sources_endpoint.call_with_http_info(**kwargs) + + def update_entity_data_sources( + self, + id, + json_api_data_source_in_document, + **kwargs + ): + """Put Data Source entity # noqa: E501 + + Data Source - represents data source for the workspace # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_data_sources(id, json_api_data_source_in_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_data_source_in_document (JsonApiDataSourceInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiDataSourceOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['json_api_data_source_in_document'] = \ + json_api_data_source_in_document + return self.update_entity_data_sources_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/data_source_files_analysis_api.py b/gooddata-api-client/gooddata_api_client/api/data_source_files_analysis_api.py new file mode 100644 index 000000000..e4a2affde --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/data_source_files_analysis_api.py @@ -0,0 +1,173 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.analyze_csv_request import AnalyzeCsvRequest +from gooddata_api_client.model.analyze_csv_response import AnalyzeCsvResponse + + +class DataSourceFilesAnalysisApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.analyze_csv_endpoint = _Endpoint( + settings={ + 'response_type': ([AnalyzeCsvResponse],), + 'auth': [], + 'endpoint_path': '/api/v1/actions/fileStorage/staging/analyzeCsv', + 'operation_id': 'analyze_csv', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'analyze_csv_request', + ], + 'required': [ + 'analyze_csv_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'analyze_csv_request': + (AnalyzeCsvRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'analyze_csv_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def analyze_csv( + self, + analyze_csv_request, + **kwargs + ): + """Analyze CSV # noqa: E501 + + Analyzes CSV files at the given locations # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.analyze_csv(analyze_csv_request, async_req=True) + >>> result = thread.get() + + Args: + analyze_csv_request (AnalyzeCsvRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [AnalyzeCsvResponse] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['analyze_csv_request'] = \ + analyze_csv_request + return self.analyze_csv_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/data_source_files_deletion_api.py b/gooddata-api-client/gooddata_api_client/api/data_source_files_deletion_api.py new file mode 100644 index 000000000..539388fa9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/data_source_files_deletion_api.py @@ -0,0 +1,180 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.delete_files_request import DeleteFilesRequest + + +class DataSourceFilesDeletionApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.delete_files_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/actions/fileStorage/dataSources/{dataSourceId}/deleteFiles', + 'operation_id': 'delete_files', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'data_source_id', + 'delete_files_request', + ], + 'required': [ + 'data_source_id', + 'delete_files_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'data_source_id': + (str,), + 'delete_files_request': + (DeleteFilesRequest,), + }, + 'attribute_map': { + 'data_source_id': 'dataSourceId', + }, + 'location_map': { + 'data_source_id': 'path', + 'delete_files_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def delete_files( + self, + data_source_id, + delete_files_request, + **kwargs + ): + """Delete datasource files # noqa: E501 + + Delete the files in the given data source. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_files(data_source_id, delete_files_request, async_req=True) + >>> result = thread.get() + + Args: + data_source_id (str): + delete_files_request (DeleteFilesRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['data_source_id'] = \ + data_source_id + kwargs['delete_files_request'] = \ + delete_files_request + return self.delete_files_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/data_source_files_import_api.py b/gooddata-api-client/gooddata_api_client/api/data_source_files_import_api.py new file mode 100644 index 000000000..46395edf0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/data_source_files_import_api.py @@ -0,0 +1,183 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.import_csv_request import ImportCsvRequest +from gooddata_api_client.model.import_csv_response import ImportCsvResponse + + +class DataSourceFilesImportApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.import_csv_endpoint = _Endpoint( + settings={ + 'response_type': ([ImportCsvResponse],), + 'auth': [], + 'endpoint_path': '/api/v1/actions/fileStorage/dataSources/{dataSourceId}/importCsv', + 'operation_id': 'import_csv', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'data_source_id', + 'import_csv_request', + ], + 'required': [ + 'data_source_id', + 'import_csv_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'data_source_id': + (str,), + 'import_csv_request': + (ImportCsvRequest,), + }, + 'attribute_map': { + 'data_source_id': 'dataSourceId', + }, + 'location_map': { + 'data_source_id': 'path', + 'import_csv_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def import_csv( + self, + data_source_id, + import_csv_request, + **kwargs + ): + """Import CSV # noqa: E501 + + Import the CSV files at the given locations in the staging area to the final location. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.import_csv(data_source_id, import_csv_request, async_req=True) + >>> result = thread.get() + + Args: + data_source_id (str): + import_csv_request (ImportCsvRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ImportCsvResponse] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['data_source_id'] = \ + data_source_id + kwargs['import_csv_request'] = \ + import_csv_request + return self.import_csv_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/data_source_files_listing_api.py b/gooddata-api-client/gooddata_api_client/api/data_source_files_listing_api.py new file mode 100644 index 000000000..b67bd3d53 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/data_source_files_listing_api.py @@ -0,0 +1,171 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.gd_storage_file import GdStorageFile + + +class DataSourceFilesListingApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.list_files_endpoint = _Endpoint( + settings={ + 'response_type': ([GdStorageFile],), + 'auth': [], + 'endpoint_path': '/api/v1/actions/fileStorage/dataSources/{dataSourceId}/listFiles', + 'operation_id': 'list_files', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'data_source_id', + ], + 'required': [ + 'data_source_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'data_source_id': + (str,), + }, + 'attribute_map': { + 'data_source_id': 'dataSourceId', + }, + 'location_map': { + 'data_source_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def list_files( + self, + data_source_id, + **kwargs + ): + """List datasource files # noqa: E501 + + List all the files in the given data source. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_files(data_source_id, async_req=True) + >>> result = thread.get() + + Args: + data_source_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [GdStorageFile] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['data_source_id'] = \ + data_source_id + return self.list_files_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/data_source_files_manifest_read_api.py b/gooddata-api-client/gooddata_api_client/api/data_source_files_manifest_read_api.py new file mode 100644 index 000000000..2f9261a24 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/data_source_files_manifest_read_api.py @@ -0,0 +1,183 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.read_csv_file_manifests_request import ReadCsvFileManifestsRequest +from gooddata_api_client.model.read_csv_file_manifests_response import ReadCsvFileManifestsResponse + + +class DataSourceFilesManifestReadApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.read_csv_file_manifests_endpoint = _Endpoint( + settings={ + 'response_type': ([ReadCsvFileManifestsResponse],), + 'auth': [], + 'endpoint_path': '/api/v1/actions/fileStorage/dataSources/{dataSourceId}/readCsvFileManifests', + 'operation_id': 'read_csv_file_manifests', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'data_source_id', + 'read_csv_file_manifests_request', + ], + 'required': [ + 'data_source_id', + 'read_csv_file_manifests_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'data_source_id': + (str,), + 'read_csv_file_manifests_request': + (ReadCsvFileManifestsRequest,), + }, + 'attribute_map': { + 'data_source_id': 'dataSourceId', + }, + 'location_map': { + 'data_source_id': 'path', + 'read_csv_file_manifests_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def read_csv_file_manifests( + self, + data_source_id, + read_csv_file_manifests_request, + **kwargs + ): + """Read CSV file manifests # noqa: E501 + + Read the manifests of the CSV files in the given data source. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_csv_file_manifests(data_source_id, read_csv_file_manifests_request, async_req=True) + >>> result = thread.get() + + Args: + data_source_id (str): + read_csv_file_manifests_request (ReadCsvFileManifestsRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ReadCsvFileManifestsResponse] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['data_source_id'] = \ + data_source_id + kwargs['read_csv_file_manifests_request'] = \ + read_csv_file_manifests_request + return self.read_csv_file_manifests_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/data_source_staging_location_api.py b/gooddata-api-client/gooddata_api_client/api/data_source_staging_location_api.py new file mode 100644 index 000000000..e0739b27f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/data_source_staging_location_api.py @@ -0,0 +1,173 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.upload_file_response import UploadFileResponse + + +class DataSourceStagingLocationApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.staging_upload_endpoint = _Endpoint( + settings={ + 'response_type': (UploadFileResponse,), + 'auth': [], + 'endpoint_path': '/api/v1/actions/fileStorage/staging/upload', + 'operation_id': 'staging_upload', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'file', + ], + 'required': [ + 'file', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'file': + (file_type,), + }, + 'attribute_map': { + 'file': 'file', + }, + 'location_map': { + 'file': 'form', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'multipart/form-data' + ] + }, + api_client=api_client + ) + + def staging_upload( + self, + file, + **kwargs + ): + """Upload a file to the staging area # noqa: E501 + + Provides a location for uploading staging files. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.staging_upload(file, async_req=True) + >>> result = thread.get() + + Args: + file (file_type): The file to upload. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + UploadFileResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['file'] = \ + file + return self.staging_upload_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/dataset_controller_api.py b/gooddata-api-client/gooddata_api_client/api/dataset_controller_api.py new file mode 100644 index 000000000..58adf7926 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/dataset_controller_api.py @@ -0,0 +1,785 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_dataset_out_document import JsonApiDatasetOutDocument +from gooddata_api_client.model.json_api_dataset_out_list import JsonApiDatasetOutList +from gooddata_api_client.model.json_api_dataset_patch_document import JsonApiDatasetPatchDocument + + +class DatasetControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_all_entities_datasets_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiDatasetOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/datasets', + 'operation_id': 'get_all_entities_datasets', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "ATTRIBUTES": "attributes", + "FACTS": "facts", + "AGGREGATEDFACTS": "aggregatedFacts", + "DATASETS": "datasets", + "WORKSPACEDATAFILTERS": "workspaceDataFilters", + "REFERENCES": "references", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_datasets_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiDatasetOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/datasets/{objectId}', + 'operation_id': 'get_entity_datasets', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "FACTS": "facts", + "AGGREGATEDFACTS": "aggregatedFacts", + "DATASETS": "datasets", + "WORKSPACEDATAFILTERS": "workspaceDataFilters", + "REFERENCES": "references", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_datasets_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiDatasetOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/datasets/{objectId}', + 'operation_id': 'patch_entity_datasets', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_dataset_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_dataset_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "FACTS": "facts", + "AGGREGATEDFACTS": "aggregatedFacts", + "DATASETS": "datasets", + "WORKSPACEDATAFILTERS": "workspaceDataFilters", + "REFERENCES": "references", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_dataset_patch_document': + (JsonApiDatasetPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_dataset_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_datasets_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiDatasetOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/datasets/search', + 'operation_id': 'search_entities_datasets', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def get_all_entities_datasets( + self, + workspace_id, + **kwargs + ): + """Get all Datasets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_datasets(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiDatasetOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_datasets_endpoint.call_with_http_info(**kwargs) + + def get_entity_datasets( + self, + workspace_id, + object_id, + **kwargs + ): + """Get a Dataset # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_datasets(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiDatasetOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_datasets_endpoint.call_with_http_info(**kwargs) + + def patch_entity_datasets( + self, + workspace_id, + object_id, + json_api_dataset_patch_document, + **kwargs + ): + """Patch a Dataset (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_datasets(workspace_id, object_id, json_api_dataset_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_dataset_patch_document (JsonApiDatasetPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiDatasetOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_dataset_patch_document'] = \ + json_api_dataset_patch_document + return self.patch_entity_datasets_endpoint.call_with_http_info(**kwargs) + + def search_entities_datasets( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_datasets(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiDatasetOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_datasets_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/export_definition_controller_api.py b/gooddata-api-client/gooddata_api_client/api/export_definition_controller_api.py new file mode 100644 index 000000000..5c98c9104 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/export_definition_controller_api.py @@ -0,0 +1,1305 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_export_definition_in_document import JsonApiExportDefinitionInDocument +from gooddata_api_client.model.json_api_export_definition_out_document import JsonApiExportDefinitionOutDocument +from gooddata_api_client.model.json_api_export_definition_out_list import JsonApiExportDefinitionOutList +from gooddata_api_client.model.json_api_export_definition_patch_document import JsonApiExportDefinitionPatchDocument +from gooddata_api_client.model.json_api_export_definition_post_optional_id_document import JsonApiExportDefinitionPostOptionalIdDocument + + +class ExportDefinitionControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_export_definitions_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiExportDefinitionOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/exportDefinitions', + 'operation_id': 'create_entity_export_definitions', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_export_definition_post_optional_id_document', + 'include', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'json_api_export_definition_post_optional_id_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "VISUALIZATIONOBJECTS": "visualizationObjects", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "AUTOMATIONS": "automations", + "USERIDENTIFIERS": "userIdentifiers", + "VISUALIZATIONOBJECT": "visualizationObject", + "ANALYTICALDASHBOARD": "analyticalDashboard", + "AUTOMATION": "automation", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_export_definition_post_optional_id_document': + (JsonApiExportDefinitionPostOptionalIdDocument,), + 'include': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'include': 'include', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_export_definition_post_optional_id_document': 'body', + 'include': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_export_definitions_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/exportDefinitions/{objectId}', + 'operation_id': 'delete_entity_export_definitions', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_export_definitions_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiExportDefinitionOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/exportDefinitions', + 'operation_id': 'get_all_entities_export_definitions', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "VISUALIZATIONOBJECTS": "visualizationObjects", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "AUTOMATIONS": "automations", + "USERIDENTIFIERS": "userIdentifiers", + "VISUALIZATIONOBJECT": "visualizationObject", + "ANALYTICALDASHBOARD": "analyticalDashboard", + "AUTOMATION": "automation", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_export_definitions_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiExportDefinitionOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/exportDefinitions/{objectId}', + 'operation_id': 'get_entity_export_definitions', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "VISUALIZATIONOBJECTS": "visualizationObjects", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "AUTOMATIONS": "automations", + "USERIDENTIFIERS": "userIdentifiers", + "VISUALIZATIONOBJECT": "visualizationObject", + "ANALYTICALDASHBOARD": "analyticalDashboard", + "AUTOMATION": "automation", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_export_definitions_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiExportDefinitionOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/exportDefinitions/{objectId}', + 'operation_id': 'patch_entity_export_definitions', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_export_definition_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_export_definition_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "VISUALIZATIONOBJECTS": "visualizationObjects", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "AUTOMATIONS": "automations", + "USERIDENTIFIERS": "userIdentifiers", + "VISUALIZATIONOBJECT": "visualizationObject", + "ANALYTICALDASHBOARD": "analyticalDashboard", + "AUTOMATION": "automation", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_export_definition_patch_document': + (JsonApiExportDefinitionPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_export_definition_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_export_definitions_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiExportDefinitionOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/exportDefinitions/search', + 'operation_id': 'search_entities_export_definitions', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_entity_export_definitions_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiExportDefinitionOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/exportDefinitions/{objectId}', + 'operation_id': 'update_entity_export_definitions', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_export_definition_in_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_export_definition_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "VISUALIZATIONOBJECTS": "visualizationObjects", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "AUTOMATIONS": "automations", + "USERIDENTIFIERS": "userIdentifiers", + "VISUALIZATIONOBJECT": "visualizationObject", + "ANALYTICALDASHBOARD": "analyticalDashboard", + "AUTOMATION": "automation", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_export_definition_in_document': + (JsonApiExportDefinitionInDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_export_definition_in_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_export_definitions( + self, + workspace_id, + json_api_export_definition_post_optional_id_document, + **kwargs + ): + """Post Export Definitions # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_export_definitions(workspace_id, json_api_export_definition_post_optional_id_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_export_definition_post_optional_id_document (JsonApiExportDefinitionPostOptionalIdDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiExportDefinitionOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_export_definition_post_optional_id_document'] = \ + json_api_export_definition_post_optional_id_document + return self.create_entity_export_definitions_endpoint.call_with_http_info(**kwargs) + + def delete_entity_export_definitions( + self, + workspace_id, + object_id, + **kwargs + ): + """Delete an Export Definition # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_export_definitions(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.delete_entity_export_definitions_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_export_definitions( + self, + workspace_id, + **kwargs + ): + """Get all Export Definitions # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_export_definitions(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiExportDefinitionOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_export_definitions_endpoint.call_with_http_info(**kwargs) + + def get_entity_export_definitions( + self, + workspace_id, + object_id, + **kwargs + ): + """Get an Export Definition # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_export_definitions(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiExportDefinitionOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_export_definitions_endpoint.call_with_http_info(**kwargs) + + def patch_entity_export_definitions( + self, + workspace_id, + object_id, + json_api_export_definition_patch_document, + **kwargs + ): + """Patch an Export Definition # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_export_definitions(workspace_id, object_id, json_api_export_definition_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_export_definition_patch_document (JsonApiExportDefinitionPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiExportDefinitionOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_export_definition_patch_document'] = \ + json_api_export_definition_patch_document + return self.patch_entity_export_definitions_endpoint.call_with_http_info(**kwargs) + + def search_entities_export_definitions( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_export_definitions(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiExportDefinitionOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_export_definitions_endpoint.call_with_http_info(**kwargs) + + def update_entity_export_definitions( + self, + workspace_id, + object_id, + json_api_export_definition_in_document, + **kwargs + ): + """Put an Export Definition # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_export_definitions(workspace_id, object_id, json_api_export_definition_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_export_definition_in_document (JsonApiExportDefinitionInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiExportDefinitionOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_export_definition_in_document'] = \ + json_api_export_definition_in_document + return self.update_entity_export_definitions_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/fact_controller_api.py b/gooddata-api-client/gooddata_api_client/api/fact_controller_api.py new file mode 100644 index 000000000..0e14c5536 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/fact_controller_api.py @@ -0,0 +1,773 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_fact_out_document import JsonApiFactOutDocument +from gooddata_api_client.model.json_api_fact_out_list import JsonApiFactOutList +from gooddata_api_client.model.json_api_fact_patch_document import JsonApiFactPatchDocument + + +class FactControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_all_entities_facts_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFactOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/facts', + 'operation_id': 'get_all_entities_facts', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "DATASETS": "datasets", + "DATASET": "dataset", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_facts_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFactOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/facts/{objectId}', + 'operation_id': 'get_entity_facts', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "DATASETS": "datasets", + "DATASET": "dataset", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_facts_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFactOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/facts/{objectId}', + 'operation_id': 'patch_entity_facts', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_fact_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_fact_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "DATASETS": "datasets", + "DATASET": "dataset", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_fact_patch_document': + (JsonApiFactPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_fact_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_facts_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFactOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/facts/search', + 'operation_id': 'search_entities_facts', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def get_all_entities_facts( + self, + workspace_id, + **kwargs + ): + """Get all Facts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_facts(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFactOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_facts_endpoint.call_with_http_info(**kwargs) + + def get_entity_facts( + self, + workspace_id, + object_id, + **kwargs + ): + """Get a Fact # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_facts(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFactOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_facts_endpoint.call_with_http_info(**kwargs) + + def patch_entity_facts( + self, + workspace_id, + object_id, + json_api_fact_patch_document, + **kwargs + ): + """Patch a Fact (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_facts(workspace_id, object_id, json_api_fact_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_fact_patch_document (JsonApiFactPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFactOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_fact_patch_document'] = \ + json_api_fact_patch_document + return self.patch_entity_facts_endpoint.call_with_http_info(**kwargs) + + def search_entities_facts( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_facts(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFactOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_facts_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/filter_context_controller_api.py b/gooddata-api-client/gooddata_api_client/api/filter_context_controller_api.py new file mode 100644 index 000000000..55f32dbcb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/filter_context_controller_api.py @@ -0,0 +1,1275 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_filter_context_in_document import JsonApiFilterContextInDocument +from gooddata_api_client.model.json_api_filter_context_out_document import JsonApiFilterContextOutDocument +from gooddata_api_client.model.json_api_filter_context_out_list import JsonApiFilterContextOutList +from gooddata_api_client.model.json_api_filter_context_patch_document import JsonApiFilterContextPatchDocument +from gooddata_api_client.model.json_api_filter_context_post_optional_id_document import JsonApiFilterContextPostOptionalIdDocument + + +class FilterContextControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_filter_contexts_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFilterContextOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/filterContexts', + 'operation_id': 'create_entity_filter_contexts', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_filter_context_post_optional_id_document', + 'include', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'json_api_filter_context_post_optional_id_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "DATASETS": "datasets", + "LABELS": "labels", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_filter_context_post_optional_id_document': + (JsonApiFilterContextPostOptionalIdDocument,), + 'include': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'include': 'include', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_filter_context_post_optional_id_document': 'body', + 'include': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_filter_contexts_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/filterContexts/{objectId}', + 'operation_id': 'delete_entity_filter_contexts', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_filter_contexts_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFilterContextOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/filterContexts', + 'operation_id': 'get_all_entities_filter_contexts', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "ATTRIBUTES": "attributes", + "DATASETS": "datasets", + "LABELS": "labels", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_filter_contexts_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFilterContextOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/filterContexts/{objectId}', + 'operation_id': 'get_entity_filter_contexts', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "DATASETS": "datasets", + "LABELS": "labels", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_filter_contexts_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFilterContextOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/filterContexts/{objectId}', + 'operation_id': 'patch_entity_filter_contexts', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_filter_context_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_filter_context_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "DATASETS": "datasets", + "LABELS": "labels", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_filter_context_patch_document': + (JsonApiFilterContextPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_filter_context_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_filter_contexts_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFilterContextOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/filterContexts/search', + 'operation_id': 'search_entities_filter_contexts', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_entity_filter_contexts_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFilterContextOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/filterContexts/{objectId}', + 'operation_id': 'update_entity_filter_contexts', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_filter_context_in_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_filter_context_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "DATASETS": "datasets", + "LABELS": "labels", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_filter_context_in_document': + (JsonApiFilterContextInDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_filter_context_in_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_filter_contexts( + self, + workspace_id, + json_api_filter_context_post_optional_id_document, + **kwargs + ): + """Post Filter Context # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_filter_contexts(workspace_id, json_api_filter_context_post_optional_id_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_filter_context_post_optional_id_document (JsonApiFilterContextPostOptionalIdDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterContextOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_filter_context_post_optional_id_document'] = \ + json_api_filter_context_post_optional_id_document + return self.create_entity_filter_contexts_endpoint.call_with_http_info(**kwargs) + + def delete_entity_filter_contexts( + self, + workspace_id, + object_id, + **kwargs + ): + """Delete a Filter Context # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_filter_contexts(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.delete_entity_filter_contexts_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_filter_contexts( + self, + workspace_id, + **kwargs + ): + """Get all Filter Context # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_filter_contexts(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterContextOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_filter_contexts_endpoint.call_with_http_info(**kwargs) + + def get_entity_filter_contexts( + self, + workspace_id, + object_id, + **kwargs + ): + """Get a Filter Context # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_filter_contexts(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterContextOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_filter_contexts_endpoint.call_with_http_info(**kwargs) + + def patch_entity_filter_contexts( + self, + workspace_id, + object_id, + json_api_filter_context_patch_document, + **kwargs + ): + """Patch a Filter Context # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_filter_contexts(workspace_id, object_id, json_api_filter_context_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_filter_context_patch_document (JsonApiFilterContextPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterContextOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_filter_context_patch_document'] = \ + json_api_filter_context_patch_document + return self.patch_entity_filter_contexts_endpoint.call_with_http_info(**kwargs) + + def search_entities_filter_contexts( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_filter_contexts(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterContextOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_filter_contexts_endpoint.call_with_http_info(**kwargs) + + def update_entity_filter_contexts( + self, + workspace_id, + object_id, + json_api_filter_context_in_document, + **kwargs + ): + """Put a Filter Context # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_filter_contexts(workspace_id, object_id, json_api_filter_context_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_filter_context_in_document (JsonApiFilterContextInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterContextOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_filter_context_in_document'] = \ + json_api_filter_context_in_document + return self.update_entity_filter_contexts_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/filter_view_controller_api.py b/gooddata-api-client/gooddata_api_client/api/filter_view_controller_api.py new file mode 100644 index 000000000..24085476e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/filter_view_controller_api.py @@ -0,0 +1,1242 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_filter_view_in_document import JsonApiFilterViewInDocument +from gooddata_api_client.model.json_api_filter_view_out_document import JsonApiFilterViewOutDocument +from gooddata_api_client.model.json_api_filter_view_out_list import JsonApiFilterViewOutList +from gooddata_api_client.model.json_api_filter_view_patch_document import JsonApiFilterViewPatchDocument + + +class FilterViewControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_filter_views_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFilterViewOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/filterViews', + 'operation_id': 'create_entity_filter_views', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_filter_view_in_document', + 'include', + ], + 'required': [ + 'workspace_id', + 'json_api_filter_view_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "USERS": "users", + "ANALYTICALDASHBOARD": "analyticalDashboard", + "USER": "user", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_filter_view_in_document': + (JsonApiFilterViewInDocument,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_filter_view_in_document': 'body', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_filter_views_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/filterViews/{objectId}', + 'operation_id': 'delete_entity_filter_views', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_filter_views_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFilterViewOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/filterViews', + 'operation_id': 'get_all_entities_filter_views', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "USERS": "users", + "ANALYTICALDASHBOARD": "analyticalDashboard", + "USER": "user", + "ALL": "ALL" + }, + ('meta_include',): { + + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_filter_views_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFilterViewOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/filterViews/{objectId}', + 'operation_id': 'get_entity_filter_views', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "USERS": "users", + "ANALYTICALDASHBOARD": "analyticalDashboard", + "USER": "user", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_filter_views_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFilterViewOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/filterViews/{objectId}', + 'operation_id': 'patch_entity_filter_views', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_filter_view_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_filter_view_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "USERS": "users", + "ANALYTICALDASHBOARD": "analyticalDashboard", + "USER": "user", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_filter_view_patch_document': + (JsonApiFilterViewPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_filter_view_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_filter_views_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFilterViewOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/filterViews/search', + 'operation_id': 'search_entities_filter_views', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_entity_filter_views_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiFilterViewOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/filterViews/{objectId}', + 'operation_id': 'update_entity_filter_views', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_filter_view_in_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_filter_view_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "USERS": "users", + "ANALYTICALDASHBOARD": "analyticalDashboard", + "USER": "user", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_filter_view_in_document': + (JsonApiFilterViewInDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_filter_view_in_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_filter_views( + self, + workspace_id, + json_api_filter_view_in_document, + **kwargs + ): + """Post Filter views # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_filter_views(workspace_id, json_api_filter_view_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_filter_view_in_document (JsonApiFilterViewInDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterViewOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_filter_view_in_document'] = \ + json_api_filter_view_in_document + return self.create_entity_filter_views_endpoint.call_with_http_info(**kwargs) + + def delete_entity_filter_views( + self, + workspace_id, + object_id, + **kwargs + ): + """Delete Filter view # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_filter_views(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.delete_entity_filter_views_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_filter_views( + self, + workspace_id, + **kwargs + ): + """Get all Filter views # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_filter_views(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterViewOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_filter_views_endpoint.call_with_http_info(**kwargs) + + def get_entity_filter_views( + self, + workspace_id, + object_id, + **kwargs + ): + """Get Filter view # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_filter_views(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterViewOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_filter_views_endpoint.call_with_http_info(**kwargs) + + def patch_entity_filter_views( + self, + workspace_id, + object_id, + json_api_filter_view_patch_document, + **kwargs + ): + """Patch Filter view # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_filter_views(workspace_id, object_id, json_api_filter_view_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_filter_view_patch_document (JsonApiFilterViewPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterViewOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_filter_view_patch_document'] = \ + json_api_filter_view_patch_document + return self.patch_entity_filter_views_endpoint.call_with_http_info(**kwargs) + + def search_entities_filter_views( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_filter_views(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterViewOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_filter_views_endpoint.call_with_http_info(**kwargs) + + def update_entity_filter_views( + self, + workspace_id, + object_id, + json_api_filter_view_in_document, + **kwargs + ): + """Put Filter views # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_filter_views(workspace_id, object_id, json_api_filter_view_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_filter_view_in_document (JsonApiFilterViewInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterViewOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_filter_view_in_document'] = \ + json_api_filter_view_in_document + return self.update_entity_filter_views_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/jwk_controller_api.py b/gooddata-api-client/gooddata_api_client/api/jwk_controller_api.py new file mode 100644 index 000000000..6fcbfc9cd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/jwk_controller_api.py @@ -0,0 +1,946 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.json_api_jwk_in_document import JsonApiJwkInDocument +from gooddata_api_client.model.json_api_jwk_out_document import JsonApiJwkOutDocument +from gooddata_api_client.model.json_api_jwk_out_list import JsonApiJwkOutList +from gooddata_api_client.model.json_api_jwk_patch_document import JsonApiJwkPatchDocument + + +class JwkControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_jwks_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiJwkOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/jwks', + 'operation_id': 'create_entity_jwks', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'json_api_jwk_in_document', + ], + 'required': [ + 'json_api_jwk_in_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'json_api_jwk_in_document': + (JsonApiJwkInDocument,), + }, + 'attribute_map': { + }, + 'location_map': { + 'json_api_jwk_in_document': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_jwks_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/jwks/{id}', + 'operation_id': 'delete_entity_jwks', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'filter', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_jwks_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiJwkOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/jwks', + 'operation_id': 'get_all_entities_jwks', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'filter', + 'page', + 'size', + 'sort', + 'meta_include', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('meta_include',): { + + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'filter': + (str,), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'filter': 'filter', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'filter': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_jwks_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiJwkOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/jwks/{id}', + 'operation_id': 'get_entity_jwks', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'filter', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_jwks_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiJwkOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/jwks/{id}', + 'operation_id': 'patch_entity_jwks', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_jwk_patch_document', + 'filter', + ], + 'required': [ + 'id', + 'json_api_jwk_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_jwk_patch_document': + (JsonApiJwkPatchDocument,), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'json_api_jwk_patch_document': 'body', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.update_entity_jwks_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiJwkOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/jwks/{id}', + 'operation_id': 'update_entity_jwks', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_jwk_in_document', + 'filter', + ], + 'required': [ + 'id', + 'json_api_jwk_in_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_jwk_in_document': + (JsonApiJwkInDocument,), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'json_api_jwk_in_document': 'body', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_jwks( + self, + json_api_jwk_in_document, + **kwargs + ): + """Post Jwks # noqa: E501 + + Creates JSON web key - used to verify JSON web tokens (Jwts) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_jwks(json_api_jwk_in_document, async_req=True) + >>> result = thread.get() + + Args: + json_api_jwk_in_document (JsonApiJwkInDocument): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiJwkOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['json_api_jwk_in_document'] = \ + json_api_jwk_in_document + return self.create_entity_jwks_endpoint.call_with_http_info(**kwargs) + + def delete_entity_jwks( + self, + id, + **kwargs + ): + """Delete Jwk # noqa: E501 + + Deletes JSON web key - used to verify JSON web tokens (Jwts) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_jwks(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.delete_entity_jwks_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_jwks( + self, + **kwargs + ): + """Get all Jwks # noqa: E501 + + Returns all JSON web keys - used to verify JSON web tokens (Jwts) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_jwks(async_req=True) + >>> result = thread.get() + + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiJwkOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.get_all_entities_jwks_endpoint.call_with_http_info(**kwargs) + + def get_entity_jwks( + self, + id, + **kwargs + ): + """Get Jwk # noqa: E501 + + Returns JSON web key - used to verify JSON web tokens (Jwts) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_jwks(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiJwkOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.get_entity_jwks_endpoint.call_with_http_info(**kwargs) + + def patch_entity_jwks( + self, + id, + json_api_jwk_patch_document, + **kwargs + ): + """Patch Jwk # noqa: E501 + + Patches JSON web key - used to verify JSON web tokens (Jwts) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_jwks(id, json_api_jwk_patch_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_jwk_patch_document (JsonApiJwkPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiJwkOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['json_api_jwk_patch_document'] = \ + json_api_jwk_patch_document + return self.patch_entity_jwks_endpoint.call_with_http_info(**kwargs) + + def update_entity_jwks( + self, + id, + json_api_jwk_in_document, + **kwargs + ): + """Put Jwk # noqa: E501 + + Updates JSON web key - used to verify JSON web tokens (Jwts) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_jwks(id, json_api_jwk_in_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_jwk_in_document (JsonApiJwkInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiJwkOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['json_api_jwk_in_document'] = \ + json_api_jwk_in_document + return self.update_entity_jwks_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/label_controller_api.py b/gooddata-api-client/gooddata_api_client/api/label_controller_api.py new file mode 100644 index 000000000..d17e69a18 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/label_controller_api.py @@ -0,0 +1,773 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_label_out_document import JsonApiLabelOutDocument +from gooddata_api_client.model.json_api_label_out_list import JsonApiLabelOutList +from gooddata_api_client.model.json_api_label_patch_document import JsonApiLabelPatchDocument + + +class LabelControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_all_entities_labels_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiLabelOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/labels', + 'operation_id': 'get_all_entities_labels', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "ATTRIBUTES": "attributes", + "ATTRIBUTE": "attribute", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_labels_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiLabelOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/labels/{objectId}', + 'operation_id': 'get_entity_labels', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "ATTRIBUTE": "attribute", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_labels_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiLabelOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/labels/{objectId}', + 'operation_id': 'patch_entity_labels', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_label_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_label_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "ATTRIBUTE": "attribute", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_label_patch_document': + (JsonApiLabelPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_label_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_labels_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiLabelOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/labels/search', + 'operation_id': 'search_entities_labels', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def get_all_entities_labels( + self, + workspace_id, + **kwargs + ): + """Get all Labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_labels(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiLabelOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_labels_endpoint.call_with_http_info(**kwargs) + + def get_entity_labels( + self, + workspace_id, + object_id, + **kwargs + ): + """Get a Label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_labels(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiLabelOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_labels_endpoint.call_with_http_info(**kwargs) + + def patch_entity_labels( + self, + workspace_id, + object_id, + json_api_label_patch_document, + **kwargs + ): + """Patch a Label (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_labels(workspace_id, object_id, json_api_label_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_label_patch_document (JsonApiLabelPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiLabelOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_label_patch_document'] = \ + json_api_label_patch_document + return self.patch_entity_labels_endpoint.call_with_http_info(**kwargs) + + def search_entities_labels( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_labels(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiLabelOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_labels_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/metric_controller_api.py b/gooddata-api-client/gooddata_api_client/api/metric_controller_api.py new file mode 100644 index 000000000..f728d69d5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/metric_controller_api.py @@ -0,0 +1,1305 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_metric_in_document import JsonApiMetricInDocument +from gooddata_api_client.model.json_api_metric_out_document import JsonApiMetricOutDocument +from gooddata_api_client.model.json_api_metric_out_list import JsonApiMetricOutList +from gooddata_api_client.model.json_api_metric_patch_document import JsonApiMetricPatchDocument +from gooddata_api_client.model.json_api_metric_post_optional_id_document import JsonApiMetricPostOptionalIdDocument + + +class MetricControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_metrics_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiMetricOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/metrics', + 'operation_id': 'create_entity_metrics', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_metric_post_optional_id_document', + 'include', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'json_api_metric_post_optional_id_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "CERTIFIEDBY": "certifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_metric_post_optional_id_document': + (JsonApiMetricPostOptionalIdDocument,), + 'include': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'include': 'include', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_metric_post_optional_id_document': 'body', + 'include': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_metrics_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/metrics/{objectId}', + 'operation_id': 'delete_entity_metrics', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_metrics_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiMetricOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/metrics', + 'operation_id': 'get_all_entities_metrics', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "CERTIFIEDBY": "certifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_metrics_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiMetricOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/metrics/{objectId}', + 'operation_id': 'get_entity_metrics', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "CERTIFIEDBY": "certifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_metrics_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiMetricOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/metrics/{objectId}', + 'operation_id': 'patch_entity_metrics', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_metric_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_metric_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "CERTIFIEDBY": "certifiedBy", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_metric_patch_document': + (JsonApiMetricPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_metric_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_metrics_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiMetricOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/metrics/search', + 'operation_id': 'search_entities_metrics', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_entity_metrics_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiMetricOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/metrics/{objectId}', + 'operation_id': 'update_entity_metrics', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_metric_in_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_metric_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "CERTIFIEDBY": "certifiedBy", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_metric_in_document': + (JsonApiMetricInDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_metric_in_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_metrics( + self, + workspace_id, + json_api_metric_post_optional_id_document, + **kwargs + ): + """Post Metrics # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_metrics(workspace_id, json_api_metric_post_optional_id_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_metric_post_optional_id_document (JsonApiMetricPostOptionalIdDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiMetricOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_metric_post_optional_id_document'] = \ + json_api_metric_post_optional_id_document + return self.create_entity_metrics_endpoint.call_with_http_info(**kwargs) + + def delete_entity_metrics( + self, + workspace_id, + object_id, + **kwargs + ): + """Delete a Metric # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_metrics(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.delete_entity_metrics_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_metrics( + self, + workspace_id, + **kwargs + ): + """Get all Metrics # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_metrics(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiMetricOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_metrics_endpoint.call_with_http_info(**kwargs) + + def get_entity_metrics( + self, + workspace_id, + object_id, + **kwargs + ): + """Get a Metric # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_metrics(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiMetricOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_metrics_endpoint.call_with_http_info(**kwargs) + + def patch_entity_metrics( + self, + workspace_id, + object_id, + json_api_metric_patch_document, + **kwargs + ): + """Patch a Metric # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_metrics(workspace_id, object_id, json_api_metric_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_metric_patch_document (JsonApiMetricPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiMetricOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_metric_patch_document'] = \ + json_api_metric_patch_document + return self.patch_entity_metrics_endpoint.call_with_http_info(**kwargs) + + def search_entities_metrics( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_metrics(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiMetricOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_metrics_endpoint.call_with_http_info(**kwargs) + + def update_entity_metrics( + self, + workspace_id, + object_id, + json_api_metric_in_document, + **kwargs + ): + """Put a Metric # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_metrics(workspace_id, object_id, json_api_metric_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_metric_in_document (JsonApiMetricInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiMetricOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_metric_in_document'] = \ + json_api_metric_in_document + return self.update_entity_metrics_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/ogcapi_features_api.py b/gooddata-api-client/gooddata_api_client/api/ogcapi_features_api.py new file mode 100644 index 000000000..a70cf1f90 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/ogcapi_features_api.py @@ -0,0 +1,353 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.geo_json_feature_collection import GeoJsonFeatureCollection + + +class OGCAPIFeaturesApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_collection_items_endpoint = _Endpoint( + settings={ + 'response_type': (GeoJsonFeatureCollection,), + 'auth': [], + 'endpoint_path': '/api/v1/location/collections/{collectionId}/items', + 'operation_id': 'get_collection_items', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'collection_id', + 'limit', + 'bbox', + 'values', + ], + 'required': [ + 'collection_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'limit', + ] + }, + root_map={ + 'validations': { + ('limit',): { + + 'inclusive_maximum': 100, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'collection_id': + (str,), + 'limit': + (int,), + 'bbox': + (str,), + 'values': + ([str],), + }, + 'attribute_map': { + 'collection_id': 'collectionId', + 'limit': 'limit', + 'bbox': 'bbox', + 'values': 'values', + }, + 'location_map': { + 'collection_id': 'path', + 'limit': 'query', + 'bbox': 'query', + 'values': 'query', + }, + 'collection_format_map': { + 'values': 'multi', + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_custom_collection_items_endpoint = _Endpoint( + settings={ + 'response_type': (GeoJsonFeatureCollection,), + 'auth': [], + 'endpoint_path': '/api/v1/location/custom/collections/{collectionId}/items', + 'operation_id': 'get_custom_collection_items', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'collection_id', + 'limit', + 'bbox', + 'values', + ], + 'required': [ + 'collection_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'limit', + ] + }, + root_map={ + 'validations': { + ('limit',): { + + 'inclusive_maximum': 100, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'collection_id': + (str,), + 'limit': + (int,), + 'bbox': + (str,), + 'values': + ([str],), + }, + 'attribute_map': { + 'collection_id': 'collectionId', + 'limit': 'limit', + 'bbox': 'bbox', + 'values': 'values', + }, + 'location_map': { + 'collection_id': 'path', + 'limit': 'query', + 'bbox': 'query', + 'values': 'query', + }, + 'collection_format_map': { + 'values': 'multi', + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def get_collection_items( + self, + collection_id, + **kwargs + ): + """Get collection features # noqa: E501 + + Retrieve features from a GeoCollections collection as GeoJSON # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_collection_items(collection_id, async_req=True) + >>> result = thread.get() + + Args: + collection_id (str): Collection identifier + + Keyword Args: + limit (int): Maximum number of features to return. [optional] + bbox (str): Bounding box filter (minx,miny,maxx,maxy). [optional] + values ([str]): List of values to filter features by. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + GeoJsonFeatureCollection + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['collection_id'] = \ + collection_id + return self.get_collection_items_endpoint.call_with_http_info(**kwargs) + + def get_custom_collection_items( + self, + collection_id, + **kwargs + ): + """Get custom collection features # noqa: E501 + + Retrieve features from a custom (organization-scoped) GeoCollections collection as GeoJSON # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_custom_collection_items(collection_id, async_req=True) + >>> result = thread.get() + + Args: + collection_id (str): Collection identifier + + Keyword Args: + limit (int): Maximum number of features to return. [optional] + bbox (str): Bounding box filter (minx,miny,maxx,maxy). [optional] + values ([str]): List of values to filter features by. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + GeoJsonFeatureCollection + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['collection_id'] = \ + collection_id + return self.get_custom_collection_items_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/organization_entity_controller_api.py b/gooddata-api-client/gooddata_api_client/api/organization_entity_controller_api.py new file mode 100644 index 000000000..583490ef5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/organization_entity_controller_api.py @@ -0,0 +1,572 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.json_api_organization_in_document import JsonApiOrganizationInDocument +from gooddata_api_client.model.json_api_organization_out_document import JsonApiOrganizationOutDocument +from gooddata_api_client.model.json_api_organization_patch_document import JsonApiOrganizationPatchDocument + + +class OrganizationEntityControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_entity_organizations_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiOrganizationOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/admin/organizations/{id}', + 'operation_id': 'get_entity_organizations', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'filter', + 'include', + 'meta_include', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'id', + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "USERS": "users", + "USERGROUPS": "userGroups", + "IDENTITYPROVIDERS": "identityProviders", + "BOOTSTRAPUSER": "bootstrapUser", + "BOOTSTRAPUSERGROUP": "bootstrapUserGroup", + "IDENTITYPROVIDER": "identityProvider", + "ALL": "ALL" + }, + ('meta_include',): { + + "PERMISSIONS": "permissions", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + 'include': 'include', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'id': 'path', + 'filter': 'query', + 'include': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_organizations_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiOrganizationOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/admin/organizations/{id}', + 'operation_id': 'patch_entity_organizations', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_organization_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'id', + 'json_api_organization_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + ('include',): { + + "USERS": "users", + "USERGROUPS": "userGroups", + "IDENTITYPROVIDERS": "identityProviders", + "BOOTSTRAPUSER": "bootstrapUser", + "BOOTSTRAPUSERGROUP": "bootstrapUserGroup", + "IDENTITYPROVIDER": "identityProvider", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_organization_patch_document': + (JsonApiOrganizationPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'id': 'path', + 'json_api_organization_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.update_entity_organizations_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiOrganizationOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/admin/organizations/{id}', + 'operation_id': 'update_entity_organizations', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_organization_in_document', + 'filter', + 'include', + ], + 'required': [ + 'id', + 'json_api_organization_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + ('include',): { + + "USERS": "users", + "USERGROUPS": "userGroups", + "IDENTITYPROVIDERS": "identityProviders", + "BOOTSTRAPUSER": "bootstrapUser", + "BOOTSTRAPUSERGROUP": "bootstrapUserGroup", + "IDENTITYPROVIDER": "identityProvider", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_organization_in_document': + (JsonApiOrganizationInDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'id': 'id', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'id': 'path', + 'json_api_organization_in_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def get_entity_organizations( + self, + id, + **kwargs + ): + """Get Organizations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_organizations(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiOrganizationOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.get_entity_organizations_endpoint.call_with_http_info(**kwargs) + + def patch_entity_organizations( + self, + id, + json_api_organization_patch_document, + **kwargs + ): + """Patch Organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_organizations(id, json_api_organization_patch_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_organization_patch_document (JsonApiOrganizationPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiOrganizationOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['json_api_organization_patch_document'] = \ + json_api_organization_patch_document + return self.patch_entity_organizations_endpoint.call_with_http_info(**kwargs) + + def update_entity_organizations( + self, + id, + json_api_organization_in_document, + **kwargs + ): + """Put Organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_organizations(id, json_api_organization_in_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_organization_in_document (JsonApiOrganizationInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiOrganizationOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['json_api_organization_in_document'] = \ + json_api_organization_in_document + return self.update_entity_organizations_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/user_data_filter_controller_api.py b/gooddata-api-client/gooddata_api_client/api/user_data_filter_controller_api.py new file mode 100644 index 000000000..528abd445 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/user_data_filter_controller_api.py @@ -0,0 +1,1305 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_user_data_filter_in_document import JsonApiUserDataFilterInDocument +from gooddata_api_client.model.json_api_user_data_filter_out_document import JsonApiUserDataFilterOutDocument +from gooddata_api_client.model.json_api_user_data_filter_out_list import JsonApiUserDataFilterOutList +from gooddata_api_client.model.json_api_user_data_filter_patch_document import JsonApiUserDataFilterPatchDocument +from gooddata_api_client.model.json_api_user_data_filter_post_optional_id_document import JsonApiUserDataFilterPostOptionalIdDocument + + +class UserDataFilterControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_user_data_filters_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiUserDataFilterOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/userDataFilters', + 'operation_id': 'create_entity_user_data_filters', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_user_data_filter_post_optional_id_document', + 'include', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'json_api_user_data_filter_post_optional_id_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "USERS": "users", + "USERGROUPS": "userGroups", + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "USER": "user", + "USERGROUP": "userGroup", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_user_data_filter_post_optional_id_document': + (JsonApiUserDataFilterPostOptionalIdDocument,), + 'include': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'include': 'include', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_user_data_filter_post_optional_id_document': 'body', + 'include': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_user_data_filters_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/userDataFilters/{objectId}', + 'operation_id': 'delete_entity_user_data_filters', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_user_data_filters_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiUserDataFilterOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/userDataFilters', + 'operation_id': 'get_all_entities_user_data_filters', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "USERS": "users", + "USERGROUPS": "userGroups", + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "USER": "user", + "USERGROUP": "userGroup", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_user_data_filters_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiUserDataFilterOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/userDataFilters/{objectId}', + 'operation_id': 'get_entity_user_data_filters', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "USERS": "users", + "USERGROUPS": "userGroups", + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "USER": "user", + "USERGROUP": "userGroup", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_user_data_filters_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiUserDataFilterOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/userDataFilters/{objectId}', + 'operation_id': 'patch_entity_user_data_filters', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_user_data_filter_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_user_data_filter_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERS": "users", + "USERGROUPS": "userGroups", + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "USER": "user", + "USERGROUP": "userGroup", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_user_data_filter_patch_document': + (JsonApiUserDataFilterPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_user_data_filter_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_user_data_filters_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiUserDataFilterOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/userDataFilters/search', + 'operation_id': 'search_entities_user_data_filters', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_entity_user_data_filters_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiUserDataFilterOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/userDataFilters/{objectId}', + 'operation_id': 'update_entity_user_data_filters', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_user_data_filter_in_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_user_data_filter_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERS": "users", + "USERGROUPS": "userGroups", + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "USER": "user", + "USERGROUP": "userGroup", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_user_data_filter_in_document': + (JsonApiUserDataFilterInDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_user_data_filter_in_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_user_data_filters( + self, + workspace_id, + json_api_user_data_filter_post_optional_id_document, + **kwargs + ): + """Post User Data Filters # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_user_data_filters(workspace_id, json_api_user_data_filter_post_optional_id_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_user_data_filter_post_optional_id_document (JsonApiUserDataFilterPostOptionalIdDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserDataFilterOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_user_data_filter_post_optional_id_document'] = \ + json_api_user_data_filter_post_optional_id_document + return self.create_entity_user_data_filters_endpoint.call_with_http_info(**kwargs) + + def delete_entity_user_data_filters( + self, + workspace_id, + object_id, + **kwargs + ): + """Delete a User Data Filter # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_user_data_filters(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.delete_entity_user_data_filters_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_user_data_filters( + self, + workspace_id, + **kwargs + ): + """Get all User Data Filters # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_user_data_filters(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserDataFilterOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_user_data_filters_endpoint.call_with_http_info(**kwargs) + + def get_entity_user_data_filters( + self, + workspace_id, + object_id, + **kwargs + ): + """Get a User Data Filter # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_user_data_filters(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserDataFilterOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_user_data_filters_endpoint.call_with_http_info(**kwargs) + + def patch_entity_user_data_filters( + self, + workspace_id, + object_id, + json_api_user_data_filter_patch_document, + **kwargs + ): + """Patch a User Data Filter # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_user_data_filters(workspace_id, object_id, json_api_user_data_filter_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_user_data_filter_patch_document (JsonApiUserDataFilterPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserDataFilterOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_user_data_filter_patch_document'] = \ + json_api_user_data_filter_patch_document + return self.patch_entity_user_data_filters_endpoint.call_with_http_info(**kwargs) + + def search_entities_user_data_filters( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_user_data_filters(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserDataFilterOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_user_data_filters_endpoint.call_with_http_info(**kwargs) + + def update_entity_user_data_filters( + self, + workspace_id, + object_id, + json_api_user_data_filter_in_document, + **kwargs + ): + """Put a User Data Filter # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_user_data_filters(workspace_id, object_id, json_api_user_data_filter_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_user_data_filter_in_document (JsonApiUserDataFilterInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserDataFilterOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_user_data_filter_in_document'] = \ + json_api_user_data_filter_in_document + return self.update_entity_user_data_filters_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/user_setting_controller_api.py b/gooddata-api-client/gooddata_api_client/api/user_setting_controller_api.py new file mode 100644 index 000000000..becbbdcba --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/user_setting_controller_api.py @@ -0,0 +1,834 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.json_api_user_setting_in_document import JsonApiUserSettingInDocument +from gooddata_api_client.model.json_api_user_setting_out_document import JsonApiUserSettingOutDocument +from gooddata_api_client.model.json_api_user_setting_out_list import JsonApiUserSettingOutList + + +class UserSettingControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_user_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiUserSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/users/{userId}/userSettings', + 'operation_id': 'create_entity_user_settings', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'json_api_user_setting_in_document', + ], + 'required': [ + 'user_id', + 'json_api_user_setting_in_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'json_api_user_setting_in_document': + (JsonApiUserSettingInDocument,), + }, + 'attribute_map': { + 'user_id': 'userId', + }, + 'location_map': { + 'user_id': 'path', + 'json_api_user_setting_in_document': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_user_settings_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/users/{userId}/userSettings/{id}', + 'operation_id': 'delete_entity_user_settings', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'id', + 'filter', + ], + 'required': [ + 'user_id', + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'user_id': 'userId', + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'user_id': 'path', + 'id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_user_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiUserSettingOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/users/{userId}/userSettings', + 'operation_id': 'get_all_entities_user_settings', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'filter', + 'page', + 'size', + 'sort', + 'meta_include', + ], + 'required': [ + 'user_id', + ], + 'nullable': [ + ], + 'enum': [ + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('meta_include',): { + + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'user_id': + (str,), + 'filter': + (str,), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'user_id': 'userId', + 'filter': 'filter', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'user_id': 'path', + 'filter': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_user_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiUserSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/users/{userId}/userSettings/{id}', + 'operation_id': 'get_entity_user_settings', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'id', + 'filter', + ], + 'required': [ + 'user_id', + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'user_id': 'userId', + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'user_id': 'path', + 'id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.update_entity_user_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiUserSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/users/{userId}/userSettings/{id}', + 'operation_id': 'update_entity_user_settings', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'id', + 'json_api_user_setting_in_document', + 'filter', + ], + 'required': [ + 'user_id', + 'id', + 'json_api_user_setting_in_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^(?!\.)[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'id': + (str,), + 'json_api_user_setting_in_document': + (JsonApiUserSettingInDocument,), + 'filter': + (str,), + }, + 'attribute_map': { + 'user_id': 'userId', + 'id': 'id', + 'filter': 'filter', + }, + 'location_map': { + 'user_id': 'path', + 'id': 'path', + 'json_api_user_setting_in_document': 'body', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_user_settings( + self, + user_id, + json_api_user_setting_in_document, + **kwargs + ): + """Post new user settings for the user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_user_settings(user_id, json_api_user_setting_in_document, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + json_api_user_setting_in_document (JsonApiUserSettingInDocument): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user_id'] = \ + user_id + kwargs['json_api_user_setting_in_document'] = \ + json_api_user_setting_in_document + return self.create_entity_user_settings_endpoint.call_with_http_info(**kwargs) + + def delete_entity_user_settings( + self, + user_id, + id, + **kwargs + ): + """Delete a setting for a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_user_settings(user_id, id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user_id'] = \ + user_id + kwargs['id'] = \ + id + return self.delete_entity_user_settings_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_user_settings( + self, + user_id, + **kwargs + ): + """List all settings for a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_user_settings(user_id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserSettingOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user_id'] = \ + user_id + return self.get_all_entities_user_settings_endpoint.call_with_http_info(**kwargs) + + def get_entity_user_settings( + self, + user_id, + id, + **kwargs + ): + """Get a setting for a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_user_settings(user_id, id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user_id'] = \ + user_id + kwargs['id'] = \ + id + return self.get_entity_user_settings_endpoint.call_with_http_info(**kwargs) + + def update_entity_user_settings( + self, + user_id, + id, + json_api_user_setting_in_document, + **kwargs + ): + """Put new user settings for the user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_user_settings(user_id, id, json_api_user_setting_in_document, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + id (str): + json_api_user_setting_in_document (JsonApiUserSettingInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user_id'] = \ + user_id + kwargs['id'] = \ + id + kwargs['json_api_user_setting_in_document'] = \ + json_api_user_setting_in_document + return self.update_entity_user_settings_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/visualization_object_controller_api.py b/gooddata-api-client/gooddata_api_client/api/visualization_object_controller_api.py new file mode 100644 index 000000000..3008c6c39 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/visualization_object_controller_api.py @@ -0,0 +1,1305 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_visualization_object_in_document import JsonApiVisualizationObjectInDocument +from gooddata_api_client.model.json_api_visualization_object_out_document import JsonApiVisualizationObjectOutDocument +from gooddata_api_client.model.json_api_visualization_object_out_list import JsonApiVisualizationObjectOutList +from gooddata_api_client.model.json_api_visualization_object_patch_document import JsonApiVisualizationObjectPatchDocument +from gooddata_api_client.model.json_api_visualization_object_post_optional_id_document import JsonApiVisualizationObjectPostOptionalIdDocument + + +class VisualizationObjectControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_visualization_objects_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiVisualizationObjectOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/visualizationObjects', + 'operation_id': 'create_entity_visualization_objects', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_visualization_object_post_optional_id_document', + 'include', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'json_api_visualization_object_post_optional_id_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "CERTIFIEDBY": "certifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_visualization_object_post_optional_id_document': + (JsonApiVisualizationObjectPostOptionalIdDocument,), + 'include': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'include': 'include', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_visualization_object_post_optional_id_document': 'body', + 'include': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_visualization_objects_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/visualizationObjects/{objectId}', + 'operation_id': 'delete_entity_visualization_objects', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_visualization_objects_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiVisualizationObjectOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/visualizationObjects', + 'operation_id': 'get_all_entities_visualization_objects', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "CERTIFIEDBY": "certifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_visualization_objects_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiVisualizationObjectOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/visualizationObjects/{objectId}', + 'operation_id': 'get_entity_visualization_objects', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "CERTIFIEDBY": "certifiedBy", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_visualization_objects_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiVisualizationObjectOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/visualizationObjects/{objectId}', + 'operation_id': 'patch_entity_visualization_objects', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_visualization_object_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_visualization_object_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "CERTIFIEDBY": "certifiedBy", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_visualization_object_patch_document': + (JsonApiVisualizationObjectPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_visualization_object_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_visualization_objects_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiVisualizationObjectOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/visualizationObjects/search', + 'operation_id': 'search_entities_visualization_objects', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_entity_visualization_objects_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiVisualizationObjectOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/visualizationObjects/{objectId}', + 'operation_id': 'update_entity_visualization_objects', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_visualization_object_in_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_visualization_object_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERIDENTIFIERS": "userIdentifiers", + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "CREATEDBY": "createdBy", + "MODIFIEDBY": "modifiedBy", + "CERTIFIEDBY": "certifiedBy", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_visualization_object_in_document': + (JsonApiVisualizationObjectInDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_visualization_object_in_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_visualization_objects( + self, + workspace_id, + json_api_visualization_object_post_optional_id_document, + **kwargs + ): + """Post Visualization Objects # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_visualization_objects(workspace_id, json_api_visualization_object_post_optional_id_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_visualization_object_post_optional_id_document (JsonApiVisualizationObjectPostOptionalIdDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiVisualizationObjectOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_visualization_object_post_optional_id_document'] = \ + json_api_visualization_object_post_optional_id_document + return self.create_entity_visualization_objects_endpoint.call_with_http_info(**kwargs) + + def delete_entity_visualization_objects( + self, + workspace_id, + object_id, + **kwargs + ): + """Delete a Visualization Object # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_visualization_objects(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.delete_entity_visualization_objects_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_visualization_objects( + self, + workspace_id, + **kwargs + ): + """Get all Visualization Objects # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_visualization_objects(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiVisualizationObjectOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_visualization_objects_endpoint.call_with_http_info(**kwargs) + + def get_entity_visualization_objects( + self, + workspace_id, + object_id, + **kwargs + ): + """Get a Visualization Object # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_visualization_objects(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiVisualizationObjectOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_visualization_objects_endpoint.call_with_http_info(**kwargs) + + def patch_entity_visualization_objects( + self, + workspace_id, + object_id, + json_api_visualization_object_patch_document, + **kwargs + ): + """Patch a Visualization Object # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_visualization_objects(workspace_id, object_id, json_api_visualization_object_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_visualization_object_patch_document (JsonApiVisualizationObjectPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiVisualizationObjectOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_visualization_object_patch_document'] = \ + json_api_visualization_object_patch_document + return self.patch_entity_visualization_objects_endpoint.call_with_http_info(**kwargs) + + def search_entities_visualization_objects( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_visualization_objects(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiVisualizationObjectOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_visualization_objects_endpoint.call_with_http_info(**kwargs) + + def update_entity_visualization_objects( + self, + workspace_id, + object_id, + json_api_visualization_object_in_document, + **kwargs + ): + """Put a Visualization Object # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_visualization_objects(workspace_id, object_id, json_api_visualization_object_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_visualization_object_in_document (JsonApiVisualizationObjectInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiVisualizationObjectOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_visualization_object_in_document'] = \ + json_api_visualization_object_in_document + return self.update_entity_visualization_objects_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/workspace_data_filter_controller_api.py b/gooddata-api-client/gooddata_api_client/api/workspace_data_filter_controller_api.py new file mode 100644 index 000000000..c0996358d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/workspace_data_filter_controller_api.py @@ -0,0 +1,1269 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_workspace_data_filter_in_document import JsonApiWorkspaceDataFilterInDocument +from gooddata_api_client.model.json_api_workspace_data_filter_out_document import JsonApiWorkspaceDataFilterOutDocument +from gooddata_api_client.model.json_api_workspace_data_filter_out_list import JsonApiWorkspaceDataFilterOutList +from gooddata_api_client.model.json_api_workspace_data_filter_patch_document import JsonApiWorkspaceDataFilterPatchDocument + + +class WorkspaceDataFilterControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_workspace_data_filters_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceDataFilters', + 'operation_id': 'create_entity_workspace_data_filters', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_workspace_data_filter_in_document', + 'include', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'json_api_workspace_data_filter_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "WORKSPACEDATAFILTERSETTINGS": "workspaceDataFilterSettings", + "FILTERSETTINGS": "filterSettings", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_workspace_data_filter_in_document': + (JsonApiWorkspaceDataFilterInDocument,), + 'include': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'include': 'include', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_workspace_data_filter_in_document': 'body', + 'include': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_workspace_data_filters_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId}', + 'operation_id': 'delete_entity_workspace_data_filters', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_workspace_data_filters_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceDataFilters', + 'operation_id': 'get_all_entities_workspace_data_filters', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "WORKSPACEDATAFILTERSETTINGS": "workspaceDataFilterSettings", + "FILTERSETTINGS": "filterSettings", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_workspace_data_filters_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId}', + 'operation_id': 'get_entity_workspace_data_filters', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "WORKSPACEDATAFILTERSETTINGS": "workspaceDataFilterSettings", + "FILTERSETTINGS": "filterSettings", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_workspace_data_filters_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId}', + 'operation_id': 'patch_entity_workspace_data_filters', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_workspace_data_filter_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_workspace_data_filter_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "WORKSPACEDATAFILTERSETTINGS": "workspaceDataFilterSettings", + "FILTERSETTINGS": "filterSettings", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_workspace_data_filter_patch_document': + (JsonApiWorkspaceDataFilterPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_workspace_data_filter_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_workspace_data_filters_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceDataFilters/search', + 'operation_id': 'search_entities_workspace_data_filters', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_entity_workspace_data_filters_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId}', + 'operation_id': 'update_entity_workspace_data_filters', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_workspace_data_filter_in_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_workspace_data_filter_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "WORKSPACEDATAFILTERSETTINGS": "workspaceDataFilterSettings", + "FILTERSETTINGS": "filterSettings", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_workspace_data_filter_in_document': + (JsonApiWorkspaceDataFilterInDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_workspace_data_filter_in_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_workspace_data_filters( + self, + workspace_id, + json_api_workspace_data_filter_in_document, + **kwargs + ): + """Post Workspace Data Filters # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_workspace_data_filters(workspace_id, json_api_workspace_data_filter_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_workspace_data_filter_in_document (JsonApiWorkspaceDataFilterInDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_workspace_data_filter_in_document'] = \ + json_api_workspace_data_filter_in_document + return self.create_entity_workspace_data_filters_endpoint.call_with_http_info(**kwargs) + + def delete_entity_workspace_data_filters( + self, + workspace_id, + object_id, + **kwargs + ): + """Delete a Workspace Data Filter # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_workspace_data_filters(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.delete_entity_workspace_data_filters_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_workspace_data_filters( + self, + workspace_id, + **kwargs + ): + """Get all Workspace Data Filters # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_workspace_data_filters(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_workspace_data_filters_endpoint.call_with_http_info(**kwargs) + + def get_entity_workspace_data_filters( + self, + workspace_id, + object_id, + **kwargs + ): + """Get a Workspace Data Filter # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_workspace_data_filters(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_workspace_data_filters_endpoint.call_with_http_info(**kwargs) + + def patch_entity_workspace_data_filters( + self, + workspace_id, + object_id, + json_api_workspace_data_filter_patch_document, + **kwargs + ): + """Patch a Workspace Data Filter # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_workspace_data_filters(workspace_id, object_id, json_api_workspace_data_filter_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_workspace_data_filter_patch_document (JsonApiWorkspaceDataFilterPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_workspace_data_filter_patch_document'] = \ + json_api_workspace_data_filter_patch_document + return self.patch_entity_workspace_data_filters_endpoint.call_with_http_info(**kwargs) + + def search_entities_workspace_data_filters( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_workspace_data_filters(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_workspace_data_filters_endpoint.call_with_http_info(**kwargs) + + def update_entity_workspace_data_filters( + self, + workspace_id, + object_id, + json_api_workspace_data_filter_in_document, + **kwargs + ): + """Put a Workspace Data Filter # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_workspace_data_filters(workspace_id, object_id, json_api_workspace_data_filter_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_workspace_data_filter_in_document (JsonApiWorkspaceDataFilterInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_workspace_data_filter_in_document'] = \ + json_api_workspace_data_filter_in_document + return self.update_entity_workspace_data_filters_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/workspace_data_filter_setting_controller_api.py b/gooddata-api-client/gooddata_api_client/api/workspace_data_filter_setting_controller_api.py new file mode 100644 index 000000000..9c082b22a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/workspace_data_filter_setting_controller_api.py @@ -0,0 +1,1269 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_workspace_data_filter_setting_in_document import JsonApiWorkspaceDataFilterSettingInDocument +from gooddata_api_client.model.json_api_workspace_data_filter_setting_out_document import JsonApiWorkspaceDataFilterSettingOutDocument +from gooddata_api_client.model.json_api_workspace_data_filter_setting_out_list import JsonApiWorkspaceDataFilterSettingOutList +from gooddata_api_client.model.json_api_workspace_data_filter_setting_patch_document import JsonApiWorkspaceDataFilterSettingPatchDocument + + +class WorkspaceDataFilterSettingControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_workspace_data_filter_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceDataFilterSettings', + 'operation_id': 'create_entity_workspace_data_filter_settings', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_workspace_data_filter_setting_in_document', + 'include', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'json_api_workspace_data_filter_setting_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "WORKSPACEDATAFILTERS": "workspaceDataFilters", + "WORKSPACEDATAFILTER": "workspaceDataFilter", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_workspace_data_filter_setting_in_document': + (JsonApiWorkspaceDataFilterSettingInDocument,), + 'include': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'include': 'include', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_workspace_data_filter_setting_in_document': 'body', + 'include': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_workspace_data_filter_settings_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceDataFilterSettings/{objectId}', + 'operation_id': 'delete_entity_workspace_data_filter_settings', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_workspace_data_filter_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterSettingOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceDataFilterSettings', + 'operation_id': 'get_all_entities_workspace_data_filter_settings', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('include',): { + + "WORKSPACEDATAFILTERS": "workspaceDataFilters", + "WORKSPACEDATAFILTER": "workspaceDataFilter", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_workspace_data_filter_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceDataFilterSettings/{objectId}', + 'operation_id': 'get_entity_workspace_data_filter_settings', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'include', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "WORKSPACEDATAFILTERS": "workspaceDataFilters", + "WORKSPACEDATAFILTER": "workspaceDataFilter", + "ALL": "ALL" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_workspace_data_filter_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceDataFilterSettings/{objectId}', + 'operation_id': 'patch_entity_workspace_data_filter_settings', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_workspace_data_filter_setting_patch_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_workspace_data_filter_setting_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "WORKSPACEDATAFILTERS": "workspaceDataFilters", + "WORKSPACEDATAFILTER": "workspaceDataFilter", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_workspace_data_filter_setting_patch_document': + (JsonApiWorkspaceDataFilterSettingPatchDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_workspace_data_filter_setting_patch_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_workspace_data_filter_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterSettingOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceDataFilterSettings/search', + 'operation_id': 'search_entities_workspace_data_filter_settings', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_entity_workspace_data_filter_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceDataFilterSettings/{objectId}', + 'operation_id': 'update_entity_workspace_data_filter_settings', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_workspace_data_filter_setting_in_document', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_workspace_data_filter_setting_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "WORKSPACEDATAFILTERS": "workspaceDataFilters", + "WORKSPACEDATAFILTER": "workspaceDataFilter", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_workspace_data_filter_setting_in_document': + (JsonApiWorkspaceDataFilterSettingInDocument,), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_workspace_data_filter_setting_in_document': 'body', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_workspace_data_filter_settings( + self, + workspace_id, + json_api_workspace_data_filter_setting_in_document, + **kwargs + ): + """Post Settings for Workspace Data Filters # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_workspace_data_filter_settings(workspace_id, json_api_workspace_data_filter_setting_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_workspace_data_filter_setting_in_document (JsonApiWorkspaceDataFilterSettingInDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_workspace_data_filter_setting_in_document'] = \ + json_api_workspace_data_filter_setting_in_document + return self.create_entity_workspace_data_filter_settings_endpoint.call_with_http_info(**kwargs) + + def delete_entity_workspace_data_filter_settings( + self, + workspace_id, + object_id, + **kwargs + ): + """Delete a Settings for Workspace Data Filter # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_workspace_data_filter_settings(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.delete_entity_workspace_data_filter_settings_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_workspace_data_filter_settings( + self, + workspace_id, + **kwargs + ): + """Get all Settings for Workspace Data Filters # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_workspace_data_filter_settings(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterSettingOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_workspace_data_filter_settings_endpoint.call_with_http_info(**kwargs) + + def get_entity_workspace_data_filter_settings( + self, + workspace_id, + object_id, + **kwargs + ): + """Get a Setting for Workspace Data Filter # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_workspace_data_filter_settings(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_workspace_data_filter_settings_endpoint.call_with_http_info(**kwargs) + + def patch_entity_workspace_data_filter_settings( + self, + workspace_id, + object_id, + json_api_workspace_data_filter_setting_patch_document, + **kwargs + ): + """Patch a Settings for Workspace Data Filter # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_workspace_data_filter_settings(workspace_id, object_id, json_api_workspace_data_filter_setting_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_workspace_data_filter_setting_patch_document (JsonApiWorkspaceDataFilterSettingPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_workspace_data_filter_setting_patch_document'] = \ + json_api_workspace_data_filter_setting_patch_document + return self.patch_entity_workspace_data_filter_settings_endpoint.call_with_http_info(**kwargs) + + def search_entities_workspace_data_filter_settings( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_workspace_data_filter_settings(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterSettingOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_workspace_data_filter_settings_endpoint.call_with_http_info(**kwargs) + + def update_entity_workspace_data_filter_settings( + self, + workspace_id, + object_id, + json_api_workspace_data_filter_setting_in_document, + **kwargs + ): + """Put a Settings for Workspace Data Filter # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_workspace_data_filter_settings(workspace_id, object_id, json_api_workspace_data_filter_setting_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_workspace_data_filter_setting_in_document (JsonApiWorkspaceDataFilterSettingInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_workspace_data_filter_setting_in_document'] = \ + json_api_workspace_data_filter_setting_in_document + return self.update_entity_workspace_data_filter_settings_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api/workspace_setting_controller_api.py b/gooddata-api-client/gooddata_api_client/api/workspace_setting_controller_api.py new file mode 100644 index 000000000..c67a099c1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api/workspace_setting_controller_api.py @@ -0,0 +1,1200 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_api_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_api_client.model.entity_search_body import EntitySearchBody +from gooddata_api_client.model.json_api_workspace_setting_in_document import JsonApiWorkspaceSettingInDocument +from gooddata_api_client.model.json_api_workspace_setting_out_document import JsonApiWorkspaceSettingOutDocument +from gooddata_api_client.model.json_api_workspace_setting_out_list import JsonApiWorkspaceSettingOutList +from gooddata_api_client.model.json_api_workspace_setting_patch_document import JsonApiWorkspaceSettingPatchDocument +from gooddata_api_client.model.json_api_workspace_setting_post_optional_id_document import JsonApiWorkspaceSettingPostOptionalIdDocument + + +class WorkspaceSettingControllerApi(object): + """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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_entity_workspace_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceSettings', + 'operation_id': 'create_entity_workspace_settings', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_workspace_setting_post_optional_id_document', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'json_api_workspace_setting_post_optional_id_document', + ], + 'nullable': [ + ], + 'enum': [ + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_workspace_setting_post_optional_id_document': + (JsonApiWorkspaceSettingPostOptionalIdDocument,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_workspace_setting_post_optional_id_document': 'body', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.delete_entity_workspace_settings_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceSettings/{objectId}', + 'operation_id': 'delete_entity_workspace_settings', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.get_all_entities_workspace_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceSettingOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceSettings', + 'operation_id': 'get_all_entities_workspace_settings', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'origin', + 'filter', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + ('meta_include',): { + + "ORIGIN": "origin", + "PAGE": "page", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'origin': + (str,), + 'filter': + (str,), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'filter': 'filter', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'origin': 'query', + 'filter': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_entity_workspace_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceSettings/{objectId}', + 'operation_id': 'get_entity_workspace_settings', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'filter', + 'x_gdc_validate_relations', + 'meta_include', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('meta_include',): { + + "ORIGIN": "origin", + "ALL": "all", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'filter': + (str,), + 'x_gdc_validate_relations': + (bool,), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'filter': 'query', + 'x_gdc_validate_relations': 'header', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.patch_entity_workspace_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceSettings/{objectId}', + 'operation_id': 'patch_entity_workspace_settings', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_workspace_setting_patch_document', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_workspace_setting_patch_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_workspace_setting_patch_document': + (JsonApiWorkspaceSettingPatchDocument,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_workspace_setting_patch_document': 'body', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + self.search_entities_workspace_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceSettingOutList,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceSettings/search', + 'operation_id': 'search_entities_workspace_settings', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'entity_search_body', + 'origin', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'entity_search_body', + ], + 'nullable': [ + ], + 'enum': [ + 'origin', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('origin',): { + + "ALL": "ALL", + "PARENTS": "PARENTS", + "NATIVE": "NATIVE" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'entity_search_body': + (EntitySearchBody,), + 'origin': + (str,), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'origin': 'origin', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'entity_search_body': 'body', + 'origin': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_entity_workspace_settings_endpoint = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/v1/entities/workspaces/{workspaceId}/workspaceSettings/{objectId}', + 'operation_id': 'update_entity_workspace_settings', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_workspace_setting_in_document', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_workspace_setting_in_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_workspace_setting_in_document': + (JsonApiWorkspaceSettingInDocument,), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_workspace_setting_in_document': 'body', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/json', + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client + ) + + def create_entity_workspace_settings( + self, + workspace_id, + json_api_workspace_setting_post_optional_id_document, + **kwargs + ): + """Post Settings for Workspaces # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_workspace_settings(workspace_id, json_api_workspace_setting_post_optional_id_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_workspace_setting_post_optional_id_document (JsonApiWorkspaceSettingPostOptionalIdDocument): + + Keyword Args: + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_workspace_setting_post_optional_id_document'] = \ + json_api_workspace_setting_post_optional_id_document + return self.create_entity_workspace_settings_endpoint.call_with_http_info(**kwargs) + + def delete_entity_workspace_settings( + self, + workspace_id, + object_id, + **kwargs + ): + """Delete a Setting for Workspace # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_workspace_settings(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.delete_entity_workspace_settings_endpoint.call_with_http_info(**kwargs) + + def get_all_entities_workspace_settings( + self, + workspace_id, + **kwargs + ): + """Get all Setting for Workspaces # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_workspace_settings(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceSettingOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + return self.get_all_entities_workspace_settings_endpoint.call_with_http_info(**kwargs) + + def get_entity_workspace_settings( + self, + workspace_id, + object_id, + **kwargs + ): + """Get a Setting for Workspace # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_workspace_settings(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.get_entity_workspace_settings_endpoint.call_with_http_info(**kwargs) + + def patch_entity_workspace_settings( + self, + workspace_id, + object_id, + json_api_workspace_setting_patch_document, + **kwargs + ): + """Patch a Setting for Workspace # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_entity_workspace_settings(workspace_id, object_id, json_api_workspace_setting_patch_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_workspace_setting_patch_document (JsonApiWorkspaceSettingPatchDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_workspace_setting_patch_document'] = \ + json_api_workspace_setting_patch_document + return self.patch_entity_workspace_settings_endpoint.call_with_http_info(**kwargs) + + def search_entities_workspace_settings( + self, + workspace_id, + entity_search_body, + **kwargs + ): + """The search endpoint (beta) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_entities_workspace_settings(workspace_id, entity_search_body, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + entity_search_body (EntitySearchBody): Search request body with filter, pagination, and sorting options + + Keyword Args: + origin (str): [optional] if omitted the server will use the default value of "ALL" + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceSettingOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['entity_search_body'] = \ + entity_search_body + return self.search_entities_workspace_settings_endpoint.call_with_http_info(**kwargs) + + def update_entity_workspace_settings( + self, + workspace_id, + object_id, + json_api_workspace_setting_in_document, + **kwargs + ): + """Put a Setting for a Workspace # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_workspace_settings(workspace_id, object_id, json_api_workspace_setting_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_workspace_setting_in_document (JsonApiWorkspaceSettingInDocument): + + Keyword Args: + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_workspace_setting_in_document'] = \ + json_api_workspace_setting_in_document + return self.update_entity_workspace_settings_endpoint.call_with_http_info(**kwargs) + diff --git a/gooddata-api-client/gooddata_api_client/api_response.py b/gooddata-api-client/gooddata_api_client/api_response.py new file mode 100644 index 000000000..9bc7c11f6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/gooddata-api-client/gooddata_api_client/apis/__init__.py b/gooddata-api-client/gooddata_api_client/apis/__init__.py index ef0cc377b..eadce11f5 100644 --- a/gooddata-api-client/gooddata_api_client/apis/__init__.py +++ b/gooddata-api-client/gooddata_api_client/apis/__init__.py @@ -26,6 +26,7 @@ from gooddata_api_client.api.automations_api import AutomationsApi from gooddata_api_client.api.available_drivers_api import AvailableDriversApi from gooddata_api_client.api.csp_directives_api import CSPDirectivesApi +from gooddata_api_client.api.cache_usage_api import CacheUsageApi from gooddata_api_client.api.certification_api import CertificationApi from gooddata_api_client.api.computation_api import ComputationApi from gooddata_api_client.api.cookie_security_configuration_api import CookieSecurityConfigurationApi @@ -33,6 +34,12 @@ from gooddata_api_client.api.data_filters_api import DataFiltersApi from gooddata_api_client.api.data_source_declarative_apis_api import DataSourceDeclarativeAPIsApi from gooddata_api_client.api.data_source_entity_apis_api import DataSourceEntityAPIsApi +from gooddata_api_client.api.data_source_files_analysis_api import DataSourceFilesAnalysisApi +from gooddata_api_client.api.data_source_files_deletion_api import DataSourceFilesDeletionApi +from gooddata_api_client.api.data_source_files_import_api import DataSourceFilesImportApi +from gooddata_api_client.api.data_source_files_listing_api import DataSourceFilesListingApi +from gooddata_api_client.api.data_source_files_manifest_read_api import DataSourceFilesManifestReadApi +from gooddata_api_client.api.data_source_staging_location_api import DataSourceStagingLocationApi from gooddata_api_client.api.datasets_api import DatasetsApi from gooddata_api_client.api.dependency_graph_api import DependencyGraphApi from gooddata_api_client.api.entitlement_api import EntitlementApi @@ -57,6 +64,7 @@ from gooddata_api_client.api.metadata_sync_api import MetadataSyncApi from gooddata_api_client.api.metrics_api import MetricsApi from gooddata_api_client.api.notification_channels_api import NotificationChannelsApi +from gooddata_api_client.api.ogcapi_features_api import OGCAPIFeaturesApi from gooddata_api_client.api.options_api import OptionsApi from gooddata_api_client.api.organization_api import OrganizationApi from gooddata_api_client.api.organization_declarative_apis_api import OrganizationDeclarativeAPIsApi diff --git a/gooddata-api-client/gooddata_api_client/model/analyze_csv_request.py b/gooddata-api-client/gooddata_api_client/model/analyze_csv_request.py new file mode 100644 index 000000000..abdc18236 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/analyze_csv_request.py @@ -0,0 +1,276 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.analyze_csv_request_item import AnalyzeCsvRequestItem + globals()['AnalyzeCsvRequestItem'] = AnalyzeCsvRequestItem + + +class AnalyzeCsvRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'analyze_requests': ([AnalyzeCsvRequestItem],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'analyze_requests': 'analyzeRequests', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, analyze_requests, *args, **kwargs): # noqa: E501 + """AnalyzeCsvRequest - a model defined in OpenAPI + + Args: + analyze_requests ([AnalyzeCsvRequestItem]): List of individual CSV analysis requests. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.analyze_requests = analyze_requests + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, analyze_requests, *args, **kwargs): # noqa: E501 + """AnalyzeCsvRequest - a model defined in OpenAPI + + Args: + analyze_requests ([AnalyzeCsvRequestItem]): List of individual CSV analysis requests. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.analyze_requests = analyze_requests + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/analyze_csv_request_item.py b/gooddata-api-client/gooddata_api_client/model/analyze_csv_request_item.py new file mode 100644 index 000000000..88c026c85 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/analyze_csv_request_item.py @@ -0,0 +1,280 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.analyze_csv_request_item_config import AnalyzeCsvRequestItemConfig + globals()['AnalyzeCsvRequestItemConfig'] = AnalyzeCsvRequestItemConfig + + +class AnalyzeCsvRequestItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'location': (str,), # noqa: E501 + 'config': (AnalyzeCsvRequestItemConfig,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'location': 'location', # noqa: E501 + 'config': 'config', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, location, *args, **kwargs): # noqa: E501 + """AnalyzeCsvRequestItem - a model defined in OpenAPI + + Args: + location (str): Location of the CSV file to analyze. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + config (AnalyzeCsvRequestItemConfig): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, location, *args, **kwargs): # noqa: E501 + """AnalyzeCsvRequestItem - a model defined in OpenAPI + + Args: + location (str): Location of the CSV file to analyze. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + config (AnalyzeCsvRequestItemConfig): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/analyze_csv_request_item_config.py b/gooddata-api-client/gooddata_api_client/model/analyze_csv_request_item_config.py new file mode 100644 index 000000000..42805afd2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/analyze_csv_request_item_config.py @@ -0,0 +1,276 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class AnalyzeCsvRequestItemConfig(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'delimiters': ([str],), # noqa: E501 + 'header_detect_max_rows': (int,), # noqa: E501 + 'header_row_count': (int,), # noqa: E501 + 'result_rows': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'delimiters': 'delimiters', # noqa: E501 + 'header_detect_max_rows': 'headerDetectMaxRows', # noqa: E501 + 'header_row_count': 'headerRowCount', # noqa: E501 + 'result_rows': 'resultRows', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AnalyzeCsvRequestItemConfig - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + delimiters ([str]): Possible column delimiters.. [optional] # noqa: E501 + header_detect_max_rows (int): Maximum number of rows to work with during header detection.. [optional] # noqa: E501 + header_row_count (int): Number of rows to consider as header, if null, header will be detected.. [optional] # noqa: E501 + result_rows (int): Number of rows to return in the flight that represents analysis result. If 0, no rows are returned, if less than 0, all rows that were in the sample are returned.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AnalyzeCsvRequestItemConfig - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + delimiters ([str]): Possible column delimiters.. [optional] # noqa: E501 + header_detect_max_rows (int): Maximum number of rows to work with during header detection.. [optional] # noqa: E501 + header_row_count (int): Number of rows to consider as header, if null, header will be detected.. [optional] # noqa: E501 + result_rows (int): Number of rows to return in the flight that represents analysis result. If 0, no rows are returned, if less than 0, all rows that were in the sample are returned.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/analyze_csv_response.py b/gooddata-api-client/gooddata_api_client/model/analyze_csv_response.py new file mode 100644 index 000000000..4e79179b6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/analyze_csv_response.py @@ -0,0 +1,294 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.analyze_csv_response_column import AnalyzeCsvResponseColumn + from gooddata_api_client.model.analyze_csv_response_config import AnalyzeCsvResponseConfig + globals()['AnalyzeCsvResponseColumn'] = AnalyzeCsvResponseColumn + globals()['AnalyzeCsvResponseConfig'] = AnalyzeCsvResponseConfig + + +class AnalyzeCsvResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'columns': ([AnalyzeCsvResponseColumn],), # noqa: E501 + 'location': (str,), # noqa: E501 + 'preview_data': ([[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]],), # noqa: E501 + 'config': (AnalyzeCsvResponseConfig,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'columns': 'columns', # noqa: E501 + 'location': 'location', # noqa: E501 + 'preview_data': 'previewData', # noqa: E501 + 'config': 'config', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, columns, location, preview_data, *args, **kwargs): # noqa: E501 + """AnalyzeCsvResponse - a model defined in OpenAPI + + Args: + columns ([AnalyzeCsvResponseColumn]): List of column metadata. + location (str): Location of the analyzed file in the source data source. + preview_data ([[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]]): Preview of the first N rows of the file. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + config (AnalyzeCsvResponseConfig): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.columns = columns + self.location = location + self.preview_data = preview_data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, columns, location, preview_data, *args, **kwargs): # noqa: E501 + """AnalyzeCsvResponse - a model defined in OpenAPI + + Args: + columns ([AnalyzeCsvResponseColumn]): List of column metadata. + location (str): Location of the analyzed file in the source data source. + preview_data ([[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]]): Preview of the first N rows of the file. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + config (AnalyzeCsvResponseConfig): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.columns = columns + self.location = location + self.preview_data = preview_data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/analyze_csv_response_column.py b/gooddata-api-client/gooddata_api_client/model/analyze_csv_response_column.py new file mode 100644 index 000000000..92b811bb3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/analyze_csv_response_column.py @@ -0,0 +1,280 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class AnalyzeCsvResponseColumn(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'detected_date_formats': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'type': 'type', # noqa: E501 + 'detected_date_formats': 'detectedDateFormats', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, type, *args, **kwargs): # noqa: E501 + """AnalyzeCsvResponseColumn - a model defined in OpenAPI + + Args: + name (str): Name of the column as specified in the file (or autogenerated one if the file has no header). + type (str): Type of the column (e.g. string, bool, etc.). + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + detected_date_formats ([str]): List of date formats that can be used to parse this column as date. Null if there are none.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, type, *args, **kwargs): # noqa: E501 + """AnalyzeCsvResponseColumn - a model defined in OpenAPI + + Args: + name (str): Name of the column as specified in the file (or autogenerated one if the file has no header). + type (str): Type of the column (e.g. string, bool, etc.). + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + detected_date_formats ([str]): List of date formats that can be used to parse this column as date. Null if there are none.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/analyze_csv_response_config.py b/gooddata-api-client/gooddata_api_client/model/analyze_csv_response_config.py new file mode 100644 index 000000000..0cc915eed --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/analyze_csv_response_config.py @@ -0,0 +1,282 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.csv_convert_options import CsvConvertOptions + from gooddata_api_client.model.csv_parse_options import CsvParseOptions + from gooddata_api_client.model.csv_read_options import CsvReadOptions + globals()['CsvConvertOptions'] = CsvConvertOptions + globals()['CsvParseOptions'] = CsvParseOptions + globals()['CsvReadOptions'] = CsvReadOptions + + +class AnalyzeCsvResponseConfig(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'convert_options': (CsvConvertOptions,), # noqa: E501 + 'parse_options': (CsvParseOptions,), # noqa: E501 + 'read_options': (CsvReadOptions,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'convert_options': 'convertOptions', # noqa: E501 + 'parse_options': 'parseOptions', # noqa: E501 + 'read_options': 'readOptions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AnalyzeCsvResponseConfig - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + convert_options (CsvConvertOptions): [optional] # noqa: E501 + parse_options (CsvParseOptions): [optional] # noqa: E501 + read_options (CsvReadOptions): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AnalyzeCsvResponseConfig - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + convert_options (CsvConvertOptions): [optional] # noqa: E501 + parse_options (CsvParseOptions): [optional] # noqa: E501 + read_options (CsvReadOptions): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/cache_removal_interval.py b/gooddata-api-client/gooddata_api_client/model/cache_removal_interval.py new file mode 100644 index 000000000..ba249a868 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/cache_removal_interval.py @@ -0,0 +1,282 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class CacheRemovalInterval(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + '_from': (datetime,), # noqa: E501 + 'removed': (int,), # noqa: E501 + 'to': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + '_from': 'from', # noqa: E501 + 'removed': 'removed', # noqa: E501 + 'to': 'to', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, _from, removed, to, *args, **kwargs): # noqa: E501 + """CacheRemovalInterval - a model defined in OpenAPI + + Args: + _from (datetime): Start timestamp of the removal interval. + removed (int): Bytes removed during this interval. + to (datetime): End timestamp of the removal interval. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self._from = _from + self.removed = removed + self.to = to + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, _from, removed, to, *args, **kwargs): # noqa: E501 + """CacheRemovalInterval - a model defined in OpenAPI + + Args: + _from (datetime): Start timestamp of the removal interval. + removed (int): Bytes removed during this interval. + to (datetime): End timestamp of the removal interval. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self._from = _from + self.removed = removed + self.to = to + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/cache_usage_data.py b/gooddata-api-client/gooddata_api_client/model/cache_usage_data.py new file mode 100644 index 000000000..732953399 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/cache_usage_data.py @@ -0,0 +1,284 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.organization_cache_usage import OrganizationCacheUsage + from gooddata_api_client.model.workspace_cache_usage import WorkspaceCacheUsage + globals()['OrganizationCacheUsage'] = OrganizationCacheUsage + globals()['WorkspaceCacheUsage'] = WorkspaceCacheUsage + + +class CacheUsageData(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'organization_cache_usage': (OrganizationCacheUsage,), # noqa: E501 + 'workspace_cache_usages': ({str: (WorkspaceCacheUsage,)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'organization_cache_usage': 'organizationCacheUsage', # noqa: E501 + 'workspace_cache_usages': 'workspaceCacheUsages', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, organization_cache_usage, workspace_cache_usages, *args, **kwargs): # noqa: E501 + """CacheUsageData - a model defined in OpenAPI + + Args: + organization_cache_usage (OrganizationCacheUsage): + workspace_cache_usages ({str: (WorkspaceCacheUsage,)}): Map of data about the cache usage of the individual workspaces. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.organization_cache_usage = organization_cache_usage + self.workspace_cache_usages = workspace_cache_usages + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, organization_cache_usage, workspace_cache_usages, *args, **kwargs): # noqa: E501 + """CacheUsageData - a model defined in OpenAPI + + Args: + organization_cache_usage (OrganizationCacheUsage): + workspace_cache_usages ({str: (WorkspaceCacheUsage,)}): Map of data about the cache usage of the individual workspaces. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.organization_cache_usage = organization_cache_usage + self.workspace_cache_usages = workspace_cache_usages + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/convert_geo_file_request.py b/gooddata-api-client/gooddata_api_client/model/convert_geo_file_request.py new file mode 100644 index 000000000..5bf5c5176 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/convert_geo_file_request.py @@ -0,0 +1,270 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class ConvertGeoFileRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'location': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'location': 'location', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, location, *args, **kwargs): # noqa: E501 + """ConvertGeoFileRequest - a model defined in OpenAPI + + Args: + location (str): Location of the file in the staging area to convert. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, location, *args, **kwargs): # noqa: E501 + """ConvertGeoFileRequest - a model defined in OpenAPI + + Args: + location (str): Location of the file in the staging area to convert. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/convert_geo_file_response.py b/gooddata-api-client/gooddata_api_client/model/convert_geo_file_response.py new file mode 100644 index 000000000..7963ffb69 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/convert_geo_file_response.py @@ -0,0 +1,270 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class ConvertGeoFileResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'location': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'location': 'location', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, location, *args, **kwargs): # noqa: E501 + """ConvertGeoFileResponse - a model defined in OpenAPI + + Args: + location (str): Location of the converted GeoParquet file in the staging area. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, location, *args, **kwargs): # noqa: E501 + """ConvertGeoFileResponse - a model defined in OpenAPI + + Args: + location (str): Location of the converted GeoParquet file in the staging area. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/csv_convert_options.py b/gooddata-api-client/gooddata_api_client/model/csv_convert_options.py new file mode 100644 index 000000000..cf919225e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/csv_convert_options.py @@ -0,0 +1,318 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.csv_convert_options_column_type import CsvConvertOptionsColumnType + globals()['CsvConvertOptionsColumnType'] = CsvConvertOptionsColumnType + + +class CsvConvertOptions(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'auto_dict_encode': (bool,), # noqa: E501 + 'auto_dict_max_cardinality': (int,), # noqa: E501 + 'check_utf8': (bool,), # noqa: E501 + 'column_types': ([CsvConvertOptionsColumnType],), # noqa: E501 + 'decimal_point': (str,), # noqa: E501 + 'false_values': ([str],), # noqa: E501 + 'include_columns': ([str],), # noqa: E501 + 'include_missing_columns': (bool,), # noqa: E501 + 'null_values': ([str],), # noqa: E501 + 'quoted_strings_can_be_null': (bool,), # noqa: E501 + 'strings_can_be_null': (bool,), # noqa: E501 + 'timestamp_parsers': ([str],), # noqa: E501 + 'true_values': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'auto_dict_encode': 'autoDictEncode', # noqa: E501 + 'auto_dict_max_cardinality': 'autoDictMaxCardinality', # noqa: E501 + 'check_utf8': 'checkUtf8', # noqa: E501 + 'column_types': 'columnTypes', # noqa: E501 + 'decimal_point': 'decimalPoint', # noqa: E501 + 'false_values': 'falseValues', # noqa: E501 + 'include_columns': 'includeColumns', # noqa: E501 + 'include_missing_columns': 'includeMissingColumns', # noqa: E501 + 'null_values': 'nullValues', # noqa: E501 + 'quoted_strings_can_be_null': 'quotedStringsCanBeNull', # noqa: E501 + 'strings_can_be_null': 'stringsCanBeNull', # noqa: E501 + 'timestamp_parsers': 'timestampParsers', # noqa: E501 + 'true_values': 'trueValues', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CsvConvertOptions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + auto_dict_encode (bool): Whether to try to automatically dict-encode string / binary data.. [optional] # noqa: E501 + auto_dict_max_cardinality (int): The maximum dictionary cardinality for autoDictEncode.. [optional] # noqa: E501 + check_utf8 (bool): Whether to check UTF8 validity of string columns.. [optional] # noqa: E501 + column_types ([CsvConvertOptionsColumnType]): Information about the column types in the table.. [optional] # noqa: E501 + decimal_point (str): The character used as decimal point in floating-point and decimal data.. [optional] # noqa: E501 + false_values ([str]): Sequence of strings that denote false Booleans in the data.. [optional] # noqa: E501 + include_columns ([str]): The names of columns to include in the Table. If empty, the Table will include all columns from the CSV file. If not empty, only these columns will be included, in this order.. [optional] # noqa: E501 + include_missing_columns (bool): If false, columns in includeColumns but not in the CSV file will error out.. [optional] # noqa: E501 + null_values ([str]): Sequence of strings that denote nulls in the data.. [optional] # noqa: E501 + quoted_strings_can_be_null (bool): Whether quoted values can be null.. [optional] # noqa: E501 + strings_can_be_null (bool): Whether string / binary columns can have null values.. [optional] # noqa: E501 + timestamp_parsers ([str]): Sequence of strptime()-compatible format strings, tried in order when attempting to infer or convert timestamp values.. [optional] # noqa: E501 + true_values ([str]): Sequence of strings that denote true Booleans in the data.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CsvConvertOptions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + auto_dict_encode (bool): Whether to try to automatically dict-encode string / binary data.. [optional] # noqa: E501 + auto_dict_max_cardinality (int): The maximum dictionary cardinality for autoDictEncode.. [optional] # noqa: E501 + check_utf8 (bool): Whether to check UTF8 validity of string columns.. [optional] # noqa: E501 + column_types ([CsvConvertOptionsColumnType]): Information about the column types in the table.. [optional] # noqa: E501 + decimal_point (str): The character used as decimal point in floating-point and decimal data.. [optional] # noqa: E501 + false_values ([str]): Sequence of strings that denote false Booleans in the data.. [optional] # noqa: E501 + include_columns ([str]): The names of columns to include in the Table. If empty, the Table will include all columns from the CSV file. If not empty, only these columns will be included, in this order.. [optional] # noqa: E501 + include_missing_columns (bool): If false, columns in includeColumns but not in the CSV file will error out.. [optional] # noqa: E501 + null_values ([str]): Sequence of strings that denote nulls in the data.. [optional] # noqa: E501 + quoted_strings_can_be_null (bool): Whether quoted values can be null.. [optional] # noqa: E501 + strings_can_be_null (bool): Whether string / binary columns can have null values.. [optional] # noqa: E501 + timestamp_parsers ([str]): Sequence of strptime()-compatible format strings, tried in order when attempting to infer or convert timestamp values.. [optional] # noqa: E501 + true_values ([str]): Sequence of strings that denote true Booleans in the data.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/csv_convert_options_column_type.py b/gooddata-api-client/gooddata_api_client/model/csv_convert_options_column_type.py new file mode 100644 index 000000000..f67fb8bd9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/csv_convert_options_column_type.py @@ -0,0 +1,272 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class CsvConvertOptionsColumnType(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'nullable': (bool,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'nullable': 'nullable', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CsvConvertOptionsColumnType - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): The column name.. [optional] # noqa: E501 + nullable (bool): Whether the data in the given column can be null.. [optional] # noqa: E501 + type (str): The column type.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CsvConvertOptionsColumnType - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): The column name.. [optional] # noqa: E501 + nullable (bool): Whether the data in the given column can be null.. [optional] # noqa: E501 + type (str): The column type.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/csv_manifest_body.py b/gooddata-api-client/gooddata_api_client/model/csv_manifest_body.py new file mode 100644 index 000000000..3ff3114b3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/csv_manifest_body.py @@ -0,0 +1,290 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.csv_convert_options import CsvConvertOptions + from gooddata_api_client.model.csv_parse_options import CsvParseOptions + from gooddata_api_client.model.csv_read_options import CsvReadOptions + globals()['CsvConvertOptions'] = CsvConvertOptions + globals()['CsvParseOptions'] = CsvParseOptions + globals()['CsvReadOptions'] = CsvReadOptions + + +class CsvManifestBody(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'column_date_formats': ({str: (str,)},), # noqa: E501 + 'convert': (CsvConvertOptions,), # noqa: E501 + 'parse': (CsvParseOptions,), # noqa: E501 + 'read': (CsvReadOptions,), # noqa: E501 + 'read_method': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'column_date_formats': 'column_date_formats', # noqa: E501 + 'convert': 'convert', # noqa: E501 + 'parse': 'parse', # noqa: E501 + 'read': 'read', # noqa: E501 + 'read_method': 'read_method', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CsvManifestBody - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + column_date_formats ({str: (str,)}): Map of column names to date formats to use when parsing them as dates.. [optional] # noqa: E501 + convert (CsvConvertOptions): [optional] # noqa: E501 + parse (CsvParseOptions): [optional] # noqa: E501 + read (CsvReadOptions): [optional] # noqa: E501 + read_method (str): Method used to read the CSV file.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CsvManifestBody - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + column_date_formats ({str: (str,)}): Map of column names to date formats to use when parsing them as dates.. [optional] # noqa: E501 + convert (CsvConvertOptions): [optional] # noqa: E501 + parse (CsvParseOptions): [optional] # noqa: E501 + read (CsvReadOptions): [optional] # noqa: E501 + read_method (str): Method used to read the CSV file.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/csv_parse_options.py b/gooddata-api-client/gooddata_api_client/model/csv_parse_options.py new file mode 100644 index 000000000..074f92a6c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/csv_parse_options.py @@ -0,0 +1,284 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class CsvParseOptions(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'delimiter': (str,), # noqa: E501 + 'double_quote': (bool,), # noqa: E501 + 'escape_char': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'ignore_empty_lines': (bool,), # noqa: E501 + 'newlines_in_values': (bool,), # noqa: E501 + 'quote_char': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'delimiter': 'delimiter', # noqa: E501 + 'double_quote': 'doubleQuote', # noqa: E501 + 'escape_char': 'escapeChar', # noqa: E501 + 'ignore_empty_lines': 'ignoreEmptyLines', # noqa: E501 + 'newlines_in_values': 'newlinesInValues', # noqa: E501 + 'quote_char': 'quoteChar', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CsvParseOptions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + delimiter (str): The character delimiting individual cells in the CSV data.. [optional] # noqa: E501 + double_quote (bool): Whether two quotes in a quoted CSV value denote a single quote in the data.. [optional] # noqa: E501 + escape_char ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The character used optionally for escaping special characters or false to disable escaping.. [optional] # noqa: E501 + ignore_empty_lines (bool): Whether empty lines are ignored in CSV input.. [optional] # noqa: E501 + newlines_in_values (bool): Whether newline characters are allowed in CSV values.. [optional] # noqa: E501 + quote_char ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The character used optionally for quoting CSV values or false to disable quoting.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CsvParseOptions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + delimiter (str): The character delimiting individual cells in the CSV data.. [optional] # noqa: E501 + double_quote (bool): Whether two quotes in a quoted CSV value denote a single quote in the data.. [optional] # noqa: E501 + escape_char ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The character used optionally for escaping special characters or false to disable escaping.. [optional] # noqa: E501 + ignore_empty_lines (bool): Whether empty lines are ignored in CSV input.. [optional] # noqa: E501 + newlines_in_values (bool): Whether newline characters are allowed in CSV values.. [optional] # noqa: E501 + quote_char ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The character used optionally for quoting CSV values or false to disable quoting.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/csv_read_options.py b/gooddata-api-client/gooddata_api_client/model/csv_read_options.py new file mode 100644 index 000000000..38e6ac180 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/csv_read_options.py @@ -0,0 +1,288 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class CsvReadOptions(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'auto_generate_column_names': (bool,), # noqa: E501 + 'block_size': (int,), # noqa: E501 + 'column_names': ([str],), # noqa: E501 + 'encoding': (str,), # noqa: E501 + 'skip_rows': (int,), # noqa: E501 + 'skip_rows_after_names': (int,), # noqa: E501 + 'use_threads': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'auto_generate_column_names': 'autoGenerateColumnNames', # noqa: E501 + 'block_size': 'blockSize', # noqa: E501 + 'column_names': 'columnNames', # noqa: E501 + 'encoding': 'encoding', # noqa: E501 + 'skip_rows': 'skipRows', # noqa: E501 + 'skip_rows_after_names': 'skipRowsAfterNames', # noqa: E501 + 'use_threads': 'useThreads', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CsvReadOptions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + auto_generate_column_names (bool): Whether to autogenerate column names if columnNames is empty.. [optional] # noqa: E501 + block_size (int): How many bytes to process at a time from the input stream.. [optional] # noqa: E501 + column_names ([str]): The column names of the target table.. [optional] # noqa: E501 + encoding (str): The character encoding of the CSV data.. [optional] # noqa: E501 + skip_rows (int): The number of rows to skip before the column names (if any) and the CSV data.. [optional] # noqa: E501 + skip_rows_after_names (int): The number of rows to skip after the column names.. [optional] # noqa: E501 + use_threads (bool): Whether to use multiple threads to accelerate reading.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CsvReadOptions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + auto_generate_column_names (bool): Whether to autogenerate column names if columnNames is empty.. [optional] # noqa: E501 + block_size (int): How many bytes to process at a time from the input stream.. [optional] # noqa: E501 + column_names ([str]): The column names of the target table.. [optional] # noqa: E501 + encoding (str): The character encoding of the CSV data.. [optional] # noqa: E501 + skip_rows (int): The number of rows to skip before the column names (if any) and the CSV data.. [optional] # noqa: E501 + skip_rows_after_names (int): The number of rows to skip after the column names.. [optional] # noqa: E501 + use_threads (bool): Whether to use multiple threads to accelerate reading.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/dashboard_context.py b/gooddata-api-client/gooddata_api_client/model/dashboard_context.py new file mode 100644 index 000000000..f60ea66b4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/dashboard_context.py @@ -0,0 +1,282 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.dashboard_context_widgets_inner import DashboardContextWidgetsInner + globals()['DashboardContextWidgetsInner'] = DashboardContextWidgetsInner + + +class DashboardContext(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'widgets': ([DashboardContextWidgetsInner],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'widgets': 'widgets', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, widgets, *args, **kwargs): # noqa: E501 + """DashboardContext - a model defined in OpenAPI + + Args: + id (str): Dashboard object ID. + widgets ([DashboardContextWidgetsInner]): Widgets currently visible on the dashboard. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.widgets = widgets + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, widgets, *args, **kwargs): # noqa: E501 + """DashboardContext - a model defined in OpenAPI + + Args: + id (str): Dashboard object ID. + widgets ([DashboardContextWidgetsInner]): Widgets currently visible on the dashboard. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.widgets = widgets + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/dashboard_context_widgets_inner.py b/gooddata-api-client/gooddata_api_client/model/dashboard_context_widgets_inner.py new file mode 100644 index 000000000..e1b801744 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/dashboard_context_widgets_inner.py @@ -0,0 +1,360 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.insight_widget_descriptor import InsightWidgetDescriptor + from gooddata_api_client.model.rich_text_widget_descriptor import RichTextWidgetDescriptor + from gooddata_api_client.model.visualization_switcher_widget_descriptor import VisualizationSwitcherWidgetDescriptor + globals()['InsightWidgetDescriptor'] = InsightWidgetDescriptor + globals()['RichTextWidgetDescriptor'] = RichTextWidgetDescriptor + globals()['VisualizationSwitcherWidgetDescriptor'] = VisualizationSwitcherWidgetDescriptor + + +class DashboardContextWidgetsInner(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'widget_type': (str,), # noqa: E501 + 'result_id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'widget_id': (str,), # noqa: E501 + 'active_visualization_id': (str,), # noqa: E501 + 'visualization_ids': ([str],), # noqa: E501 + 'visualization_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'InsightWidgetDescriptor': InsightWidgetDescriptor, + 'RichTextWidgetDescriptor': RichTextWidgetDescriptor, + 'VisualizationSwitcherWidgetDescriptor': VisualizationSwitcherWidgetDescriptor, + 'insight': InsightWidgetDescriptor, + 'richText': RichTextWidgetDescriptor, + 'visualizationSwitcher': VisualizationSwitcherWidgetDescriptor, + } + if not val: + return None + return {'widget_type': val} + + attribute_map = { + 'widget_type': 'widgetType', # noqa: E501 + 'result_id': 'resultId', # noqa: E501 + 'title': 'title', # noqa: E501 + 'widget_id': 'widgetId', # noqa: E501 + 'active_visualization_id': 'activeVisualizationId', # noqa: E501 + 'visualization_ids': 'visualizationIds', # noqa: E501 + 'visualization_id': 'visualizationId', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DashboardContextWidgetsInner - a model defined in OpenAPI + + Keyword Args: + widget_type (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + result_id (str): Signed result ID for the currently active visualization's execution result.. [optional] # noqa: E501 + title (str): Widget title as displayed on the dashboard.. [optional] # noqa: E501 + widget_id (str): Widget object ID.. [optional] # noqa: E501 + active_visualization_id (str): ID of the currently active visualization in the switcher.. [optional] # noqa: E501 + visualization_ids ([str]): IDs of all visualizations available in the switcher.. [optional] # noqa: E501 + visualization_id (str): Visualization object ID referenced by this insight widget.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DashboardContextWidgetsInner - a model defined in OpenAPI + + Keyword Args: + widget_type (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + result_id (str): Signed result ID for the currently active visualization's execution result.. [optional] # noqa: E501 + title (str): Widget title as displayed on the dashboard.. [optional] # noqa: E501 + widget_id (str): Widget object ID.. [optional] # noqa: E501 + active_visualization_id (str): ID of the currently active visualization in the switcher.. [optional] # noqa: E501 + visualization_ids ([str]): IDs of all visualizations available in the switcher.. [optional] # noqa: E501 + visualization_id (str): Visualization object ID referenced by this insight widget.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + ], + 'oneOf': [ + InsightWidgetDescriptor, + RichTextWidgetDescriptor, + VisualizationSwitcherWidgetDescriptor, + ], + } diff --git a/gooddata-api-client/gooddata_api_client/model/declarative_column.py b/gooddata-api-client/gooddata_api_client/model/declarative_column.py index 51a442ff4..dd2336224 100644 --- a/gooddata-api-client/gooddata_api_client/model/declarative_column.py +++ b/gooddata-api-client/gooddata_api_client/model/declarative_column.py @@ -70,6 +70,9 @@ class DeclarativeColumn(ModelNormal): validations = { ('name',): { 'max_length': 255, + 'regex': { + 'pattern': r'^[^]*$', # noqa: E501 + }, }, ('description',): { 'max_length': 10000, diff --git a/gooddata-api-client/gooddata_api_client/model/delete_files_request.py b/gooddata-api-client/gooddata_api_client/model/delete_files_request.py new file mode 100644 index 000000000..e8f9372d6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/delete_files_request.py @@ -0,0 +1,270 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class DeleteFilesRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'file_names': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'file_names': 'fileNames', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, file_names, *args, **kwargs): # noqa: E501 + """DeleteFilesRequest - a model defined in OpenAPI + + Args: + file_names ([str]): Names of the files to delete. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.file_names = file_names + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, file_names, *args, **kwargs): # noqa: E501 + """DeleteFilesRequest - a model defined in OpenAPI + + Args: + file_names ([str]): Names of the files to delete. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.file_names = file_names + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/gd_storage_file.py b/gooddata-api-client/gooddata_api_client/model/gd_storage_file.py new file mode 100644 index 000000000..d10290bb1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/gd_storage_file.py @@ -0,0 +1,293 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class GdStorageFile(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'CSV': "CSV", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'modified_at': (datetime,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'size': (int,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'modified_at': 'modifiedAt', # noqa: E501 + 'name': 'name', # noqa: E501 + 'size': 'size', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, modified_at, name, size, *args, **kwargs): # noqa: E501 + """GdStorageFile - a model defined in OpenAPI + + Args: + modified_at (datetime): Last modification timestamp of the file. + name (str): Name of the file. + size (int): Size of the file in bytes. + + Keyword Args: + type (str): Type of the file.. defaults to "CSV", must be one of ["CSV", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "CSV") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.modified_at = modified_at + self.name = name + self.size = size + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, modified_at, name, size, *args, **kwargs): # noqa: E501 + """GdStorageFile - a model defined in OpenAPI + + Args: + modified_at (datetime): Last modification timestamp of the file. + name (str): Name of the file. + size (int): Size of the file in bytes. + + Keyword Args: + type (str): Type of the file.. defaults to "CSV", must be one of ["CSV", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "CSV") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.modified_at = modified_at + self.name = name + self.size = size + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/geo_json_feature.py b/gooddata-api-client/gooddata_api_client/model/geo_json_feature.py new file mode 100644 index 000000000..df6bd86b1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/geo_json_feature.py @@ -0,0 +1,290 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.geo_json_geometry import GeoJsonGeometry + globals()['GeoJsonGeometry'] = GeoJsonGeometry + + +class GeoJsonFeature(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'properties': ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},), # noqa: E501 + 'type': (str,), # noqa: E501 + 'geometry': (GeoJsonGeometry,), # noqa: E501 + 'id': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'properties': 'properties', # noqa: E501 + 'type': 'type', # noqa: E501 + 'geometry': 'geometry', # noqa: E501 + 'id': 'id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, properties, type, *args, **kwargs): # noqa: E501 + """GeoJsonFeature - a model defined in OpenAPI + + Args: + properties ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}): + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + geometry (GeoJsonGeometry): [optional] # noqa: E501 + id ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.properties = properties + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, properties, type, *args, **kwargs): # noqa: E501 + """GeoJsonFeature - a model defined in OpenAPI + + Args: + properties ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}): + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + geometry (GeoJsonGeometry): [optional] # noqa: E501 + id ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.properties = properties + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/geo_json_feature_collection.py b/gooddata-api-client/gooddata_api_client/model/geo_json_feature_collection.py new file mode 100644 index 000000000..589a9b4a9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/geo_json_feature_collection.py @@ -0,0 +1,286 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.geo_json_feature import GeoJsonFeature + globals()['GeoJsonFeature'] = GeoJsonFeature + + +class GeoJsonFeatureCollection(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'features': ([GeoJsonFeature],), # noqa: E501 + 'type': (str,), # noqa: E501 + 'bbox': ([float],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'features': 'features', # noqa: E501 + 'type': 'type', # noqa: E501 + 'bbox': 'bbox', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, features, type, *args, **kwargs): # noqa: E501 + """GeoJsonFeatureCollection - a model defined in OpenAPI + + Args: + features ([GeoJsonFeature]): + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + bbox ([float]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.features = features + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, features, type, *args, **kwargs): # noqa: E501 + """GeoJsonFeatureCollection - a model defined in OpenAPI + + Args: + features ([GeoJsonFeature]): + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + bbox ([float]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.features = features + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/geo_json_geometry.py b/gooddata-api-client/gooddata_api_client/model/geo_json_geometry.py new file mode 100644 index 000000000..7ca210bac --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/geo_json_geometry.py @@ -0,0 +1,276 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class GeoJsonGeometry(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'coordinates': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'coordinates': 'coordinates', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, coordinates, type, *args, **kwargs): # noqa: E501 + """GeoJsonGeometry - a model defined in OpenAPI + + Args: + coordinates ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.coordinates = coordinates + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, coordinates, type, *args, **kwargs): # noqa: E501 + """GeoJsonGeometry - a model defined in OpenAPI + + Args: + coordinates ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.coordinates = coordinates + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/get_service_status_response.py b/gooddata-api-client/gooddata_api_client/model/get_service_status_response.py new file mode 100644 index 000000000..369c9f76a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/get_service_status_response.py @@ -0,0 +1,276 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.json_node import JsonNode + globals()['JsonNode'] = JsonNode + + +class GetServiceStatusResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'status': (JsonNode,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status': 'status', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, status, *args, **kwargs): # noqa: E501 + """GetServiceStatusResponse - a model defined in OpenAPI + + Args: + status (JsonNode): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.status = status + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, status, *args, **kwargs): # noqa: E501 + """GetServiceStatusResponse - a model defined in OpenAPI + + Args: + status (JsonNode): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.status = status + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/import_csv_request.py b/gooddata-api-client/gooddata_api_client/model/import_csv_request.py new file mode 100644 index 000000000..1eef52e38 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/import_csv_request.py @@ -0,0 +1,276 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.import_csv_request_table import ImportCsvRequestTable + globals()['ImportCsvRequestTable'] = ImportCsvRequestTable + + +class ImportCsvRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'tables': ([ImportCsvRequestTable],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'tables': 'tables', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, tables, *args, **kwargs): # noqa: E501 + """ImportCsvRequest - a model defined in OpenAPI + + Args: + tables ([ImportCsvRequestTable]): Information about the individual tables. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.tables = tables + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, tables, *args, **kwargs): # noqa: E501 + """ImportCsvRequest - a model defined in OpenAPI + + Args: + tables ([ImportCsvRequestTable]): Information about the individual tables. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.tables = tables + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/import_csv_request_table.py b/gooddata-api-client/gooddata_api_client/model/import_csv_request_table.py new file mode 100644 index 000000000..e8c1c2de2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/import_csv_request_table.py @@ -0,0 +1,282 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.import_csv_request_table_source import ImportCsvRequestTableSource + globals()['ImportCsvRequestTableSource'] = ImportCsvRequestTableSource + + +class ImportCsvRequestTable(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'source': (ImportCsvRequestTableSource,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'source': 'source', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, source, *args, **kwargs): # noqa: E501 + """ImportCsvRequestTable - a model defined in OpenAPI + + Args: + name (str): Name of the table. + source (ImportCsvRequestTableSource): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.source = source + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, source, *args, **kwargs): # noqa: E501 + """ImportCsvRequestTable - a model defined in OpenAPI + + Args: + name (str): Name of the table. + source (ImportCsvRequestTableSource): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.source = source + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/import_csv_request_table_source.py b/gooddata-api-client/gooddata_api_client/model/import_csv_request_table_source.py new file mode 100644 index 000000000..920283dac --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/import_csv_request_table_source.py @@ -0,0 +1,282 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.import_csv_request_table_source_config import ImportCsvRequestTableSourceConfig + globals()['ImportCsvRequestTableSourceConfig'] = ImportCsvRequestTableSourceConfig + + +class ImportCsvRequestTableSource(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'config': (ImportCsvRequestTableSourceConfig,), # noqa: E501 + 'location': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'config': 'config', # noqa: E501 + 'location': 'location', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, config, location, *args, **kwargs): # noqa: E501 + """ImportCsvRequestTableSource - a model defined in OpenAPI + + Args: + config (ImportCsvRequestTableSourceConfig): + location (str): Location of the data in the staging area. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.config = config + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, config, location, *args, **kwargs): # noqa: E501 + """ImportCsvRequestTableSource - a model defined in OpenAPI + + Args: + config (ImportCsvRequestTableSourceConfig): + location (str): Location of the data in the staging area. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.config = config + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/import_csv_request_table_source_config.py b/gooddata-api-client/gooddata_api_client/model/import_csv_request_table_source_config.py new file mode 100644 index 000000000..3019ab918 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/import_csv_request_table_source_config.py @@ -0,0 +1,286 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.csv_convert_options import CsvConvertOptions + from gooddata_api_client.model.csv_parse_options import CsvParseOptions + from gooddata_api_client.model.csv_read_options import CsvReadOptions + globals()['CsvConvertOptions'] = CsvConvertOptions + globals()['CsvParseOptions'] = CsvParseOptions + globals()['CsvReadOptions'] = CsvReadOptions + + +class ImportCsvRequestTableSourceConfig(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'column_date_formats': ({str: (str,)},), # noqa: E501 + 'convert_options': (CsvConvertOptions,), # noqa: E501 + 'parse_options': (CsvParseOptions,), # noqa: E501 + 'read_options': (CsvReadOptions,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'column_date_formats': 'columnDateFormats', # noqa: E501 + 'convert_options': 'convertOptions', # noqa: E501 + 'parse_options': 'parseOptions', # noqa: E501 + 'read_options': 'readOptions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ImportCsvRequestTableSourceConfig - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + column_date_formats ({str: (str,)}): Date formats to use to use to read the given columns.. [optional] # noqa: E501 + convert_options (CsvConvertOptions): [optional] # noqa: E501 + parse_options (CsvParseOptions): [optional] # noqa: E501 + read_options (CsvReadOptions): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ImportCsvRequestTableSourceConfig - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + column_date_formats ({str: (str,)}): Date formats to use to use to read the given columns.. [optional] # noqa: E501 + convert_options (CsvConvertOptions): [optional] # noqa: E501 + parse_options (CsvParseOptions): [optional] # noqa: E501 + read_options (CsvReadOptions): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/import_csv_response.py b/gooddata-api-client/gooddata_api_client/model/import_csv_response.py new file mode 100644 index 000000000..9dc90c763 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/import_csv_response.py @@ -0,0 +1,276 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class ImportCsvResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'version': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'version': 'version', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, version, *args, **kwargs): # noqa: E501 + """ImportCsvResponse - a model defined in OpenAPI + + Args: + name (str): Name of the table the file was imported to. + version (int): Version the file was imported as. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.version = version + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, version, *args, **kwargs): # noqa: E501 + """ImportCsvResponse - a model defined in OpenAPI + + Args: + name (str): Name of the table the file was imported to. + version (int): Version the file was imported as. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.version = version + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/import_geo_collection_request.py b/gooddata-api-client/gooddata_api_client/model/import_geo_collection_request.py new file mode 100644 index 000000000..26752f9ab --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/import_geo_collection_request.py @@ -0,0 +1,270 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class ImportGeoCollectionRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'location': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'location': 'location', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, location, *args, **kwargs): # noqa: E501 + """ImportGeoCollectionRequest - a model defined in OpenAPI + + Args: + location (str): Location of the file in the staging area. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, location, *args, **kwargs): # noqa: E501 + """ImportGeoCollectionRequest - a model defined in OpenAPI + + Args: + location (str): Location of the file in the staging area. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/import_geo_collection_response.py b/gooddata-api-client/gooddata_api_client/model/import_geo_collection_response.py new file mode 100644 index 000000000..e85a5cadd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/import_geo_collection_response.py @@ -0,0 +1,270 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class ImportGeoCollectionResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'version': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'version': 'version', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, version, *args, **kwargs): # noqa: E501 + """ImportGeoCollectionResponse - a model defined in OpenAPI + + Args: + version (int): The version of the imported geo collection. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.version = version + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, version, *args, **kwargs): # noqa: E501 + """ImportGeoCollectionResponse - a model defined in OpenAPI + + Args: + version (int): The version of the imported geo collection. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.version = version + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/insight_widget_descriptor.py b/gooddata-api-client/gooddata_api_client/model/insight_widget_descriptor.py new file mode 100644 index 000000000..d933983cf --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/insight_widget_descriptor.py @@ -0,0 +1,342 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.insight_widget_descriptor_all_of import InsightWidgetDescriptorAllOf + from gooddata_api_client.model.widget_descriptor import WidgetDescriptor + globals()['InsightWidgetDescriptorAllOf'] = InsightWidgetDescriptorAllOf + globals()['WidgetDescriptor'] = WidgetDescriptor + + +class InsightWidgetDescriptor(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'title': (str,), # noqa: E501 + 'visualization_id': (str,), # noqa: E501 + 'widget_id': (str,), # noqa: E501 + 'widget_type': (str,), # noqa: E501 + 'result_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + val = { + } + if not val: + return None + return {'widget_type': val} + + attribute_map = { + 'title': 'title', # noqa: E501 + 'visualization_id': 'visualizationId', # noqa: E501 + 'widget_id': 'widgetId', # noqa: E501 + 'widget_type': 'widgetType', # noqa: E501 + 'result_id': 'resultId', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """InsightWidgetDescriptor - a model defined in OpenAPI + + Keyword Args: + title (str): Widget title as displayed on the dashboard. + visualization_id (str): Visualization object ID referenced by this insight widget. + widget_id (str): Widget object ID. + widget_type (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + result_id (str): Signed result ID for this widget's cached execution result.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """InsightWidgetDescriptor - a model defined in OpenAPI + + Keyword Args: + title (str): Widget title as displayed on the dashboard. + visualization_id (str): Visualization object ID referenced by this insight widget. + widget_id (str): Widget object ID. + widget_type (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + result_id (str): Signed result ID for this widget's cached execution result.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + InsightWidgetDescriptorAllOf, + WidgetDescriptor, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-api-client/gooddata_api_client/model/insight_widget_descriptor_all_of.py b/gooddata-api-client/gooddata_api_client/model/insight_widget_descriptor_all_of.py new file mode 100644 index 000000000..cb25bd554 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/insight_widget_descriptor_all_of.py @@ -0,0 +1,276 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class InsightWidgetDescriptorAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'result_id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'visualization_id': (str,), # noqa: E501 + 'widget_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'result_id': 'resultId', # noqa: E501 + 'title': 'title', # noqa: E501 + 'visualization_id': 'visualizationId', # noqa: E501 + 'widget_id': 'widgetId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """InsightWidgetDescriptorAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + result_id (str): Signed result ID for this widget's cached execution result.. [optional] # noqa: E501 + title (str): Widget title as displayed on the dashboard.. [optional] # noqa: E501 + visualization_id (str): Visualization object ID referenced by this insight widget.. [optional] # noqa: E501 + widget_id (str): Widget object ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """InsightWidgetDescriptorAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + result_id (str): Signed result ID for this widget's cached execution result.. [optional] # noqa: E501 + title (str): Widget title as displayed on the dashboard.. [optional] # noqa: E501 + visualization_id (str): Visualization object ID referenced by this insight widget.. [optional] # noqa: E501 + widget_id (str): Widget object ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/list_llm_provider_models_request.py b/gooddata-api-client/gooddata_api_client/model/list_llm_provider_models_request.py new file mode 100644 index 000000000..c5e8668a1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/list_llm_provider_models_request.py @@ -0,0 +1,276 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.list_llm_provider_models_request_provider_config import ListLlmProviderModelsRequestProviderConfig + globals()['ListLlmProviderModelsRequestProviderConfig'] = ListLlmProviderModelsRequestProviderConfig + + +class ListLlmProviderModelsRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'provider_config': (ListLlmProviderModelsRequestProviderConfig,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'provider_config': 'providerConfig', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, provider_config, *args, **kwargs): # noqa: E501 + """ListLlmProviderModelsRequest - a model defined in OpenAPI + + Args: + provider_config (ListLlmProviderModelsRequestProviderConfig): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.provider_config = provider_config + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, provider_config, *args, **kwargs): # noqa: E501 + """ListLlmProviderModelsRequest - a model defined in OpenAPI + + Args: + provider_config (ListLlmProviderModelsRequestProviderConfig): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.provider_config = provider_config + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/list_llm_provider_models_request_provider_config.py b/gooddata-api-client/gooddata_api_client/model/list_llm_provider_models_request_provider_config.py new file mode 100644 index 000000000..21d26004d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/list_llm_provider_models_request_provider_config.py @@ -0,0 +1,363 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.aws_bedrock_provider_config import AwsBedrockProviderConfig + from gooddata_api_client.model.azure_foundry_provider_config import AzureFoundryProviderConfig + from gooddata_api_client.model.open_ai_provider_auth import OpenAiProviderAuth + from gooddata_api_client.model.open_ai_provider_config import OpenAIProviderConfig + globals()['AwsBedrockProviderConfig'] = AwsBedrockProviderConfig + globals()['AzureFoundryProviderConfig'] = AzureFoundryProviderConfig + globals()['OpenAIProviderConfig'] = OpenAIProviderConfig + globals()['OpenAiProviderAuth'] = OpenAiProviderAuth + + +class ListLlmProviderModelsRequestProviderConfig(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'OPENAI': "OPENAI", + }, + } + + validations = { + ('base_url',): { + 'max_length': 255, + }, + ('organization',): { + 'max_length': 255, + }, + ('region',): { + 'max_length': 255, + }, + ('endpoint',): { + 'max_length': 255, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'base_url': (str,), # noqa: E501 + 'organization': (str, none_type,), # noqa: E501 + 'auth': (OpenAiProviderAuth,), # noqa: E501 + 'region': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'endpoint': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'base_url': 'baseUrl', # noqa: E501 + 'organization': 'organization', # noqa: E501 + 'auth': 'auth', # noqa: E501 + 'region': 'region', # noqa: E501 + 'type': 'type', # noqa: E501 + 'endpoint': 'endpoint', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ListLlmProviderModelsRequestProviderConfig - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + base_url (str): Custom base URL for OpenAI API.. [optional] if omitted the server will use the default value of "https://api.openai.com/v1" # noqa: E501 + organization (str, none_type): OpenAI organization ID.. [optional] # noqa: E501 + auth (OpenAiProviderAuth): [optional] # noqa: E501 + region (str): AWS region for Bedrock.. [optional] # noqa: E501 + type (str): Provider type.. [optional] if omitted the server will use the default value of "OPENAI" # noqa: E501 + endpoint (str): Azure OpenAI endpoint URL.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ListLlmProviderModelsRequestProviderConfig - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + base_url (str): Custom base URL for OpenAI API.. [optional] if omitted the server will use the default value of "https://api.openai.com/v1" # noqa: E501 + organization (str, none_type): OpenAI organization ID.. [optional] # noqa: E501 + auth (OpenAiProviderAuth): [optional] # noqa: E501 + region (str): AWS region for Bedrock.. [optional] # noqa: E501 + type (str): Provider type.. [optional] if omitted the server will use the default value of "OPENAI" # noqa: E501 + endpoint (str): Azure OpenAI endpoint URL.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + ], + 'oneOf': [ + AwsBedrockProviderConfig, + AzureFoundryProviderConfig, + OpenAIProviderConfig, + ], + } diff --git a/gooddata-api-client/gooddata_api_client/model/list_llm_provider_models_response.py b/gooddata-api-client/gooddata_api_client/model/list_llm_provider_models_response.py new file mode 100644 index 000000000..1a96206e6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/list_llm_provider_models_response.py @@ -0,0 +1,288 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.llm_model import LlmModel + globals()['LlmModel'] = LlmModel + + +class ListLlmProviderModelsResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'message': (str,), # noqa: E501 + 'models': ([LlmModel],), # noqa: E501 + 'success': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'message': 'message', # noqa: E501 + 'models': 'models', # noqa: E501 + 'success': 'success', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, message, models, success, *args, **kwargs): # noqa: E501 + """ListLlmProviderModelsResponse - a model defined in OpenAPI + + Args: + message (str): Message about the listing result. + models ([LlmModel]): Available models on the provider. + success (bool): Whether the model listing succeeded. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.message = message + self.models = models + self.success = success + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, message, models, success, *args, **kwargs): # noqa: E501 + """ListLlmProviderModelsResponse - a model defined in OpenAPI + + Args: + message (str): Message about the listing result. + models ([LlmModel]): Available models on the provider. + success (bool): Whether the model listing succeeded. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.message = message + self.models = models + self.success = success + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/object_reference.py b/gooddata-api-client/gooddata_api_client/model/object_reference.py new file mode 100644 index 000000000..32c87649c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/object_reference.py @@ -0,0 +1,282 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class ObjectReference(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'WIDGET': "WIDGET", + 'METRIC': "METRIC", + 'ATTRIBUTE': "ATTRIBUTE", + 'DASHBOARD': "DASHBOARD", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, type, *args, **kwargs): # noqa: E501 + """ObjectReference - a model defined in OpenAPI + + Args: + id (str): Object identifier (e.g. widget ID, metric ID). + type (str): Type of the referenced object. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, type, *args, **kwargs): # noqa: E501 + """ObjectReference - a model defined in OpenAPI + + Args: + id (str): Object identifier (e.g. widget ID, metric ID). + type (str): Type of the referenced object. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/object_reference_group.py b/gooddata-api-client/gooddata_api_client/model/object_reference_group.py new file mode 100644 index 000000000..498d76634 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/object_reference_group.py @@ -0,0 +1,280 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.object_reference import ObjectReference + globals()['ObjectReference'] = ObjectReference + + +class ObjectReferenceGroup(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'objects': ([ObjectReference],), # noqa: E501 + 'context': (ObjectReference,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'objects': 'objects', # noqa: E501 + 'context': 'context', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, objects, *args, **kwargs): # noqa: E501 + """ObjectReferenceGroup - a model defined in OpenAPI + + Args: + objects ([ObjectReference]): Objects the user explicitly referenced within this context. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + context (ObjectReference): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.objects = objects + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, objects, *args, **kwargs): # noqa: E501 + """ObjectReferenceGroup - a model defined in OpenAPI + + Args: + objects ([ObjectReference]): Objects the user explicitly referenced within this context. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + context (ObjectReference): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.objects = objects + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/organization_cache_settings.py b/gooddata-api-client/gooddata_api_client/model/organization_cache_settings.py new file mode 100644 index 000000000..4d500dba8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/organization_cache_settings.py @@ -0,0 +1,270 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class OrganizationCacheSettings(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'extra_cache_budget': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'extra_cache_budget': 'extraCacheBudget', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, extra_cache_budget, *args, **kwargs): # noqa: E501 + """OrganizationCacheSettings - a model defined in OpenAPI + + Args: + extra_cache_budget (int): Extra cache budget the organization can allocate among its workspaces, in bytes. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.extra_cache_budget = extra_cache_budget + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, extra_cache_budget, *args, **kwargs): # noqa: E501 + """OrganizationCacheSettings - a model defined in OpenAPI + + Args: + extra_cache_budget (int): Extra cache budget the organization can allocate among its workspaces, in bytes. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.extra_cache_budget = extra_cache_budget + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/organization_cache_usage.py b/gooddata-api-client/gooddata_api_client/model/organization_cache_usage.py new file mode 100644 index 000000000..5ddbaced0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/organization_cache_usage.py @@ -0,0 +1,292 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.cache_removal_interval import CacheRemovalInterval + from gooddata_api_client.model.organization_cache_settings import OrganizationCacheSettings + from gooddata_api_client.model.organization_current_cache_usage import OrganizationCurrentCacheUsage + globals()['CacheRemovalInterval'] = CacheRemovalInterval + globals()['OrganizationCacheSettings'] = OrganizationCacheSettings + globals()['OrganizationCurrentCacheUsage'] = OrganizationCurrentCacheUsage + + +class OrganizationCacheUsage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'current': (OrganizationCurrentCacheUsage,), # noqa: E501 + 'removal_intervals': ([CacheRemovalInterval],), # noqa: E501 + 'settings': (OrganizationCacheSettings,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'current': 'current', # noqa: E501 + 'removal_intervals': 'removalIntervals', # noqa: E501 + 'settings': 'settings', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, current, removal_intervals, settings, *args, **kwargs): # noqa: E501 + """OrganizationCacheUsage - a model defined in OpenAPI + + Args: + current (OrganizationCurrentCacheUsage): + removal_intervals ([CacheRemovalInterval]): List of cache removal intervals. + settings (OrganizationCacheSettings): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.current = current + self.removal_intervals = removal_intervals + self.settings = settings + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, current, removal_intervals, settings, *args, **kwargs): # noqa: E501 + """OrganizationCacheUsage - a model defined in OpenAPI + + Args: + current (OrganizationCurrentCacheUsage): + removal_intervals ([CacheRemovalInterval]): List of cache removal intervals. + settings (OrganizationCacheSettings): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.current = current + self.removal_intervals = removal_intervals + self.settings = settings + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/organization_current_cache_usage.py b/gooddata-api-client/gooddata_api_client/model/organization_current_cache_usage.py new file mode 100644 index 000000000..db0b3ceba --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/organization_current_cache_usage.py @@ -0,0 +1,280 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class OrganizationCurrentCacheUsage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'cache_used': (int,), # noqa: E501 + 'removed_since_start': (int,), # noqa: E501 + 'removal_period_start': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'cache_used': 'cacheUsed', # noqa: E501 + 'removed_since_start': 'removedSinceStart', # noqa: E501 + 'removal_period_start': 'removalPeriodStart', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, cache_used, removed_since_start, *args, **kwargs): # noqa: E501 + """OrganizationCurrentCacheUsage - a model defined in OpenAPI + + Args: + cache_used (int): Cache currently used by the organization, in bytes. + removed_since_start (int): Bytes removed since start due to insufficient cache. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + removal_period_start (datetime): Start timestamp of removal period.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.cache_used = cache_used + self.removed_since_start = removed_since_start + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, cache_used, removed_since_start, *args, **kwargs): # noqa: E501 + """OrganizationCurrentCacheUsage - a model defined in OpenAPI + + Args: + cache_used (int): Cache currently used by the organization, in bytes. + removed_since_start (int): Bytes removed since start due to insufficient cache. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + removal_period_start (datetime): Start timestamp of removal period.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.cache_used = cache_used + self.removed_since_start = removed_since_start + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/read_csv_file_manifests_request.py b/gooddata-api-client/gooddata_api_client/model/read_csv_file_manifests_request.py new file mode 100644 index 000000000..a7d7ad9d4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/read_csv_file_manifests_request.py @@ -0,0 +1,276 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.read_csv_file_manifests_request_item import ReadCsvFileManifestsRequestItem + globals()['ReadCsvFileManifestsRequestItem'] = ReadCsvFileManifestsRequestItem + + +class ReadCsvFileManifestsRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'manifest_requests': ([ReadCsvFileManifestsRequestItem],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'manifest_requests': 'manifestRequests', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, manifest_requests, *args, **kwargs): # noqa: E501 + """ReadCsvFileManifestsRequest - a model defined in OpenAPI + + Args: + manifest_requests ([ReadCsvFileManifestsRequestItem]): Files to read the manifests for. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.manifest_requests = manifest_requests + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, manifest_requests, *args, **kwargs): # noqa: E501 + """ReadCsvFileManifestsRequest - a model defined in OpenAPI + + Args: + manifest_requests ([ReadCsvFileManifestsRequestItem]): Files to read the manifests for. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.manifest_requests = manifest_requests + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/read_csv_file_manifests_request_item.py b/gooddata-api-client/gooddata_api_client/model/read_csv_file_manifests_request_item.py new file mode 100644 index 000000000..bf77f4d65 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/read_csv_file_manifests_request_item.py @@ -0,0 +1,274 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class ReadCsvFileManifestsRequestItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'file_name': (str,), # noqa: E501 + 'version': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'file_name': 'fileName', # noqa: E501 + 'version': 'version', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, file_name, *args, **kwargs): # noqa: E501 + """ReadCsvFileManifestsRequestItem - a model defined in OpenAPI + + Args: + file_name (str): Name of the CSV file to read the manifest for. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + version (int): Optional version of the file to read the manifest for. If null or not specified, the latest version is read.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.file_name = file_name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, file_name, *args, **kwargs): # noqa: E501 + """ReadCsvFileManifestsRequestItem - a model defined in OpenAPI + + Args: + file_name (str): Name of the CSV file to read the manifest for. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + version (int): Optional version of the file to read the manifest for. If null or not specified, the latest version is read.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.file_name = file_name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/read_csv_file_manifests_response.py b/gooddata-api-client/gooddata_api_client/model/read_csv_file_manifests_response.py new file mode 100644 index 000000000..68f42a3d3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/read_csv_file_manifests_response.py @@ -0,0 +1,288 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.csv_manifest_body import CsvManifestBody + globals()['CsvManifestBody'] = CsvManifestBody + + +class ReadCsvFileManifestsResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'manifest': (CsvManifestBody,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'version': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'manifest': 'manifest', # noqa: E501 + 'name': 'name', # noqa: E501 + 'version': 'version', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, manifest, name, version, *args, **kwargs): # noqa: E501 + """ReadCsvFileManifestsResponse - a model defined in OpenAPI + + Args: + manifest (CsvManifestBody): + name (str): Name of the file in the source data source. + version (int): Version of the file in the source data source. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.manifest = manifest + self.name = name + self.version = version + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, manifest, name, version, *args, **kwargs): # noqa: E501 + """ReadCsvFileManifestsResponse - a model defined in OpenAPI + + Args: + manifest (CsvManifestBody): + name (str): Name of the file in the source data source. + version (int): Version of the file in the source data source. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.manifest = manifest + self.name = name + self.version = version + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/rich_text_widget_descriptor.py b/gooddata-api-client/gooddata_api_client/model/rich_text_widget_descriptor.py new file mode 100644 index 000000000..7ba548ee4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/rich_text_widget_descriptor.py @@ -0,0 +1,334 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.rich_text_widget_descriptor_all_of import RichTextWidgetDescriptorAllOf + from gooddata_api_client.model.widget_descriptor import WidgetDescriptor + globals()['RichTextWidgetDescriptorAllOf'] = RichTextWidgetDescriptorAllOf + globals()['WidgetDescriptor'] = WidgetDescriptor + + +class RichTextWidgetDescriptor(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'title': (str,), # noqa: E501 + 'widget_id': (str,), # noqa: E501 + 'widget_type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + val = { + } + if not val: + return None + return {'widget_type': val} + + attribute_map = { + 'title': 'title', # noqa: E501 + 'widget_id': 'widgetId', # noqa: E501 + 'widget_type': 'widgetType', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RichTextWidgetDescriptor - a model defined in OpenAPI + + Keyword Args: + title (str): Widget title as displayed on the dashboard. + widget_id (str): Widget object ID. + widget_type (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RichTextWidgetDescriptor - a model defined in OpenAPI + + Keyword Args: + title (str): Widget title as displayed on the dashboard. + widget_id (str): Widget object ID. + widget_type (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + RichTextWidgetDescriptorAllOf, + WidgetDescriptor, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-api-client/gooddata_api_client/model/rich_text_widget_descriptor_all_of.py b/gooddata-api-client/gooddata_api_client/model/rich_text_widget_descriptor_all_of.py new file mode 100644 index 000000000..2fe02853d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/rich_text_widget_descriptor_all_of.py @@ -0,0 +1,268 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class RichTextWidgetDescriptorAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'title': (str,), # noqa: E501 + 'widget_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'widget_id': 'widgetId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RichTextWidgetDescriptorAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): Widget title as displayed on the dashboard.. [optional] # noqa: E501 + widget_id (str): Widget object ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RichTextWidgetDescriptorAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): Widget title as displayed on the dashboard.. [optional] # noqa: E501 + widget_id (str): Widget object ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/test_llm_provider_by_id_request.py b/gooddata-api-client/gooddata_api_client/model/test_llm_provider_by_id_request.py new file mode 100644 index 000000000..1cd1a741f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/test_llm_provider_by_id_request.py @@ -0,0 +1,276 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.list_llm_provider_models_request_provider_config import ListLlmProviderModelsRequestProviderConfig + from gooddata_api_client.model.llm_model import LlmModel + globals()['ListLlmProviderModelsRequestProviderConfig'] = ListLlmProviderModelsRequestProviderConfig + globals()['LlmModel'] = LlmModel + + +class TestLlmProviderByIdRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'models': ([LlmModel],), # noqa: E501 + 'provider_config': (ListLlmProviderModelsRequestProviderConfig,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'models': 'models', # noqa: E501 + 'provider_config': 'providerConfig', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TestLlmProviderByIdRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + models ([LlmModel]): Models overrides.. [optional] # noqa: E501 + provider_config (ListLlmProviderModelsRequestProviderConfig): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TestLlmProviderByIdRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + models ([LlmModel]): Models overrides.. [optional] # noqa: E501 + provider_config (ListLlmProviderModelsRequestProviderConfig): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/tool_call_event_result.py b/gooddata-api-client/gooddata_api_client/model/tool_call_event_result.py new file mode 100644 index 000000000..95d5e95fa --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/tool_call_event_result.py @@ -0,0 +1,282 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class ToolCallEventResult(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'function_arguments': (str,), # noqa: E501 + 'function_name': (str,), # noqa: E501 + 'result': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'function_arguments': 'functionArguments', # noqa: E501 + 'function_name': 'functionName', # noqa: E501 + 'result': 'result', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, function_arguments, function_name, result, *args, **kwargs): # noqa: E501 + """ToolCallEventResult - a model defined in OpenAPI + + Args: + function_arguments (str): JSON-encoded arguments passed to the tool function. + function_name (str): Name of the tool function that was called. + result (str): Result returned by the tool function. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.function_arguments = function_arguments + self.function_name = function_name + self.result = result + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, function_arguments, function_name, result, *args, **kwargs): # noqa: E501 + """ToolCallEventResult - a model defined in OpenAPI + + Args: + function_arguments (str): JSON-encoded arguments passed to the tool function. + function_name (str): Name of the tool function that was called. + result (str): Result returned by the tool function. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.function_arguments = function_arguments + self.function_name = function_name + self.result = result + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/trending_object_item.py b/gooddata-api-client/gooddata_api_client/model/trending_object_item.py new file mode 100644 index 000000000..8b6f7ccfc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/trending_object_item.py @@ -0,0 +1,348 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class TrendingObjectItem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + 'title': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'usage_count': (int,), # noqa: E501 + 'workspace_id': (str,), # noqa: E501 + 'created_at': (datetime,), # noqa: E501 + 'created_by': (str,), # noqa: E501 + 'dataset_id': (str,), # noqa: E501 + 'dataset_title': (str,), # noqa: E501 + 'dataset_type': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'is_hidden': (bool,), # noqa: E501 + 'is_hidden_from_kda': (bool,), # noqa: E501 + 'metric_type': (str,), # noqa: E501 + 'modified_at': (datetime,), # noqa: E501 + 'modified_by': (str,), # noqa: E501 + 'visualization_url': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'tags': 'tags', # noqa: E501 + 'title': 'title', # noqa: E501 + 'type': 'type', # noqa: E501 + 'usage_count': 'usageCount', # noqa: E501 + 'workspace_id': 'workspaceId', # noqa: E501 + 'created_at': 'createdAt', # noqa: E501 + 'created_by': 'createdBy', # noqa: E501 + 'dataset_id': 'datasetId', # noqa: E501 + 'dataset_title': 'datasetTitle', # noqa: E501 + 'dataset_type': 'datasetType', # noqa: E501 + 'description': 'description', # noqa: E501 + 'is_hidden': 'isHidden', # noqa: E501 + 'is_hidden_from_kda': 'isHiddenFromKda', # noqa: E501 + 'metric_type': 'metricType', # noqa: E501 + 'modified_at': 'modifiedAt', # noqa: E501 + 'modified_by': 'modifiedBy', # noqa: E501 + 'visualization_url': 'visualizationUrl', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, tags, title, type, usage_count, workspace_id, *args, **kwargs): # noqa: E501 + """TrendingObjectItem - a model defined in OpenAPI + + Args: + id (str): Object ID. + tags ([str]): + title (str): Object title. + type (str): Object type, e.g. dashboard, visualization, metric. + usage_count (int): Number of times this object has been used/referenced. + workspace_id (str): Workspace ID the object belongs to. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + created_at (datetime): Timestamp when object was created.. [optional] # noqa: E501 + created_by (str): ID of the user who created the object.. [optional] # noqa: E501 + dataset_id (str): ID of the associated dataset, if applicable.. [optional] # noqa: E501 + dataset_title (str): Title of the associated dataset, if applicable.. [optional] # noqa: E501 + dataset_type (str): Type of the associated dataset, if applicable.. [optional] # noqa: E501 + description (str): Object description.. [optional] # noqa: E501 + is_hidden (bool): If true, this object is hidden from AI search results by default.. [optional] # noqa: E501 + is_hidden_from_kda (bool): If true, this object is hidden from KDA.. [optional] # noqa: E501 + metric_type (str): Type of the metric (e.g. MAQL), if applicable.. [optional] # noqa: E501 + modified_at (datetime): Timestamp when object was last modified.. [optional] # noqa: E501 + modified_by (str): ID of the user who last modified the object.. [optional] # noqa: E501 + visualization_url (str): URL of the visualization, if applicable.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.tags = tags + self.title = title + self.type = type + self.usage_count = usage_count + self.workspace_id = workspace_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, tags, title, type, usage_count, workspace_id, *args, **kwargs): # noqa: E501 + """TrendingObjectItem - a model defined in OpenAPI + + Args: + id (str): Object ID. + tags ([str]): + title (str): Object title. + type (str): Object type, e.g. dashboard, visualization, metric. + usage_count (int): Number of times this object has been used/referenced. + workspace_id (str): Workspace ID the object belongs to. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + created_at (datetime): Timestamp when object was created.. [optional] # noqa: E501 + created_by (str): ID of the user who created the object.. [optional] # noqa: E501 + dataset_id (str): ID of the associated dataset, if applicable.. [optional] # noqa: E501 + dataset_title (str): Title of the associated dataset, if applicable.. [optional] # noqa: E501 + dataset_type (str): Type of the associated dataset, if applicable.. [optional] # noqa: E501 + description (str): Object description.. [optional] # noqa: E501 + is_hidden (bool): If true, this object is hidden from AI search results by default.. [optional] # noqa: E501 + is_hidden_from_kda (bool): If true, this object is hidden from KDA.. [optional] # noqa: E501 + metric_type (str): Type of the metric (e.g. MAQL), if applicable.. [optional] # noqa: E501 + modified_at (datetime): Timestamp when object was last modified.. [optional] # noqa: E501 + modified_by (str): ID of the user who last modified the object.. [optional] # noqa: E501 + visualization_url (str): URL of the visualization, if applicable.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.tags = tags + self.title = title + self.type = type + self.usage_count = usage_count + self.workspace_id = workspace_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/trending_objects_result.py b/gooddata-api-client/gooddata_api_client/model/trending_objects_result.py new file mode 100644 index 000000000..1154733fa --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/trending_objects_result.py @@ -0,0 +1,276 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.trending_object_item import TrendingObjectItem + globals()['TrendingObjectItem'] = TrendingObjectItem + + +class TrendingObjectsResult(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'objects': ([TrendingObjectItem],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'objects': 'objects', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, objects, *args, **kwargs): # noqa: E501 + """TrendingObjectsResult - a model defined in OpenAPI + + Args: + objects ([TrendingObjectItem]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.objects = objects + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, objects, *args, **kwargs): # noqa: E501 + """TrendingObjectsResult - a model defined in OpenAPI + + Args: + objects ([TrendingObjectItem]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.objects = objects + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/ui_context.py b/gooddata-api-client/gooddata_api_client/model/ui_context.py new file mode 100644 index 000000000..f92c03bf9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/ui_context.py @@ -0,0 +1,270 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.dashboard_context import DashboardContext + globals()['DashboardContext'] = DashboardContext + + +class UIContext(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'dashboard': (DashboardContext,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'dashboard': 'dashboard', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UIContext - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + dashboard (DashboardContext): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UIContext - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + dashboard (DashboardContext): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/upload_file_response.py b/gooddata-api-client/gooddata_api_client/model/upload_file_response.py new file mode 100644 index 000000000..dee688e38 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/upload_file_response.py @@ -0,0 +1,270 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class UploadFileResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'location': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'location': 'location', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, location, *args, **kwargs): # noqa: E501 + """UploadFileResponse - a model defined in OpenAPI + + Args: + location (str): Location to use when referencing the uploaded file in subsequent requests. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, location, *args, **kwargs): # noqa: E501 + """UploadFileResponse - a model defined in OpenAPI + + Args: + location (str): Location to use when referencing the uploaded file in subsequent requests. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/upload_geo_collection_file_response.py b/gooddata-api-client/gooddata_api_client/model/upload_geo_collection_file_response.py new file mode 100644 index 000000000..1483b13db --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/upload_geo_collection_file_response.py @@ -0,0 +1,270 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class UploadGeoCollectionFileResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'location': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'location': 'location', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, location, *args, **kwargs): # noqa: E501 + """UploadGeoCollectionFileResponse - a model defined in OpenAPI + + Args: + location (str): Location to use when referencing the uploaded file in subsequent requests. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, location, *args, **kwargs): # noqa: E501 + """UploadGeoCollectionFileResponse - a model defined in OpenAPI + + Args: + location (str): Location to use when referencing the uploaded file in subsequent requests. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/visualization_switcher_widget_descriptor.py b/gooddata-api-client/gooddata_api_client/model/visualization_switcher_widget_descriptor.py new file mode 100644 index 000000000..785a017b5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/visualization_switcher_widget_descriptor.py @@ -0,0 +1,346 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.visualization_switcher_widget_descriptor_all_of import VisualizationSwitcherWidgetDescriptorAllOf + from gooddata_api_client.model.widget_descriptor import WidgetDescriptor + globals()['VisualizationSwitcherWidgetDescriptorAllOf'] = VisualizationSwitcherWidgetDescriptorAllOf + globals()['WidgetDescriptor'] = WidgetDescriptor + + +class VisualizationSwitcherWidgetDescriptor(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'active_visualization_id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'visualization_ids': ([str],), # noqa: E501 + 'widget_id': (str,), # noqa: E501 + 'widget_type': (str,), # noqa: E501 + 'result_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + val = { + } + if not val: + return None + return {'widget_type': val} + + attribute_map = { + 'active_visualization_id': 'activeVisualizationId', # noqa: E501 + 'title': 'title', # noqa: E501 + 'visualization_ids': 'visualizationIds', # noqa: E501 + 'widget_id': 'widgetId', # noqa: E501 + 'widget_type': 'widgetType', # noqa: E501 + 'result_id': 'resultId', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """VisualizationSwitcherWidgetDescriptor - a model defined in OpenAPI + + Keyword Args: + active_visualization_id (str): ID of the currently active visualization in the switcher. + title (str): Widget title as displayed on the dashboard. + visualization_ids ([str]): IDs of all visualizations available in the switcher. + widget_id (str): Widget object ID. + widget_type (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + result_id (str): Signed result ID for the currently active visualization's execution result.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """VisualizationSwitcherWidgetDescriptor - a model defined in OpenAPI + + Keyword Args: + active_visualization_id (str): ID of the currently active visualization in the switcher. + title (str): Widget title as displayed on the dashboard. + visualization_ids ([str]): IDs of all visualizations available in the switcher. + widget_id (str): Widget object ID. + widget_type (str): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + result_id (str): Signed result ID for the currently active visualization's execution result.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + VisualizationSwitcherWidgetDescriptorAllOf, + WidgetDescriptor, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-api-client/gooddata_api_client/model/visualization_switcher_widget_descriptor_all_of.py b/gooddata-api-client/gooddata_api_client/model/visualization_switcher_widget_descriptor_all_of.py new file mode 100644 index 000000000..2f49e776b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/visualization_switcher_widget_descriptor_all_of.py @@ -0,0 +1,280 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class VisualizationSwitcherWidgetDescriptorAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'active_visualization_id': (str,), # noqa: E501 + 'result_id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'visualization_ids': ([str],), # noqa: E501 + 'widget_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'active_visualization_id': 'activeVisualizationId', # noqa: E501 + 'result_id': 'resultId', # noqa: E501 + 'title': 'title', # noqa: E501 + 'visualization_ids': 'visualizationIds', # noqa: E501 + 'widget_id': 'widgetId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """VisualizationSwitcherWidgetDescriptorAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + active_visualization_id (str): ID of the currently active visualization in the switcher.. [optional] # noqa: E501 + result_id (str): Signed result ID for the currently active visualization's execution result.. [optional] # noqa: E501 + title (str): Widget title as displayed on the dashboard.. [optional] # noqa: E501 + visualization_ids ([str]): IDs of all visualizations available in the switcher.. [optional] # noqa: E501 + widget_id (str): Widget object ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """VisualizationSwitcherWidgetDescriptorAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + active_visualization_id (str): ID of the currently active visualization in the switcher.. [optional] # noqa: E501 + result_id (str): Signed result ID for the currently active visualization's execution result.. [optional] # noqa: E501 + title (str): Widget title as displayed on the dashboard.. [optional] # noqa: E501 + visualization_ids ([str]): IDs of all visualizations available in the switcher.. [optional] # noqa: E501 + widget_id (str): Widget object ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/widget_descriptor.py b/gooddata-api-client/gooddata_api_client/model/widget_descriptor.py new file mode 100644 index 000000000..c4c1cc396 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/widget_descriptor.py @@ -0,0 +1,299 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.insight_widget_descriptor import InsightWidgetDescriptor + from gooddata_api_client.model.rich_text_widget_descriptor import RichTextWidgetDescriptor + from gooddata_api_client.model.visualization_switcher_widget_descriptor import VisualizationSwitcherWidgetDescriptor + globals()['InsightWidgetDescriptor'] = InsightWidgetDescriptor + globals()['RichTextWidgetDescriptor'] = RichTextWidgetDescriptor + globals()['VisualizationSwitcherWidgetDescriptor'] = VisualizationSwitcherWidgetDescriptor + + +class WidgetDescriptor(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'title': (str,), # noqa: E501 + 'widget_id': (str,), # noqa: E501 + 'widget_type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'insight': InsightWidgetDescriptor, + 'richText': RichTextWidgetDescriptor, + 'visualizationSwitcher': VisualizationSwitcherWidgetDescriptor, + } + if not val: + return None + return {'widget_type': val} + + attribute_map = { + 'title': 'title', # noqa: E501 + 'widget_id': 'widgetId', # noqa: E501 + 'widget_type': 'widgetType', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, title, widget_id, widget_type, *args, **kwargs): # noqa: E501 + """WidgetDescriptor - a model defined in OpenAPI + + Args: + title (str): + widget_id (str): + widget_type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.title = title + self.widget_id = widget_id + self.widget_type = widget_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, title, widget_id, widget_type, *args, **kwargs): # noqa: E501 + """WidgetDescriptor - a model defined in OpenAPI + + Args: + title (str): + widget_id (str): + widget_type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.title = title + self.widget_id = widget_id + self.widget_type = widget_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/workspace_cache_settings.py b/gooddata-api-client/gooddata_api_client/model/workspace_cache_settings.py new file mode 100644 index 000000000..c9fa09b1d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/workspace_cache_settings.py @@ -0,0 +1,270 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class WorkspaceCacheSettings(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'extra_cache': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'extra_cache': 'extraCache', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, extra_cache, *args, **kwargs): # noqa: E501 + """WorkspaceCacheSettings - a model defined in OpenAPI + + Args: + extra_cache (int): Extra cache for the workspace, in bytes. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.extra_cache = extra_cache + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, extra_cache, *args, **kwargs): # noqa: E501 + """WorkspaceCacheSettings - a model defined in OpenAPI + + Args: + extra_cache (int): Extra cache for the workspace, in bytes. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.extra_cache = extra_cache + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/workspace_cache_usage.py b/gooddata-api-client/gooddata_api_client/model/workspace_cache_usage.py new file mode 100644 index 000000000..6fcbc9692 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/workspace_cache_usage.py @@ -0,0 +1,292 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_api_client.model.cache_removal_interval import CacheRemovalInterval + from gooddata_api_client.model.workspace_cache_settings import WorkspaceCacheSettings + from gooddata_api_client.model.workspace_current_cache_usage import WorkspaceCurrentCacheUsage + globals()['CacheRemovalInterval'] = CacheRemovalInterval + globals()['WorkspaceCacheSettings'] = WorkspaceCacheSettings + globals()['WorkspaceCurrentCacheUsage'] = WorkspaceCurrentCacheUsage + + +class WorkspaceCacheUsage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'current': (WorkspaceCurrentCacheUsage,), # noqa: E501 + 'removal_intervals': ([CacheRemovalInterval],), # noqa: E501 + 'settings': (WorkspaceCacheSettings,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'current': 'current', # noqa: E501 + 'removal_intervals': 'removalIntervals', # noqa: E501 + 'settings': 'settings', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, current, removal_intervals, settings, *args, **kwargs): # noqa: E501 + """WorkspaceCacheUsage - a model defined in OpenAPI + + Args: + current (WorkspaceCurrentCacheUsage): + removal_intervals ([CacheRemovalInterval]): List of cache removal intervals for workspace. + settings (WorkspaceCacheSettings): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.current = current + self.removal_intervals = removal_intervals + self.settings = settings + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, current, removal_intervals, settings, *args, **kwargs): # noqa: E501 + """WorkspaceCacheUsage - a model defined in OpenAPI + + Args: + current (WorkspaceCurrentCacheUsage): + removal_intervals ([CacheRemovalInterval]): List of cache removal intervals for workspace. + settings (WorkspaceCacheSettings): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.current = current + self.removal_intervals = removal_intervals + self.settings = settings + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/model/workspace_current_cache_usage.py b/gooddata-api-client/gooddata_api_client/model/workspace_current_cache_usage.py new file mode 100644 index 000000000..4c72bba01 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/workspace_current_cache_usage.py @@ -0,0 +1,288 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_api_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from gooddata_api_client.exceptions import ApiAttributeError + + + +class WorkspaceCurrentCacheUsage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'cache_available': (int,), # noqa: E501 + 'cache_used': (int,), # noqa: E501 + 'removal_period_start': (datetime,), # noqa: E501 + 'removed_since_start': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'cache_available': 'cacheAvailable', # noqa: E501 + 'cache_used': 'cacheUsed', # noqa: E501 + 'removal_period_start': 'removalPeriodStart', # noqa: E501 + 'removed_since_start': 'removedSinceStart', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, cache_available, cache_used, removal_period_start, removed_since_start, *args, **kwargs): # noqa: E501 + """WorkspaceCurrentCacheUsage - a model defined in OpenAPI + + Args: + cache_available (int): Cache available for the workspace. + cache_used (int): Cache used by the workspace. + removal_period_start (datetime): Start timestamp of removal period for the workspace. + removed_since_start (int): Bytes removed since start due to insufficient cache for the workspace. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.cache_available = cache_available + self.cache_used = cache_used + self.removal_period_start = removal_period_start + self.removed_since_start = removed_since_start + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, cache_available, cache_used, removal_period_start, removed_since_start, *args, **kwargs): # noqa: E501 + """WorkspaceCurrentCacheUsage - a model defined in OpenAPI + + Args: + cache_available (int): Cache available for the workspace. + cache_used (int): Cache used by the workspace. + removal_period_start (datetime): Start timestamp of removal period for the workspace. + removed_since_start (int): Bytes removed since start due to insufficient cache for the workspace. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.cache_available = cache_available + self.cache_used = cache_used + self.removal_period_start = removal_period_start + self.removed_since_start = removed_since_start + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-api-client/gooddata_api_client/models/__init__.py b/gooddata-api-client/gooddata_api_client/models/__init__.py index 29f009645..bc4ced714 100644 --- a/gooddata-api-client/gooddata_api_client/models/__init__.py +++ b/gooddata-api-client/gooddata_api_client/models/__init__.py @@ -92,6 +92,12 @@ from gooddata_api_client.model.analytics_catalog_created_by import AnalyticsCatalogCreatedBy from gooddata_api_client.model.analytics_catalog_tags import AnalyticsCatalogTags from gooddata_api_client.model.analytics_catalog_user import AnalyticsCatalogUser +from gooddata_api_client.model.analyze_csv_request import AnalyzeCsvRequest +from gooddata_api_client.model.analyze_csv_request_item import AnalyzeCsvRequestItem +from gooddata_api_client.model.analyze_csv_request_item_config import AnalyzeCsvRequestItemConfig +from gooddata_api_client.model.analyze_csv_response import AnalyzeCsvResponse +from gooddata_api_client.model.analyze_csv_response_column import AnalyzeCsvResponseColumn +from gooddata_api_client.model.analyze_csv_response_config import AnalyzeCsvResponseConfig from gooddata_api_client.model.anomaly_detection import AnomalyDetection from gooddata_api_client.model.anomaly_detection_config import AnomalyDetectionConfig from gooddata_api_client.model.anomaly_detection_request import AnomalyDetectionRequest @@ -144,6 +150,8 @@ from gooddata_api_client.model.azure_foundry_provider_config import AzureFoundryProviderConfig from gooddata_api_client.model.bedrock_provider_auth import BedrockProviderAuth from gooddata_api_client.model.bounded_filter import BoundedFilter +from gooddata_api_client.model.cache_removal_interval import CacheRemovalInterval +from gooddata_api_client.model.cache_usage_data import CacheUsageData from gooddata_api_client.model.change_analysis_params import ChangeAnalysisParams from gooddata_api_client.model.change_analysis_params_filters_inner import ChangeAnalysisParamsFiltersInner from gooddata_api_client.model.change_analysis_request import ChangeAnalysisRequest @@ -175,12 +183,19 @@ from gooddata_api_client.model.compound_measure_value_filter import CompoundMeasureValueFilter from gooddata_api_client.model.compound_measure_value_filter_compound_measure_value_filter import CompoundMeasureValueFilterCompoundMeasureValueFilter from gooddata_api_client.model.content_slide_template import ContentSlideTemplate +from gooddata_api_client.model.convert_geo_file_request import ConvertGeoFileRequest +from gooddata_api_client.model.convert_geo_file_response import ConvertGeoFileResponse from gooddata_api_client.model.cover_slide_template import CoverSlideTemplate from gooddata_api_client.model.create_knowledge_document_request_dto import CreateKnowledgeDocumentRequestDto from gooddata_api_client.model.create_knowledge_document_response_dto import CreateKnowledgeDocumentResponseDto from gooddata_api_client.model.created_visualization import CreatedVisualization from gooddata_api_client.model.created_visualization_filters_inner import CreatedVisualizationFiltersInner from gooddata_api_client.model.created_visualizations import CreatedVisualizations +from gooddata_api_client.model.csv_convert_options import CsvConvertOptions +from gooddata_api_client.model.csv_convert_options_column_type import CsvConvertOptionsColumnType +from gooddata_api_client.model.csv_manifest_body import CsvManifestBody +from gooddata_api_client.model.csv_parse_options import CsvParseOptions +from gooddata_api_client.model.csv_read_options import CsvReadOptions from gooddata_api_client.model.custom_label import CustomLabel from gooddata_api_client.model.custom_metric import CustomMetric from gooddata_api_client.model.custom_override import CustomOverride @@ -301,6 +316,7 @@ from gooddata_api_client.model.declarative_workspaces import DeclarativeWorkspaces from gooddata_api_client.model.default_smtp import DefaultSmtp from gooddata_api_client.model.default_smtp_all_of import DefaultSmtpAllOf +from gooddata_api_client.model.delete_files_request import DeleteFilesRequest from gooddata_api_client.model.delete_knowledge_document_response_dto import DeleteKnowledgeDocumentResponseDto from gooddata_api_client.model.dependent_entities_graph import DependentEntitiesGraph from gooddata_api_client.model.dependent_entities_node import DependentEntitiesNode @@ -350,6 +366,7 @@ from gooddata_api_client.model.frequency import Frequency from gooddata_api_client.model.frequency_bucket import FrequencyBucket from gooddata_api_client.model.frequency_properties import FrequencyProperties +from gooddata_api_client.model.gd_storage_file import GdStorageFile from gooddata_api_client.model.generate_description_request import GenerateDescriptionRequest from gooddata_api_client.model.generate_description_response import GenerateDescriptionResponse from gooddata_api_client.model.generate_ldm_request import GenerateLdmRequest @@ -357,6 +374,9 @@ from gooddata_api_client.model.generate_title_response import GenerateTitleResponse from gooddata_api_client.model.geo_area_config import GeoAreaConfig from gooddata_api_client.model.geo_collection_identifier import GeoCollectionIdentifier +from gooddata_api_client.model.geo_json_feature import GeoJsonFeature +from gooddata_api_client.model.geo_json_feature_collection import GeoJsonFeatureCollection +from gooddata_api_client.model.geo_json_geometry import GeoJsonGeometry from gooddata_api_client.model.get_ai_lake_operation200_response import GetAiLakeOperation200Response from gooddata_api_client.model.get_image_export202_response_inner import GetImageExport202ResponseInner from gooddata_api_client.model.get_quality_issues_response import GetQualityIssuesResponse @@ -372,6 +392,13 @@ from gooddata_api_client.model.identifier_ref import IdentifierRef from gooddata_api_client.model.identifier_ref_identifier import IdentifierRefIdentifier from gooddata_api_client.model.image_export_request import ImageExportRequest +from gooddata_api_client.model.import_csv_request import ImportCsvRequest +from gooddata_api_client.model.import_csv_request_table import ImportCsvRequestTable +from gooddata_api_client.model.import_csv_request_table_source import ImportCsvRequestTableSource +from gooddata_api_client.model.import_csv_request_table_source_config import ImportCsvRequestTableSourceConfig +from gooddata_api_client.model.import_csv_response import ImportCsvResponse +from gooddata_api_client.model.import_geo_collection_request import ImportGeoCollectionRequest +from gooddata_api_client.model.import_geo_collection_response import ImportGeoCollectionResponse from gooddata_api_client.model.in_platform import InPlatform from gooddata_api_client.model.in_platform_all_of import InPlatformAllOf from gooddata_api_client.model.inline_filter_definition import InlineFilterDefinition @@ -1027,6 +1054,9 @@ from gooddata_api_client.model.operation_error import OperationError from gooddata_api_client.model.organization_automation_identifier import OrganizationAutomationIdentifier from gooddata_api_client.model.organization_automation_management_bulk_request import OrganizationAutomationManagementBulkRequest +from gooddata_api_client.model.organization_cache_settings import OrganizationCacheSettings +from gooddata_api_client.model.organization_cache_usage import OrganizationCacheUsage +from gooddata_api_client.model.organization_current_cache_usage import OrganizationCurrentCacheUsage from gooddata_api_client.model.organization_permission_assignment import OrganizationPermissionAssignment from gooddata_api_client.model.outlier_detection_request import OutlierDetectionRequest from gooddata_api_client.model.outlier_detection_response import OutlierDetectionResponse @@ -1073,6 +1103,9 @@ from gooddata_api_client.model.raw_custom_override import RawCustomOverride from gooddata_api_client.model.raw_export_automation_request import RawExportAutomationRequest from gooddata_api_client.model.raw_export_request import RawExportRequest +from gooddata_api_client.model.read_csv_file_manifests_request import ReadCsvFileManifestsRequest +from gooddata_api_client.model.read_csv_file_manifests_request_item import ReadCsvFileManifestsRequestItem +from gooddata_api_client.model.read_csv_file_manifests_response import ReadCsvFileManifestsResponse from gooddata_api_client.model.reasoning import Reasoning from gooddata_api_client.model.reasoning_step import ReasoningStep from gooddata_api_client.model.reference_identifier import ReferenceIdentifier @@ -1154,6 +1187,8 @@ from gooddata_api_client.model.total_result_header import TotalResultHeader from gooddata_api_client.model.trigger_automation_request import TriggerAutomationRequest from gooddata_api_client.model.trigger_quality_issues_calculation_response import TriggerQualityIssuesCalculationResponse +from gooddata_api_client.model.upload_file_response import UploadFileResponse +from gooddata_api_client.model.upload_geo_collection_file_response import UploadGeoCollectionFileResponse from gooddata_api_client.model.upsert_knowledge_document_request_dto import UpsertKnowledgeDocumentRequestDto from gooddata_api_client.model.upsert_knowledge_document_response_dto import UpsertKnowledgeDocumentResponseDto from gooddata_api_client.model.user_assignee import UserAssignee @@ -1191,6 +1226,9 @@ from gooddata_api_client.model.widget_slides_template import WidgetSlidesTemplate from gooddata_api_client.model.workspace_automation_identifier import WorkspaceAutomationIdentifier from gooddata_api_client.model.workspace_automation_management_bulk_request import WorkspaceAutomationManagementBulkRequest +from gooddata_api_client.model.workspace_cache_settings import WorkspaceCacheSettings +from gooddata_api_client.model.workspace_cache_usage import WorkspaceCacheUsage +from gooddata_api_client.model.workspace_current_cache_usage import WorkspaceCurrentCacheUsage from gooddata_api_client.model.workspace_data_source import WorkspaceDataSource from gooddata_api_client.model.workspace_identifier import WorkspaceIdentifier from gooddata_api_client.model.workspace_permission_assignment import WorkspacePermissionAssignment diff --git a/gooddata-api-client/gooddata_api_client/models/aac_analytics_model.py b/gooddata-api-client/gooddata_api_client/models/aac_analytics_model.py new file mode 100644 index 000000000..6261186bd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_analytics_model.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_attribute_hierarchy import AacAttributeHierarchy +from gooddata_api_client.models.aac_dashboard import AacDashboard +from gooddata_api_client.models.aac_metric import AacMetric +from gooddata_api_client.models.aac_plugin import AacPlugin +from gooddata_api_client.models.aac_visualization import AacVisualization +from typing import Optional, Set +from typing_extensions import Self + +class AacAnalyticsModel(BaseModel): + """ + AAC analytics model representation compatible with Analytics-as-Code YAML format. + """ # noqa: E501 + attribute_hierarchies: Optional[List[AacAttributeHierarchy]] = Field(default=None, description="An array of attribute hierarchies.") + dashboards: Optional[List[AacDashboard]] = Field(default=None, description="An array of dashboards.") + metrics: Optional[List[AacMetric]] = Field(default=None, description="An array of metrics.") + plugins: Optional[List[AacPlugin]] = Field(default=None, description="An array of dashboard plugins.") + visualizations: Optional[List[AacVisualization]] = Field(default=None, description="An array of visualizations.") + __properties: ClassVar[List[str]] = ["attribute_hierarchies", "dashboards", "metrics", "plugins", "visualizations"] + + 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 AacAnalyticsModel 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 each item in attribute_hierarchies (list) + _items = [] + if self.attribute_hierarchies: + for _item_attribute_hierarchies in self.attribute_hierarchies: + if _item_attribute_hierarchies: + _items.append(_item_attribute_hierarchies.to_dict()) + _dict['attribute_hierarchies'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in dashboards (list) + _items = [] + if self.dashboards: + for _item_dashboards in self.dashboards: + if _item_dashboards: + _items.append(_item_dashboards.to_dict()) + _dict['dashboards'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in metrics (list) + _items = [] + if self.metrics: + for _item_metrics in self.metrics: + if _item_metrics: + _items.append(_item_metrics.to_dict()) + _dict['metrics'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in plugins (list) + _items = [] + if self.plugins: + for _item_plugins in self.plugins: + if _item_plugins: + _items.append(_item_plugins.to_dict()) + _dict['plugins'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in visualizations (list) + _items = [] + if self.visualizations: + for _item_visualizations in self.visualizations: + if _item_visualizations: + _items.append(_item_visualizations.to_dict()) + _dict['visualizations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AacAnalyticsModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attribute_hierarchies": [AacAttributeHierarchy.from_dict(_item) for _item in obj["attribute_hierarchies"]] if obj.get("attribute_hierarchies") is not None else None, + "dashboards": [AacDashboard.from_dict(_item) for _item in obj["dashboards"]] if obj.get("dashboards") is not None else None, + "metrics": [AacMetric.from_dict(_item) for _item in obj["metrics"]] if obj.get("metrics") is not None else None, + "plugins": [AacPlugin.from_dict(_item) for _item in obj["plugins"]] if obj.get("plugins") is not None else None, + "visualizations": [AacVisualization.from_dict(_item) for _item in obj["visualizations"]] if obj.get("visualizations") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_attribute_hierarchy.py b/gooddata-api-client/gooddata_api_client/models/aac_attribute_hierarchy.py new file mode 100644 index 000000000..9ed2215be --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_attribute_hierarchy.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 AacAttributeHierarchy(BaseModel): + """ + AAC attribute hierarchy definition. + """ # noqa: E501 + attributes: List[StrictStr] = Field(description="Ordered list of attribute identifiers (first is top level).") + description: Optional[StrictStr] = Field(default=None, description="Attribute hierarchy description.") + id: StrictStr = Field(description="Unique identifier of the attribute hierarchy.") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + type: StrictStr = Field(description="Attribute hierarchy type discriminator.") + __properties: ClassVar[List[str]] = ["attributes", "description", "id", "tags", "title", "type"] + + 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 AacAttributeHierarchy 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 AacAttributeHierarchy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": obj.get("attributes"), + "description": obj.get("description"), + "id": obj.get("id"), + "tags": obj.get("tags"), + "title": obj.get("title"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_container_widget.py b/gooddata-api-client/gooddata_api_client/models/aac_container_widget.py new file mode 100644 index 000000000..4190ea52f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_container_widget.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_widget_size import AacWidgetSize +from typing import Optional, Set +from typing_extensions import Self + +class AacContainerWidget(BaseModel): + """ + AacContainerWidget + """ # noqa: E501 + additional_properties: Optional[Dict[str, Optional[Dict[str, Any]]]] = Field(default=None, alias="additionalProperties") + columns: Optional[StrictInt] = Field(default=None, description="Widget width in grid columns (GAAC).") + container: Optional[StrictStr] = Field(default=None, description="Container widget identifier.") + content: Optional[StrictStr] = Field(default=None, description="Rich text content.") + var_date: Optional[StrictStr] = Field(default=None, description="Date dataset for filtering.", alias="date") + description: Optional[Any] = None + drill_down: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + enable_section_headers: Optional[StrictBool] = Field(default=None, description="Whether section headers are enabled for container widgets.") + ignore_dashboard_filters: Optional[List[StrictStr]] = Field(default=None, description="Deprecated. Use ignoredFilters instead.") + ignored_filters: Optional[List[StrictStr]] = Field(default=None, description="A list of dashboard filters to be ignored for this widget (GAAC).") + interactions: Optional[List[Optional[Dict[str, Any]]]] = Field(default=None, description="Widget interactions (GAAC).") + layout_direction: Optional[StrictStr] = Field(default=None, description="Layout direction for container widgets.") + metric: Optional[StrictStr] = Field(default=None, description="Inline metric reference.") + rows: Optional[StrictInt] = Field(default=None, description="Widget height in grid rows (GAAC).") + sections: List[AacSection] = Field(description="Nested sections for layout widgets.") + size: Optional[AacWidgetSize] = None + title: Optional[Any] = None + type: Optional[StrictStr] = Field(default=None, description="Widget type.") + visualization: Optional[StrictStr] = Field(default=None, description="Visualization ID reference.") + visualizations: Optional[List[AacWidget]] = Field(default=None, description="Visualization switcher items.") + zoom_data: Optional[StrictBool] = Field(default=None, description="Enable zooming to the data for certain visualization types (GAAC).") + __properties: ClassVar[List[str]] = [] + + 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 AacContainerWidget 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 AacContainerWidget from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj + +from gooddata_api_client.models.aac_section import AacSection +from gooddata_api_client.models.aac_widget import AacWidget +# TODO: Rewrite to not use raise_errors +AacContainerWidget.model_rebuild(raise_errors=False) + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_dashboard.py b/gooddata-api-client/gooddata_api_client/models/aac_dashboard.py new file mode 100644 index 000000000..f16d25baf --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_dashboard.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.aac_dashboard_with_tabs import AacDashboardWithTabs +from gooddata_api_client.models.aac_dashboard_without_tabs import AacDashboardWithoutTabs +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +AACDASHBOARD_ONE_OF_SCHEMAS = ["AacDashboardWithTabs", "AacDashboardWithoutTabs"] + +class AacDashboard(BaseModel): + """ + AAC dashboard definition. + """ + # data type: object + oneof_schema_1_validator: Optional[object] = None + # data type: AacDashboardWithoutTabs + oneof_schema_2_validator: Optional[AacDashboardWithoutTabs] = None + actual_instance: Optional[Union[AacDashboardWithTabs, AacDashboardWithoutTabs]] = None + one_of_schemas: Set[str] = { "AacDashboardWithTabs", "AacDashboardWithoutTabs" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = AacDashboard.model_construct() + error_messages = [] + match = 0 + # validate data type: object + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: AacDashboardWithoutTabs + if not isinstance(v, AacDashboardWithoutTabs): + error_messages.append(f"Error! Input type `{type(v)}` is not `AacDashboardWithoutTabs`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AacDashboard with oneOf schemas: AacDashboardWithTabs, AacDashboardWithoutTabs. 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 + + # deserialize data into object + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + if match == 0: + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AacDashboardWithoutTabs + try: + if match == 0: + instance.actual_instance = AacDashboardWithoutTabs.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AacDashboard with oneOf schemas: AacDashboardWithTabs, AacDashboardWithoutTabs. 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], AacDashboardWithTabs, AacDashboardWithoutTabs]]: + """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/gooddata-api-client/gooddata_api_client/models/aac_dashboard_filter.py b/gooddata-api-client/gooddata_api_client/models/aac_dashboard_filter.py new file mode 100644 index 000000000..71648435b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_dashboard_filter.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_dashboard_filter_from import AacDashboardFilterFrom +from gooddata_api_client.models.aac_filter_state import AacFilterState +from typing import Optional, Set +from typing_extensions import Self + +class AacDashboardFilter(BaseModel): + """ + Tab-specific filters. + """ # noqa: E501 + var_date: Optional[StrictStr] = Field(default=None, description="Date dataset reference.", alias="date") + display_as: Optional[StrictStr] = Field(default=None, description="Display as label.") + var_from: Optional[AacDashboardFilterFrom] = Field(default=None, alias="from") + granularity: Optional[StrictStr] = Field(default=None, description="Date granularity.") + metric_filters: Optional[List[StrictStr]] = Field(default=None, description="Metric filters for validation.") + mode: Optional[StrictStr] = Field(default=None, description="Filter mode.") + multiselect: Optional[StrictBool] = Field(default=None, description="Whether multiselect is enabled.") + parents: Optional[List[Optional[Dict[str, Any]]]] = Field(default=None, description="Parent filter references.") + state: Optional[AacFilterState] = None + title: Optional[StrictStr] = Field(default=None, description="Filter title.") + to: Optional[AacDashboardFilterFrom] = None + type: StrictStr = Field(description="Filter type.") + using: Optional[StrictStr] = Field(default=None, description="Attribute or label to filter by.") + __properties: ClassVar[List[str]] = ["date", "display_as", "from", "granularity", "metric_filters", "mode", "multiselect", "parents", "state", "title", "to", "type", "using"] + + 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 AacDashboardFilter 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 var_from + if self.var_from: + _dict['from'] = self.var_from.to_dict() + # override the default output from pydantic by calling `to_dict()` of state + if self.state: + _dict['state'] = self.state.to_dict() + # override the default output from pydantic by calling `to_dict()` of to + if self.to: + _dict['to'] = self.to.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AacDashboardFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "display_as": obj.get("display_as"), + "from": AacDashboardFilterFrom.from_dict(obj["from"]) if obj.get("from") is not None else None, + "granularity": obj.get("granularity"), + "metric_filters": obj.get("metric_filters"), + "mode": obj.get("mode"), + "multiselect": obj.get("multiselect"), + "parents": obj.get("parents"), + "state": AacFilterState.from_dict(obj["state"]) if obj.get("state") is not None else None, + "title": obj.get("title"), + "to": AacDashboardFilterFrom.from_dict(obj["to"]) if obj.get("to") is not None else None, + "type": obj.get("type"), + "using": obj.get("using") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_dashboard_filter_from.py b/gooddata-api-client/gooddata_api_client/models/aac_dashboard_filter_from.py new file mode 100644 index 000000000..bb206e07f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_dashboard_filter_from.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictInt, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +AACDASHBOARDFILTERFROM_ONE_OF_SCHEMAS = ["int", "str"] + +class AacDashboardFilterFrom(BaseModel): + """ + AacDashboardFilterFrom + """ + # data type: str + oneof_schema_1_validator: Optional[StrictStr] = None + # data type: int + oneof_schema_2_validator: Optional[StrictInt] = None + actual_instance: Optional[Union[int, str]] = None + one_of_schemas: Set[str] = { "int", "str" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = AacDashboardFilterFrom.model_construct() + error_messages = [] + match = 0 + # validate data type: str + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: int + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AacDashboardFilterFrom with oneOf schemas: int, str. 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 + + # deserialize data into str + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + if match == 0: + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into int + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + if match == 0: + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AacDashboardFilterFrom with oneOf schemas: int, str. 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], int, str]]: + """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/gooddata-api-client/gooddata_api_client/models/aac_dashboard_permissions.py b/gooddata-api-client/gooddata_api_client/models/aac_dashboard_permissions.py new file mode 100644 index 000000000..523155b4c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_dashboard_permissions.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_permission import AacPermission +from typing import Optional, Set +from typing_extensions import Self + +class AacDashboardPermissions(BaseModel): + """ + Dashboard permissions. + """ # noqa: E501 + edit: Optional[AacPermission] = None + share: Optional[AacPermission] = None + view: Optional[AacPermission] = None + __properties: ClassVar[List[str]] = ["edit", "share", "view"] + + 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 AacDashboardPermissions 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 edit + if self.edit: + _dict['edit'] = self.edit.to_dict() + # override the default output from pydantic by calling `to_dict()` of share + if self.share: + _dict['share'] = self.share.to_dict() + # override the default output from pydantic by calling `to_dict()` of view + if self.view: + _dict['view'] = self.view.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AacDashboardPermissions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "edit": AacPermission.from_dict(obj["edit"]) if obj.get("edit") is not None else None, + "share": AacPermission.from_dict(obj["share"]) if obj.get("share") is not None else None, + "view": AacPermission.from_dict(obj["view"]) if obj.get("view") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_dashboard_plugin_link.py b/gooddata-api-client/gooddata_api_client/models/aac_dashboard_plugin_link.py new file mode 100644 index 000000000..cc5c169ce --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_dashboard_plugin_link.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 AacDashboardPluginLink(BaseModel): + """ + Dashboard plugins. + """ # noqa: E501 + id: StrictStr = Field(description="Plugin ID.") + parameters: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + __properties: ClassVar[List[str]] = ["id", "parameters"] + + 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 AacDashboardPluginLink 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 parameters (nullable) is None + # and model_fields_set contains the field + if self.parameters is None and "parameters" in self.model_fields_set: + _dict['parameters'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AacDashboardPluginLink 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"), + "parameters": obj.get("parameters") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_dashboard_with_tabs.py b/gooddata-api-client/gooddata_api_client/models/aac_dashboard_with_tabs.py new file mode 100644 index 000000000..f536ac9fc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_dashboard_with_tabs.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_dashboard_filter import AacDashboardFilter +from gooddata_api_client.models.aac_dashboard_permissions import AacDashboardPermissions +from gooddata_api_client.models.aac_tab import AacTab +from typing import Optional, Set +from typing_extensions import Self + +class AacDashboardWithTabs(BaseModel): + """ + AacDashboardWithTabs + """ # noqa: E501 + active_tab_id: Optional[StrictStr] = Field(default=None, description="Active tab ID for tabbed dashboards.") + cross_filtering: Optional[StrictBool] = Field(default=None, description="Whether cross filtering is enabled.") + description: Optional[StrictStr] = Field(default=None, description="Dashboard description.") + enable_section_headers: Optional[StrictBool] = Field(default=None, description="Whether section headers are enabled.") + filter_views: Optional[StrictBool] = Field(default=None, description="Whether filter views are enabled.") + filters: Optional[Dict[str, AacDashboardFilter]] = Field(default=None, description="Dashboard filters.") + id: StrictStr = Field(description="Unique identifier of the dashboard.") + permissions: Optional[AacDashboardPermissions] = None + plugins: Optional[List[Any]] = Field(default=None, description="Dashboard plugins.") + tabs: List[AacTab] = Field(description="Dashboard tabs (for tabbed dashboards).") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + type: StrictStr = Field(description="Dashboard type discriminator.") + user_filters_reset: Optional[StrictBool] = Field(default=None, description="Whether user can reset custom filters.") + user_filters_save: Optional[StrictBool] = Field(default=None, description="Whether user filter settings are stored.") + __properties: ClassVar[List[str]] = [] + + 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""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AacDashboardWithTabs 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.""" + 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 AacDashboardWithTabs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj diff --git a/gooddata-api-client/gooddata_api_client/models/aac_dashboard_without_tabs.py b/gooddata-api-client/gooddata_api_client/models/aac_dashboard_without_tabs.py new file mode 100644 index 000000000..8eac87e76 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_dashboard_without_tabs.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_dashboard_filter import AacDashboardFilter +from gooddata_api_client.models.aac_dashboard_permissions import AacDashboardPermissions +from gooddata_api_client.models.aac_section import AacSection +from gooddata_api_client.models.aac_tab import AacTab +from typing import Optional, Set +from typing_extensions import Self + +class AacDashboardWithoutTabs(BaseModel): + """ + AacDashboardWithoutTabs + """ # noqa: E501 + active_tab_id: Optional[StrictStr] = Field(default=None, description="Active tab ID for tabbed dashboards.") + cross_filtering: Optional[StrictBool] = Field(default=None, description="Whether cross filtering is enabled.") + description: Optional[StrictStr] = Field(default=None, description="Dashboard description.") + enable_section_headers: Optional[StrictBool] = Field(default=None, description="Whether section headers are enabled.") + filter_views: Optional[StrictBool] = Field(default=None, description="Whether filter views are enabled.") + filters: Optional[Dict[str, AacDashboardFilter]] = Field(default=None, description="Dashboard filters.") + id: StrictStr = Field(description="Unique identifier of the dashboard.") + permissions: Optional[AacDashboardPermissions] = None + plugins: Optional[List[Any]] = Field(default=None, description="Dashboard plugins.") + sections: Optional[List[AacSection]] = Field(default=None, description="Dashboard sections (for non-tabbed dashboards).") + tabs: Optional[List[AacTab]] = Field(default=None, description="Dashboard tabs (for tabbed dashboards).") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + type: StrictStr = Field(description="Dashboard type discriminator.") + user_filters_reset: Optional[StrictBool] = Field(default=None, description="Whether user can reset custom filters.") + user_filters_save: Optional[StrictBool] = Field(default=None, description="Whether user filter settings are stored.") + __properties: ClassVar[List[str]] = [] + + 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 AacDashboardWithoutTabs 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 AacDashboardWithoutTabs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_dataset.py b/gooddata-api-client/gooddata_api_client/models/aac_dataset.py new file mode 100644 index 000000000..0acd9ec69 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_dataset.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_dataset_primary_key import AacDatasetPrimaryKey +from gooddata_api_client.models.aac_field import AacField +from gooddata_api_client.models.aac_reference import AacReference +from gooddata_api_client.models.aac_workspace_data_filter import AacWorkspaceDataFilter +from typing import Optional, Set +from typing_extensions import Self + +class AacDataset(BaseModel): + """ + AAC dataset definition. + """ # noqa: E501 + data_source: Optional[StrictStr] = Field(default=None, description="Data source ID.") + description: Optional[StrictStr] = Field(default=None, description="Dataset description.") + fields: Optional[Dict[str, AacField]] = Field(default=None, description="Dataset fields (attributes, facts, aggregated facts).") + id: StrictStr = Field(description="Unique identifier of the dataset.") + precedence: Optional[StrictInt] = Field(default=None, description="Precedence value for aggregate awareness.") + primary_key: Optional[AacDatasetPrimaryKey] = None + references: Optional[List[AacReference]] = Field(default=None, description="References to other datasets.") + sql: Optional[StrictStr] = Field(default=None, description="SQL statement defining this dataset.") + table_path: Optional[StrictStr] = Field(default=None, description="Table path in the data source.") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + type: StrictStr = Field(description="Dataset type discriminator.") + workspace_data_filters: Optional[List[AacWorkspaceDataFilter]] = Field(default=None, description="Workspace data filters.") + __properties: ClassVar[List[str]] = ["data_source", "description", "fields", "id", "precedence", "primary_key", "references", "sql", "table_path", "tags", "title", "type", "workspace_data_filters"] + + 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 AacDataset 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 each value in fields (dict) + _field_dict = {} + if self.fields: + for _key_fields in self.fields: + if self.fields[_key_fields]: + _field_dict[_key_fields] = self.fields[_key_fields].to_dict() + _dict['fields'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of primary_key + if self.primary_key: + _dict['primary_key'] = self.primary_key.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in references (list) + _items = [] + if self.references: + for _item_references in self.references: + if _item_references: + _items.append(_item_references.to_dict()) + _dict['references'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in workspace_data_filters (list) + _items = [] + if self.workspace_data_filters: + for _item_workspace_data_filters in self.workspace_data_filters: + if _item_workspace_data_filters: + _items.append(_item_workspace_data_filters.to_dict()) + _dict['workspace_data_filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AacDataset from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data_source": obj.get("data_source"), + "description": obj.get("description"), + "fields": dict( + (_k, AacField.from_dict(_v)) + for _k, _v in obj["fields"].items() + ) + if obj.get("fields") is not None + else None, + "id": obj.get("id"), + "precedence": obj.get("precedence"), + "primary_key": AacDatasetPrimaryKey.from_dict(obj["primary_key"]) if obj.get("primary_key") is not None else None, + "references": [AacReference.from_dict(_item) for _item in obj["references"]] if obj.get("references") is not None else None, + "sql": obj.get("sql"), + "table_path": obj.get("table_path"), + "tags": obj.get("tags"), + "title": obj.get("title"), + "type": obj.get("type"), + "workspace_data_filters": [AacWorkspaceDataFilter.from_dict(_item) for _item in obj["workspace_data_filters"]] if obj.get("workspace_data_filters") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_dataset_primary_key.py b/gooddata-api-client/gooddata_api_client/models/aac_dataset_primary_key.py new file mode 100644 index 000000000..b568adc45 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_dataset_primary_key.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +AACDATASETPRIMARYKEY_ONE_OF_SCHEMAS = ["List[str]", "str"] + +class AacDatasetPrimaryKey(BaseModel): + """ + Primary key column(s). Accepts either a single string or an array of strings. + """ + # data type: str + oneof_schema_1_validator: Optional[StrictStr] = None + # data type: List[str] + oneof_schema_2_validator: Optional[List[StrictStr]] = None + actual_instance: Optional[Union[List[str], str]] = None + one_of_schemas: Set[str] = { "List[str]", "str" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = AacDatasetPrimaryKey.model_construct() + error_messages = [] + match = 0 + # validate data type: str + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: List[str] + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AacDatasetPrimaryKey with oneOf schemas: List[str], str. 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 + + # deserialize data into str + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + if match == 0: + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[str] + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + if match == 0: + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AacDatasetPrimaryKey with oneOf schemas: List[str], str. 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], List[str], str]]: + """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/gooddata-api-client/gooddata_api_client/models/aac_date_dataset.py b/gooddata-api-client/gooddata_api_client/models/aac_date_dataset.py new file mode 100644 index 000000000..2ae738310 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_date_dataset.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 AacDateDataset(BaseModel): + """ + AAC date dataset definition. + """ # noqa: E501 + description: Optional[StrictStr] = Field(default=None, description="Date dataset description.") + granularities: Optional[List[StrictStr]] = Field(default=None, description="List of granularities.") + id: StrictStr = Field(description="Unique identifier of the date dataset.") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + title_base: Optional[StrictStr] = Field(default=None, description="Title base for formatting.") + title_pattern: Optional[StrictStr] = Field(default=None, description="Title pattern for formatting.") + type: StrictStr = Field(description="Dataset type discriminator.") + __properties: ClassVar[List[str]] = ["description", "granularities", "id", "tags", "title", "title_base", "title_pattern", "type"] + + 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 AacDateDataset 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 AacDateDataset from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "granularities": obj.get("granularities"), + "id": obj.get("id"), + "tags": obj.get("tags"), + "title": obj.get("title"), + "title_base": obj.get("title_base"), + "title_pattern": obj.get("title_pattern"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_field.py b/gooddata-api-client/gooddata_api_client/models/aac_field.py new file mode 100644 index 000000000..580f6ad65 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_field.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_label import AacLabel +from typing import Optional, Set +from typing_extensions import Self + +class AacField(BaseModel): + """ + AAC field definition (attribute, fact, or aggregated_fact). + """ # noqa: E501 + aggregated_as: Optional[StrictStr] = Field(default=None, description="Aggregation method.") + assigned_to: Optional[StrictStr] = Field(default=None, description="Source fact ID for aggregated fact.") + data_type: Optional[StrictStr] = Field(default=None, description="Data type of the column.") + default_view: Optional[StrictStr] = Field(default=None, description="Default view label ID.") + description: Optional[StrictStr] = Field(default=None, description="Field description.") + is_hidden: Optional[StrictBool] = Field(default=None, description="Deprecated. Use showInAiResults instead.") + labels: Optional[Dict[str, AacLabel]] = Field(default=None, description="Attribute labels.") + locale: Optional[StrictStr] = Field(default=None, description="Locale for sorting.") + show_in_ai_results: Optional[StrictBool] = Field(default=None, description="Whether to show in AI results.") + sort_column: Optional[StrictStr] = Field(default=None, description="Sort column name.") + sort_direction: Optional[StrictStr] = Field(default=None, description="Sort direction.") + source_column: Optional[StrictStr] = Field(default=None, description="Source column in the physical database.") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + type: StrictStr = Field(description="Field type.") + __properties: ClassVar[List[str]] = ["aggregated_as", "assigned_to", "data_type", "default_view", "description", "is_hidden", "labels", "locale", "show_in_ai_results", "sort_column", "sort_direction", "source_column", "tags", "title", "type"] + + @field_validator('data_type') + def data_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + return value + + @field_validator('sort_direction') + def sort_direction_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ASC', 'DESC']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ASC', 'DESC')") + 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 AacField 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 each value in labels (dict) + _field_dict = {} + if self.labels: + for _key_labels in self.labels: + if self.labels[_key_labels]: + _field_dict[_key_labels] = self.labels[_key_labels].to_dict() + _dict['labels'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AacField from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aggregated_as": obj.get("aggregated_as"), + "assigned_to": obj.get("assigned_to"), + "data_type": obj.get("data_type"), + "default_view": obj.get("default_view"), + "description": obj.get("description"), + "is_hidden": obj.get("is_hidden"), + "labels": dict( + (_k, AacLabel.from_dict(_v)) + for _k, _v in obj["labels"].items() + ) + if obj.get("labels") is not None + else None, + "locale": obj.get("locale"), + "show_in_ai_results": obj.get("show_in_ai_results"), + "sort_column": obj.get("sort_column"), + "sort_direction": obj.get("sort_direction"), + "source_column": obj.get("source_column"), + "tags": obj.get("tags"), + "title": obj.get("title"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_filter_state.py b/gooddata-api-client/gooddata_api_client/models/aac_filter_state.py new file mode 100644 index 000000000..d598d0c8d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_filter_state.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 AacFilterState(BaseModel): + """ + Filter state. + """ # noqa: E501 + exclude: Optional[List[StrictStr]] = Field(default=None, description="Excluded values.") + include: Optional[List[StrictStr]] = Field(default=None, description="Included values.") + __properties: ClassVar[List[str]] = ["exclude", "include"] + + 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 AacFilterState 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 AacFilterState from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "exclude": obj.get("exclude"), + "include": obj.get("include") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_geo_area_config.py b/gooddata-api-client/gooddata_api_client/models/aac_geo_area_config.py new file mode 100644 index 000000000..c0bafd453 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_geo_area_config.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.aac_geo_collection_identifier import AacGeoCollectionIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class AacGeoAreaConfig(BaseModel): + """ + GEO area configuration. + """ # noqa: E501 + collection: AacGeoCollectionIdentifier + __properties: ClassVar[List[str]] = ["collection"] + + 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 AacGeoAreaConfig 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 collection + if self.collection: + _dict['collection'] = self.collection.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AacGeoAreaConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "collection": AacGeoCollectionIdentifier.from_dict(obj["collection"]) if obj.get("collection") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_geo_collection_identifier.py b/gooddata-api-client/gooddata_api_client/models/aac_geo_collection_identifier.py new file mode 100644 index 000000000..e1a04884d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_geo_collection_identifier.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class AacGeoCollectionIdentifier(BaseModel): + """ + GEO collection configuration. + """ # noqa: E501 + id: StrictStr = Field(description="Collection identifier.") + kind: Optional[StrictStr] = Field(default='STATIC', description="Type of geo collection.") + __properties: ClassVar[List[str]] = ["id", "kind"] + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['STATIC', 'CUSTOM']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('STATIC', 'CUSTOM')") + 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 AacGeoCollectionIdentifier 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 AacGeoCollectionIdentifier 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"), + "kind": obj.get("kind") if obj.get("kind") is not None else 'STATIC' + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_label.py b/gooddata-api-client/gooddata_api_client/models/aac_label.py new file mode 100644 index 000000000..cac8a30a3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_label.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_geo_area_config import AacGeoAreaConfig +from gooddata_api_client.models.aac_label_translation import AacLabelTranslation +from typing import Optional, Set +from typing_extensions import Self + +class AacLabel(BaseModel): + """ + AAC label definition. + """ # noqa: E501 + data_type: Optional[StrictStr] = Field(default=None, description="Data type of the column.") + description: Optional[StrictStr] = Field(default=None, description="Label description.") + geo_area_config: Optional[AacGeoAreaConfig] = None + is_hidden: Optional[StrictBool] = Field(default=None, description="Deprecated. Use showInAiResults instead.") + locale: Optional[StrictStr] = Field(default=None, description="Locale for sorting.") + show_in_ai_results: Optional[StrictBool] = Field(default=None, description="Whether to show in AI results.") + source_column: Optional[StrictStr] = Field(default=None, description="Source column name.") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + translations: Optional[List[AacLabelTranslation]] = Field(default=None, description="Localized source columns.") + value_type: Optional[StrictStr] = Field(default=None, description="Value type.") + __properties: ClassVar[List[str]] = ["data_type", "description", "geo_area_config", "is_hidden", "locale", "show_in_ai_results", "source_column", "tags", "title", "translations", "value_type"] + + @field_validator('data_type') + def data_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 AacLabel 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 geo_area_config + if self.geo_area_config: + _dict['geo_area_config'] = self.geo_area_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in translations (list) + _items = [] + if self.translations: + for _item_translations in self.translations: + if _item_translations: + _items.append(_item_translations.to_dict()) + _dict['translations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AacLabel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data_type": obj.get("data_type"), + "description": obj.get("description"), + "geo_area_config": AacGeoAreaConfig.from_dict(obj["geo_area_config"]) if obj.get("geo_area_config") is not None else None, + "is_hidden": obj.get("is_hidden"), + "locale": obj.get("locale"), + "show_in_ai_results": obj.get("show_in_ai_results"), + "source_column": obj.get("source_column"), + "tags": obj.get("tags"), + "title": obj.get("title"), + "translations": [AacLabelTranslation.from_dict(_item) for _item in obj["translations"]] if obj.get("translations") is not None else None, + "value_type": obj.get("value_type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_label_translation.py b/gooddata-api-client/gooddata_api_client/models/aac_label_translation.py new file mode 100644 index 000000000..5cc7cffa9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_label_translation.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class AacLabelTranslation(BaseModel): + """ + Localized source columns. + """ # noqa: E501 + locale: StrictStr = Field(description="Locale identifier.") + source_column: StrictStr = Field(description="Source column for translation.") + __properties: ClassVar[List[str]] = ["locale", "source_column"] + + 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 AacLabelTranslation 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 AacLabelTranslation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "locale": obj.get("locale"), + "source_column": obj.get("source_column") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_logical_model.py b/gooddata-api-client/gooddata_api_client/models/aac_logical_model.py new file mode 100644 index 000000000..8aa445693 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_logical_model.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_dataset import AacDataset +from gooddata_api_client.models.aac_date_dataset import AacDateDataset +from typing import Optional, Set +from typing_extensions import Self + +class AacLogicalModel(BaseModel): + """ + AAC logical data model representation compatible with Analytics-as-Code YAML format. + """ # noqa: E501 + datasets: Optional[List[AacDataset]] = Field(default=None, description="An array of datasets.") + date_datasets: Optional[List[AacDateDataset]] = Field(default=None, description="An array of date datasets.") + __properties: ClassVar[List[str]] = ["datasets", "date_datasets"] + + 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 AacLogicalModel 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 each item in datasets (list) + _items = [] + if self.datasets: + for _item_datasets in self.datasets: + if _item_datasets: + _items.append(_item_datasets.to_dict()) + _dict['datasets'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in date_datasets (list) + _items = [] + if self.date_datasets: + for _item_date_datasets in self.date_datasets: + if _item_date_datasets: + _items.append(_item_date_datasets.to_dict()) + _dict['date_datasets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AacLogicalModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "datasets": [AacDataset.from_dict(_item) for _item in obj["datasets"]] if obj.get("datasets") is not None else None, + "date_datasets": [AacDateDataset.from_dict(_item) for _item in obj["date_datasets"]] if obj.get("date_datasets") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_metric.py b/gooddata-api-client/gooddata_api_client/models/aac_metric.py new file mode 100644 index 000000000..36cb3dfdc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_metric.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AacMetric(BaseModel): + """ + AAC metric definition. + """ # noqa: E501 + description: Optional[StrictStr] = Field(default=None, description="Metric description.") + format: Optional[StrictStr] = Field(default=None, description="Default format for metric values.") + id: StrictStr = Field(description="Unique identifier of the metric.") + is_hidden: Optional[StrictBool] = Field(default=None, description="Deprecated. Use showInAiResults instead.") + is_hidden_from_kda: Optional[StrictBool] = Field(default=None, description="Whether to hide from key driver analysis.") + maql: StrictStr = Field(description="MAQL expression defining the metric.") + show_in_ai_results: Optional[StrictBool] = Field(default=None, description="Whether to show in AI results.") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + type: StrictStr = Field(description="Metric type discriminator.") + __properties: ClassVar[List[str]] = ["description", "format", "id", "is_hidden", "is_hidden_from_kda", "maql", "show_in_ai_results", "tags", "title", "type"] + + 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 AacMetric 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 AacMetric from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "format": obj.get("format"), + "id": obj.get("id"), + "is_hidden": obj.get("is_hidden"), + "is_hidden_from_kda": obj.get("is_hidden_from_kda"), + "maql": obj.get("maql"), + "show_in_ai_results": obj.get("show_in_ai_results"), + "tags": obj.get("tags"), + "title": obj.get("title"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_permission.py b/gooddata-api-client/gooddata_api_client/models/aac_permission.py new file mode 100644 index 000000000..ebf6535e8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_permission.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AacPermission(BaseModel): + """ + SHARE permission. + """ # noqa: E501 + all: Optional[StrictBool] = Field(default=None, description="Grant to all users.") + user_groups: Optional[List[StrictStr]] = Field(default=None, description="List of user group IDs.") + users: Optional[List[StrictStr]] = Field(default=None, description="List of user IDs.") + __properties: ClassVar[List[str]] = ["all", "user_groups", "users"] + + 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 AacPermission 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 AacPermission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "all": obj.get("all"), + "user_groups": obj.get("user_groups"), + "users": obj.get("users") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_plugin.py b/gooddata-api-client/gooddata_api_client/models/aac_plugin.py new file mode 100644 index 000000000..a86c5e25f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_plugin.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 AacPlugin(BaseModel): + """ + AAC dashboard plugin definition. + """ # noqa: E501 + description: Optional[StrictStr] = Field(default=None, description="Plugin description.") + id: StrictStr = Field(description="Unique identifier of the plugin.") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + type: StrictStr = Field(description="Plugin type discriminator.") + url: StrictStr = Field(description="URL of the plugin.") + __properties: ClassVar[List[str]] = ["description", "id", "tags", "title", "type", "url"] + + 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 AacPlugin 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 AacPlugin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "id": obj.get("id"), + "tags": obj.get("tags"), + "title": obj.get("title"), + "type": obj.get("type"), + "url": obj.get("url") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_query.py b/gooddata-api-client/gooddata_api_client/models/aac_query.py new file mode 100644 index 000000000..69869fdea --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_query.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_query_fields_value import AacQueryFieldsValue +from gooddata_api_client.models.aac_query_filter import AacQueryFilter +from typing import Optional, Set +from typing_extensions import Self + +class AacQuery(BaseModel): + """ + Query definition. + """ # noqa: E501 + fields: Dict[str, AacQueryFieldsValue] = Field(description="Query fields map: localId -> field definition (identifier string or structured object).") + filter_by: Optional[Dict[str, AacQueryFilter]] = Field(default=None, description="Query filters map: localId -> filter definition.") + sort_by: Optional[List[Optional[Dict[str, Any]]]] = Field(default=None, description="Sorting definitions.") + __properties: ClassVar[List[str]] = ["fields", "filter_by", "sort_by"] + + 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 AacQuery 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 each value in fields (dict) + _field_dict = {} + if self.fields: + for _key_fields in self.fields: + if self.fields[_key_fields]: + _field_dict[_key_fields] = self.fields[_key_fields].to_dict() + _dict['fields'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in filter_by (dict) + _field_dict = {} + if self.filter_by: + for _key_filter_by in self.filter_by: + if self.filter_by[_key_filter_by]: + _field_dict[_key_filter_by] = self.filter_by[_key_filter_by].to_dict() + _dict['filter_by'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AacQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fields": dict( + (_k, AacQueryFieldsValue.from_dict(_v)) + for _k, _v in obj["fields"].items() + ) + if obj.get("fields") is not None + else None, + "filter_by": dict( + (_k, AacQueryFilter.from_dict(_v)) + for _k, _v in obj["filter_by"].items() + ) + if obj.get("filter_by") is not None + else None, + "sort_by": obj.get("sort_by") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_query_fields_value.py b/gooddata-api-client/gooddata_api_client/models/aac_query_fields_value.py new file mode 100644 index 000000000..6c783e88c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_query_fields_value.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, Dict, List, Optional +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +AACQUERYFIELDSVALUE_ONE_OF_SCHEMAS = ["object", "str"] + +class AacQueryFieldsValue(BaseModel): + """ + AacQueryFieldsValue + """ + # data type: str + oneof_schema_1_validator: Optional[StrictStr] = None + # data type: object + oneof_schema_2_validator: Optional[Dict[str, Any]] = None + actual_instance: Optional[Union[object, str]] = None + one_of_schemas: Set[str] = { "object", "str" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = AacQueryFieldsValue.model_construct() + error_messages = [] + match = 0 + # validate data type: str + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: object + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AacQueryFieldsValue with oneOf schemas: object, str. 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 + + # deserialize data into str + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + if match == 0: + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into object + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + if match == 0: + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AacQueryFieldsValue with oneOf schemas: object, str. 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], object, str]]: + """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/gooddata-api-client/gooddata_api_client/models/aac_query_filter.py b/gooddata-api-client/gooddata_api_client/models/aac_query_filter.py new file mode 100644 index 000000000..34a57f03c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_query_filter.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from gooddata_api_client.models.aac_dashboard_filter_from import AacDashboardFilterFrom +from gooddata_api_client.models.aac_filter_state import AacFilterState +from typing import Optional, Set +from typing_extensions import Self + +class AacQueryFilter(BaseModel): + """ + Layer filters. + """ # noqa: E501 + additional_properties: Optional[Dict[str, Optional[Dict[str, Any]]]] = Field(default=None, alias="additionalProperties") + attribute: Optional[StrictStr] = Field(default=None, description="Attribute for ranking filter (identifier or localId).") + bottom: Optional[StrictInt] = Field(default=None, description="Bottom N for ranking filter.") + condition: Optional[StrictStr] = Field(default=None, description="Condition for metric value filter.") + dimensionality: Optional[List[StrictStr]] = Field(default=None, description="Dimensionality for metric value filter.") + display_as: Optional[StrictStr] = Field(default=None, description="Display as label (attribute filter).") + var_from: Optional[AacDashboardFilterFrom] = Field(default=None, alias="from") + granularity: Optional[StrictStr] = Field(default=None, description="Date granularity (date filter).") + null_values_as_zero: Optional[StrictBool] = Field(default=None, description="Null values are treated as zero (metric value filter).") + state: Optional[AacFilterState] = None + to: Optional[AacDashboardFilterFrom] = None + top: Optional[StrictInt] = Field(default=None, description="Top N for ranking filter.") + type: StrictStr = Field(description="Filter type.") + using: Optional[StrictStr] = Field(default=None, description="Reference to attribute/label/date/metric/fact (type-prefixed id).") + value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Value for metric value filter.") + __properties: ClassVar[List[str]] = ["additionalProperties", "attribute", "bottom", "condition", "dimensionality", "display_as", "from", "granularity", "null_values_as_zero", "state", "to", "top", "type", "using", "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 AacQueryFilter 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 var_from + if self.var_from: + _dict['from'] = self.var_from.to_dict() + # override the default output from pydantic by calling `to_dict()` of state + if self.state: + _dict['state'] = self.state.to_dict() + # override the default output from pydantic by calling `to_dict()` of to + if self.to: + _dict['to'] = self.to.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AacQueryFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "additionalProperties": obj.get("additionalProperties"), + "attribute": obj.get("attribute"), + "bottom": obj.get("bottom"), + "condition": obj.get("condition"), + "dimensionality": obj.get("dimensionality"), + "display_as": obj.get("display_as"), + "from": AacDashboardFilterFrom.from_dict(obj["from"]) if obj.get("from") is not None else None, + "granularity": obj.get("granularity"), + "null_values_as_zero": obj.get("null_values_as_zero"), + "state": AacFilterState.from_dict(obj["state"]) if obj.get("state") is not None else None, + "to": AacDashboardFilterFrom.from_dict(obj["to"]) if obj.get("to") is not None else None, + "top": obj.get("top"), + "type": obj.get("type"), + "using": obj.get("using"), + "value": obj.get("value") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_reference.py b/gooddata-api-client/gooddata_api_client/models/aac_reference.py new file mode 100644 index 000000000..46ce12c83 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_reference.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_reference_source import AacReferenceSource +from typing import Optional, Set +from typing_extensions import Self + +class AacReference(BaseModel): + """ + AAC reference to another dataset. + """ # noqa: E501 + dataset: StrictStr = Field(description="Target dataset ID.") + multi_directional: Optional[StrictBool] = Field(default=None, description="Whether the reference is multi-directional.") + sources: List[AacReferenceSource] = Field(description="Source columns for the reference.") + __properties: ClassVar[List[str]] = ["dataset", "multi_directional", "sources"] + + 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 AacReference 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 each item in sources (list) + _items = [] + if self.sources: + for _item_sources in self.sources: + if _item_sources: + _items.append(_item_sources.to_dict()) + _dict['sources'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AacReference from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataset": obj.get("dataset"), + "multi_directional": obj.get("multi_directional"), + "sources": [AacReferenceSource.from_dict(_item) for _item in obj["sources"]] if obj.get("sources") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_reference_source.py b/gooddata-api-client/gooddata_api_client/models/aac_reference_source.py new file mode 100644 index 000000000..6ded9036b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_reference_source.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class AacReferenceSource(BaseModel): + """ + Source columns for the reference. + """ # noqa: E501 + data_type: Optional[StrictStr] = Field(default=None, description="Data type of the column.") + source_column: StrictStr = Field(description="Source column name.") + target: Optional[StrictStr] = Field(default=None, description="Target in the referenced dataset.") + __properties: ClassVar[List[str]] = ["data_type", "source_column", "target"] + + @field_validator('data_type') + def data_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 AacReferenceSource 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 AacReferenceSource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data_type": obj.get("data_type"), + "source_column": obj.get("source_column"), + "target": obj.get("target") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_rich_text_widget.py b/gooddata-api-client/gooddata_api_client/models/aac_rich_text_widget.py new file mode 100644 index 000000000..1a8be47c2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_rich_text_widget.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_widget_size import AacWidgetSize +from typing import Optional, Set +from typing_extensions import Self + +class AacRichTextWidget(BaseModel): + """ + AacRichTextWidget + """ # noqa: E501 + additional_properties: Optional[Dict[str, Optional[Dict[str, Any]]]] = Field(default=None, alias="additionalProperties") + columns: Optional[StrictInt] = Field(default=None, description="Widget width in grid columns (GAAC).") + container: Optional[StrictStr] = Field(default=None, description="Container widget identifier.") + content: StrictStr = Field(description="Rich text content.") + var_date: Optional[StrictStr] = Field(default=None, description="Date dataset for filtering.", alias="date") + description: Optional[Any] = None + drill_down: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + enable_section_headers: Optional[StrictBool] = Field(default=None, description="Whether section headers are enabled for container widgets.") + ignore_dashboard_filters: Optional[List[StrictStr]] = Field(default=None, description="Deprecated. Use ignoredFilters instead.") + ignored_filters: Optional[List[StrictStr]] = Field(default=None, description="A list of dashboard filters to be ignored for this widget (GAAC).") + interactions: Optional[List[Optional[Dict[str, Any]]]] = Field(default=None, description="Widget interactions (GAAC).") + layout_direction: Optional[StrictStr] = Field(default=None, description="Layout direction for container widgets.") + metric: Optional[StrictStr] = Field(default=None, description="Inline metric reference.") + rows: Optional[StrictInt] = Field(default=None, description="Widget height in grid rows (GAAC).") + sections: Optional[List[AacSection]] = Field(default=None, description="Nested sections for layout widgets.") + size: Optional[AacWidgetSize] = None + title: Optional[Any] = None + type: Optional[StrictStr] = Field(default=None, description="Widget type.") + visualization: Optional[StrictStr] = Field(default=None, description="Visualization ID reference.") + visualizations: Optional[List[AacWidget]] = Field(default=None, description="Visualization switcher items.") + zoom_data: Optional[StrictBool] = Field(default=None, description="Enable zooming to the data for certain visualization types (GAAC).") + __properties: ClassVar[List[str]] = [] + + 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 AacRichTextWidget 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 AacRichTextWidget from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj + +from gooddata_api_client.models.aac_section import AacSection +from gooddata_api_client.models.aac_widget import AacWidget +# TODO: Rewrite to not use raise_errors +AacRichTextWidget.model_rebuild(raise_errors=False) + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_section.py b/gooddata-api-client/gooddata_api_client/models/aac_section.py new file mode 100644 index 000000000..61d4fc8d5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_section.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AacSection(BaseModel): + """ + Sections within the tab. + """ # noqa: E501 + description: Optional[StrictStr] = Field(default=None, description="Section description.") + header: Optional[StrictBool] = Field(default=None, description="Whether section header is visible.") + title: Optional[StrictStr] = Field(default=None, description="Section title.") + widgets: Optional[List[AacWidget]] = Field(default=None, description="Widgets in the section.") + __properties: ClassVar[List[str]] = ["description", "header", "title", "widgets"] + + 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 AacSection 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 each item in widgets (list) + _items = [] + if self.widgets: + for _item_widgets in self.widgets: + if _item_widgets: + _items.append(_item_widgets.to_dict()) + _dict['widgets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AacSection from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "header": obj.get("header"), + "title": obj.get("title"), + "widgets": [AacWidget.from_dict(_item) for _item in obj["widgets"]] if obj.get("widgets") is not None else None + }) + return _obj + +from gooddata_api_client.models.aac_widget import AacWidget +# TODO: Rewrite to not use raise_errors +AacSection.model_rebuild(raise_errors=False) + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_tab.py b/gooddata-api-client/gooddata_api_client/models/aac_tab.py new file mode 100644 index 000000000..bd876680f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_tab.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.aac_dashboard_filter import AacDashboardFilter +from gooddata_api_client.models.aac_section import AacSection +from typing import Optional, Set +from typing_extensions import Self + +class AacTab(BaseModel): + """ + Dashboard tabs (for tabbed dashboards). + """ # noqa: E501 + filters: Optional[Dict[str, AacDashboardFilter]] = Field(default=None, description="Tab-specific filters.") + id: StrictStr = Field(description="Unique identifier of the tab.") + sections: Optional[List[AacSection]] = Field(default=None, description="Sections within the tab.") + title: StrictStr = Field(description="Display title for the tab.") + __properties: ClassVar[List[str]] = ["filters", "id", "sections", "title"] + + 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 AacTab 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 each value in filters (dict) + _field_dict = {} + if self.filters: + for _key_filters in self.filters: + if self.filters[_key_filters]: + _field_dict[_key_filters] = self.filters[_key_filters].to_dict() + _dict['filters'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each item in sections (list) + _items = [] + if self.sections: + for _item_sections in self.sections: + if _item_sections: + _items.append(_item_sections.to_dict()) + _dict['sections'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AacTab from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filters": dict( + (_k, AacDashboardFilter.from_dict(_v)) + for _k, _v in obj["filters"].items() + ) + if obj.get("filters") is not None + else None, + "id": obj.get("id"), + "sections": [AacSection.from_dict(_item) for _item in obj["sections"]] if obj.get("sections") is not None else None, + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_visualization.py b/gooddata-api-client/gooddata_api_client/models/aac_visualization.py new file mode 100644 index 000000000..efcc674ed --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_visualization.py @@ -0,0 +1,234 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.aac_visualization_basic_buckets import AacVisualizationBasicBuckets +from gooddata_api_client.models.aac_visualization_bubble_buckets import AacVisualizationBubbleBuckets +from gooddata_api_client.models.aac_visualization_dependency_buckets import AacVisualizationDependencyBuckets +from gooddata_api_client.models.aac_visualization_geo_buckets import AacVisualizationGeoBuckets +from gooddata_api_client.models.aac_visualization_scatter_buckets import AacVisualizationScatterBuckets +from gooddata_api_client.models.aac_visualization_stacked_buckets import AacVisualizationStackedBuckets +from gooddata_api_client.models.aac_visualization_table_buckets import AacVisualizationTableBuckets +from gooddata_api_client.models.aac_visualization_trend_buckets import AacVisualizationTrendBuckets +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +AACVISUALIZATION_ONE_OF_SCHEMAS = ["AacVisualizationBasicBuckets", "AacVisualizationBubbleBuckets", "AacVisualizationDependencyBuckets", "AacVisualizationGeoBuckets", "AacVisualizationScatterBuckets", "AacVisualizationStackedBuckets", "AacVisualizationTableBuckets", "AacVisualizationTrendBuckets"] + +class AacVisualization(BaseModel): + """ + AAC visualization definition. + """ + # data type: AacVisualizationTableBuckets + oneof_schema_1_validator: Optional[AacVisualizationTableBuckets] = None + # data type: AacVisualizationStackedBuckets + oneof_schema_2_validator: Optional[AacVisualizationStackedBuckets] = None + # data type: AacVisualizationScatterBuckets + oneof_schema_3_validator: Optional[AacVisualizationScatterBuckets] = None + # data type: AacVisualizationBubbleBuckets + oneof_schema_4_validator: Optional[AacVisualizationBubbleBuckets] = None + # data type: AacVisualizationTrendBuckets + oneof_schema_5_validator: Optional[AacVisualizationTrendBuckets] = None + # data type: AacVisualizationGeoBuckets + oneof_schema_6_validator: Optional[AacVisualizationGeoBuckets] = None + # data type: AacVisualizationBasicBuckets + oneof_schema_7_validator: Optional[AacVisualizationBasicBuckets] = None + # data type: AacVisualizationDependencyBuckets + oneof_schema_8_validator: Optional[AacVisualizationDependencyBuckets] = None + actual_instance: Optional[Union[AacVisualizationBasicBuckets, AacVisualizationBubbleBuckets, AacVisualizationDependencyBuckets, AacVisualizationGeoBuckets, AacVisualizationScatterBuckets, AacVisualizationStackedBuckets, AacVisualizationTableBuckets, AacVisualizationTrendBuckets]] = None + one_of_schemas: Set[str] = { "AacVisualizationBasicBuckets", "AacVisualizationBubbleBuckets", "AacVisualizationDependencyBuckets", "AacVisualizationGeoBuckets", "AacVisualizationScatterBuckets", "AacVisualizationStackedBuckets", "AacVisualizationTableBuckets", "AacVisualizationTrendBuckets" } + + 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 = AacVisualization.model_construct() + error_messages = [] + match = 0 + # validate data type: AacVisualizationTableBuckets + if not isinstance(v, AacVisualizationTableBuckets): + error_messages.append(f"Error! Input type `{type(v)}` is not `AacVisualizationTableBuckets`") + else: + match += 1 + # validate data type: AacVisualizationStackedBuckets + if not isinstance(v, AacVisualizationStackedBuckets): + error_messages.append(f"Error! Input type `{type(v)}` is not `AacVisualizationStackedBuckets`") + else: + match += 1 + # validate data type: AacVisualizationScatterBuckets + if not isinstance(v, AacVisualizationScatterBuckets): + error_messages.append(f"Error! Input type `{type(v)}` is not `AacVisualizationScatterBuckets`") + else: + match += 1 + # validate data type: AacVisualizationBubbleBuckets + if not isinstance(v, AacVisualizationBubbleBuckets): + error_messages.append(f"Error! Input type `{type(v)}` is not `AacVisualizationBubbleBuckets`") + else: + match += 1 + # validate data type: AacVisualizationTrendBuckets + if not isinstance(v, AacVisualizationTrendBuckets): + error_messages.append(f"Error! Input type `{type(v)}` is not `AacVisualizationTrendBuckets`") + else: + match += 1 + # validate data type: AacVisualizationGeoBuckets + if not isinstance(v, AacVisualizationGeoBuckets): + error_messages.append(f"Error! Input type `{type(v)}` is not `AacVisualizationGeoBuckets`") + else: + match += 1 + # validate data type: AacVisualizationBasicBuckets + if not isinstance(v, AacVisualizationBasicBuckets): + error_messages.append(f"Error! Input type `{type(v)}` is not `AacVisualizationBasicBuckets`") + else: + match += 1 + # validate data type: AacVisualizationDependencyBuckets + if not isinstance(v, AacVisualizationDependencyBuckets): + error_messages.append(f"Error! Input type `{type(v)}` is not `AacVisualizationDependencyBuckets`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AacVisualization with oneOf schemas: AacVisualizationBasicBuckets, AacVisualizationBubbleBuckets, AacVisualizationDependencyBuckets, AacVisualizationGeoBuckets, AacVisualizationScatterBuckets, AacVisualizationStackedBuckets, AacVisualizationTableBuckets, AacVisualizationTrendBuckets. 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 + + # deserialize data into AacVisualizationTableBuckets + try: + if match == 0: + instance.actual_instance = AacVisualizationTableBuckets.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AacVisualizationStackedBuckets + try: + if match == 0: + instance.actual_instance = AacVisualizationStackedBuckets.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AacVisualizationScatterBuckets + try: + if match == 0: + instance.actual_instance = AacVisualizationScatterBuckets.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AacVisualizationBubbleBuckets + try: + if match == 0: + instance.actual_instance = AacVisualizationBubbleBuckets.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AacVisualizationTrendBuckets + try: + if match == 0: + instance.actual_instance = AacVisualizationTrendBuckets.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AacVisualizationGeoBuckets + try: + if match == 0: + instance.actual_instance = AacVisualizationGeoBuckets.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AacVisualizationBasicBuckets + try: + if match == 0: + instance.actual_instance = AacVisualizationBasicBuckets.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AacVisualizationDependencyBuckets + try: + if match == 0: + instance.actual_instance = AacVisualizationDependencyBuckets.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AacVisualization with oneOf schemas: AacVisualizationBasicBuckets, AacVisualizationBubbleBuckets, AacVisualizationDependencyBuckets, AacVisualizationGeoBuckets, AacVisualizationScatterBuckets, AacVisualizationStackedBuckets, AacVisualizationTableBuckets, AacVisualizationTrendBuckets. 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], AacVisualizationBasicBuckets, AacVisualizationBubbleBuckets, AacVisualizationDependencyBuckets, AacVisualizationGeoBuckets, AacVisualizationScatterBuckets, AacVisualizationStackedBuckets, AacVisualizationTableBuckets, AacVisualizationTrendBuckets]]: + """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/gooddata-api-client/gooddata_api_client/models/aac_visualization_basic_buckets.py b/gooddata-api-client/gooddata_api_client/models/aac_visualization_basic_buckets.py new file mode 100644 index 000000000..36bacf1b9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_visualization_basic_buckets.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_query import AacQuery +from gooddata_api_client.models.aac_visualization_layer import AacVisualizationLayer +from typing import Optional, Set +from typing_extensions import Self + +class AacVisualizationBasicBuckets(BaseModel): + """ + AacVisualizationBasicBuckets + """ # noqa: E501 + additional_properties: Optional[Dict[str, Optional[Dict[str, Any]]]] = Field(default=None, alias="additionalProperties") + attributes: Optional[List[Any]] = Field(default=None, description="Attributes bucket (for scatter).") + columns: Optional[List[Any]] = Field(default=None, description="Columns bucket (for tables).") + config: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + description: Optional[StrictStr] = Field(default=None, description="Visualization description.") + var_from: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object", alias="from") + id: StrictStr = Field(description="Unique identifier of the visualization.") + is_hidden: Optional[StrictBool] = Field(default=None, description="Deprecated. Use showInAiResults instead.") + layers: Optional[List[AacVisualizationLayer]] = Field(default=None, description="Visualization data layers (for geo charts).") + metrics: Optional[List[Any]] = Field(default=None, description="Metrics bucket.") + query: AacQuery + rows: Optional[List[Any]] = Field(default=None, description="Rows bucket (for tables).") + segment_by: Optional[List[Any]] = Field(default=None, description="Segment by attributes bucket.") + show_in_ai_results: Optional[StrictBool] = Field(default=None, description="Whether to show in AI results.") + size_by: Optional[List[Any]] = Field(default=None, description="Size by metrics bucket.") + stack_by: Optional[List[Any]] = Field(default=None, description="Stack by attributes bucket.") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + to: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + trend_by: Optional[List[Any]] = Field(default=None, description="Trend by attributes bucket.") + type: StrictStr + view_by: Optional[List[Any]] = Field(default=None, description="View by attributes bucket.") + __properties: ClassVar[List[str]] = [] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['bullet_chart', 'combo_chart', 'donut_chart', 'funnel_chart', 'headline_chart', 'pie_chart', 'pyramid_chart', 'treemap_chart', 'waterfall_chart']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('bullet_chart', 'combo_chart', 'donut_chart', 'funnel_chart', 'headline_chart', 'pie_chart', 'pyramid_chart', 'treemap_chart', 'waterfall_chart')") + 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 AacVisualizationBasicBuckets 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 AacVisualizationBasicBuckets from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_visualization_bubble_buckets.py b/gooddata-api-client/gooddata_api_client/models/aac_visualization_bubble_buckets.py new file mode 100644 index 000000000..a98893d1f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_visualization_bubble_buckets.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_query import AacQuery +from gooddata_api_client.models.aac_visualization_layer import AacVisualizationLayer +from typing import Optional, Set +from typing_extensions import Self + +class AacVisualizationBubbleBuckets(BaseModel): + """ + AacVisualizationBubbleBuckets + """ # noqa: E501 + additional_properties: Optional[Dict[str, Optional[Dict[str, Any]]]] = Field(default=None, alias="additionalProperties") + attributes: Optional[List[Any]] = Field(default=None, description="Attributes bucket (for scatter).") + columns: Optional[List[Any]] = Field(default=None, description="Columns bucket (for tables).") + config: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + description: Optional[StrictStr] = Field(default=None, description="Visualization description.") + var_from: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object", alias="from") + id: StrictStr = Field(description="Unique identifier of the visualization.") + is_hidden: Optional[StrictBool] = Field(default=None, description="Deprecated. Use showInAiResults instead.") + layers: Optional[List[AacVisualizationLayer]] = Field(default=None, description="Visualization data layers (for geo charts).") + metrics: Optional[List[Any]] = Field(default=None, description="Metrics bucket.") + query: AacQuery + rows: Optional[List[Any]] = Field(default=None, description="Rows bucket (for tables).") + segment_by: Optional[List[Any]] = Field(default=None, description="Segment by attributes bucket.") + show_in_ai_results: Optional[StrictBool] = Field(default=None, description="Whether to show in AI results.") + size_by: Optional[List[Any]] = Field(default=None, description="Size by metrics bucket.") + stack_by: Optional[List[Any]] = Field(default=None, description="Stack by attributes bucket.") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + to: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + trend_by: Optional[List[Any]] = Field(default=None, description="Trend by attributes bucket.") + type: StrictStr + view_by: Optional[List[Any]] = Field(default=None, description="View by attributes bucket.") + __properties: ClassVar[List[str]] = [] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['bubble_chart']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('bubble_chart')") + 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 AacVisualizationBubbleBuckets 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 AacVisualizationBubbleBuckets from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_visualization_dependency_buckets.py b/gooddata-api-client/gooddata_api_client/models/aac_visualization_dependency_buckets.py new file mode 100644 index 000000000..6ee71274c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_visualization_dependency_buckets.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_query import AacQuery +from gooddata_api_client.models.aac_visualization_layer import AacVisualizationLayer +from typing import Optional, Set +from typing_extensions import Self + +class AacVisualizationDependencyBuckets(BaseModel): + """ + AacVisualizationDependencyBuckets + """ # noqa: E501 + additional_properties: Optional[Dict[str, Optional[Dict[str, Any]]]] = Field(default=None, alias="additionalProperties") + attributes: Optional[List[Any]] = Field(default=None, description="Attributes bucket (for scatter).") + columns: Optional[List[Any]] = Field(default=None, description="Columns bucket (for tables).") + config: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + description: Optional[StrictStr] = Field(default=None, description="Visualization description.") + var_from: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object", alias="from") + id: StrictStr = Field(description="Unique identifier of the visualization.") + is_hidden: Optional[StrictBool] = Field(default=None, description="Deprecated. Use showInAiResults instead.") + layers: Optional[List[AacVisualizationLayer]] = Field(default=None, description="Visualization data layers (for geo charts).") + metrics: Optional[List[Any]] = Field(default=None, description="Metrics bucket.") + query: AacQuery + rows: Optional[List[Any]] = Field(default=None, description="Rows bucket (for tables).") + segment_by: Optional[List[Any]] = Field(default=None, description="Segment by attributes bucket.") + show_in_ai_results: Optional[StrictBool] = Field(default=None, description="Whether to show in AI results.") + size_by: Optional[List[Any]] = Field(default=None, description="Size by metrics bucket.") + stack_by: Optional[List[Any]] = Field(default=None, description="Stack by attributes bucket.") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + to: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + trend_by: Optional[List[Any]] = Field(default=None, description="Trend by attributes bucket.") + type: StrictStr + view_by: Optional[List[Any]] = Field(default=None, description="View by attributes bucket.") + __properties: ClassVar[List[str]] = [] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dependency_wheel_chart', 'sankey_chart']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dependency_wheel_chart', 'sankey_chart')") + 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 AacVisualizationDependencyBuckets 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 AacVisualizationDependencyBuckets from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_visualization_geo_buckets.py b/gooddata-api-client/gooddata_api_client/models/aac_visualization_geo_buckets.py new file mode 100644 index 000000000..eb7aa4a91 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_visualization_geo_buckets.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_query import AacQuery +from gooddata_api_client.models.aac_visualization_layer import AacVisualizationLayer +from typing import Optional, Set +from typing_extensions import Self + +class AacVisualizationGeoBuckets(BaseModel): + """ + AacVisualizationGeoBuckets + """ # noqa: E501 + additional_properties: Optional[Dict[str, Optional[Dict[str, Any]]]] = Field(default=None, alias="additionalProperties") + attributes: Optional[List[Any]] = Field(default=None, description="Attributes bucket (for scatter).") + columns: Optional[List[Any]] = Field(default=None, description="Columns bucket (for tables).") + config: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + description: Optional[StrictStr] = Field(default=None, description="Visualization description.") + var_from: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object", alias="from") + id: StrictStr = Field(description="Unique identifier of the visualization.") + is_hidden: Optional[StrictBool] = Field(default=None, description="Deprecated. Use showInAiResults instead.") + layers: Optional[List[AacVisualizationLayer]] = Field(default=None, description="Visualization data layers (for geo charts).") + metrics: Optional[List[Any]] = Field(default=None, description="Metrics bucket.") + query: AacQuery + rows: Optional[List[Any]] = Field(default=None, description="Rows bucket (for tables).") + segment_by: Optional[List[Any]] = Field(default=None, description="Segment by attributes bucket.") + show_in_ai_results: Optional[StrictBool] = Field(default=None, description="Whether to show in AI results.") + size_by: Optional[List[Any]] = Field(default=None, description="Size by metrics bucket.") + stack_by: Optional[List[Any]] = Field(default=None, description="Stack by attributes bucket.") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + to: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + trend_by: Optional[List[Any]] = Field(default=None, description="Trend by attributes bucket.") + type: StrictStr + view_by: Optional[List[Any]] = Field(default=None, description="View by attributes bucket.") + __properties: ClassVar[List[str]] = [] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['geo_chart', 'geo_area_chart']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('geo_chart', 'geo_area_chart')") + 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 AacVisualizationGeoBuckets 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 AacVisualizationGeoBuckets from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_visualization_layer.py b/gooddata-api-client/gooddata_api_client/models/aac_visualization_layer.py new file mode 100644 index 000000000..23392b886 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_visualization_layer.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.aac_query_fields_value import AacQueryFieldsValue +from gooddata_api_client.models.aac_query_filter import AacQueryFilter +from typing import Optional, Set +from typing_extensions import Self + +class AacVisualizationLayer(BaseModel): + """ + Visualization data layers (for geo charts). + """ # noqa: E501 + additional_properties: Optional[Dict[str, Optional[Dict[str, Any]]]] = Field(default=None, alias="additionalProperties") + config: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + filters: Optional[Dict[str, AacQueryFilter]] = Field(default=None, description="Layer filters.") + id: StrictStr = Field(description="Unique identifier of the layer.") + metrics: Optional[List[AacQueryFieldsValue]] = Field(default=None, description="Layer metrics.") + segment_by: Optional[List[AacQueryFieldsValue]] = Field(default=None, description="Layer segment by.") + sorts: Optional[List[Optional[Dict[str, Any]]]] = Field(default=None, description="Layer sorting definitions.") + title: Optional[StrictStr] = Field(default=None, description="Layer title.") + type: Optional[StrictStr] = Field(default=None, description="Layer type.") + view_by: Optional[List[AacQueryFieldsValue]] = Field(default=None, description="Layer view by.") + __properties: ClassVar[List[str]] = ["additionalProperties", "config", "filters", "id", "metrics", "segment_by", "sorts", "title", "type", "view_by"] + + 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 AacVisualizationLayer 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 each value in filters (dict) + _field_dict = {} + if self.filters: + for _key_filters in self.filters: + if self.filters[_key_filters]: + _field_dict[_key_filters] = self.filters[_key_filters].to_dict() + _dict['filters'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each item in metrics (list) + _items = [] + if self.metrics: + for _item_metrics in self.metrics: + if _item_metrics: + _items.append(_item_metrics.to_dict()) + _dict['metrics'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in segment_by (list) + _items = [] + if self.segment_by: + for _item_segment_by in self.segment_by: + if _item_segment_by: + _items.append(_item_segment_by.to_dict()) + _dict['segment_by'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in view_by (list) + _items = [] + if self.view_by: + for _item_view_by in self.view_by: + if _item_view_by: + _items.append(_item_view_by.to_dict()) + _dict['view_by'] = _items + # set to None if config (nullable) is None + # and model_fields_set contains the field + if self.config is None and "config" in self.model_fields_set: + _dict['config'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AacVisualizationLayer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "additionalProperties": obj.get("additionalProperties"), + "config": obj.get("config"), + "filters": dict( + (_k, AacQueryFilter.from_dict(_v)) + for _k, _v in obj["filters"].items() + ) + if obj.get("filters") is not None + else None, + "id": obj.get("id"), + "metrics": [AacQueryFieldsValue.from_dict(_item) for _item in obj["metrics"]] if obj.get("metrics") is not None else None, + "segment_by": [AacQueryFieldsValue.from_dict(_item) for _item in obj["segment_by"]] if obj.get("segment_by") is not None else None, + "sorts": obj.get("sorts"), + "title": obj.get("title"), + "type": obj.get("type"), + "view_by": [AacQueryFieldsValue.from_dict(_item) for _item in obj["view_by"]] if obj.get("view_by") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_visualization_scatter_buckets.py b/gooddata-api-client/gooddata_api_client/models/aac_visualization_scatter_buckets.py new file mode 100644 index 000000000..247f56ae4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_visualization_scatter_buckets.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_query import AacQuery +from gooddata_api_client.models.aac_visualization_layer import AacVisualizationLayer +from typing import Optional, Set +from typing_extensions import Self + +class AacVisualizationScatterBuckets(BaseModel): + """ + AacVisualizationScatterBuckets + """ # noqa: E501 + additional_properties: Optional[Dict[str, Optional[Dict[str, Any]]]] = Field(default=None, alias="additionalProperties") + attributes: Optional[List[Any]] = Field(default=None, description="Attributes bucket (for scatter).") + columns: Optional[List[Any]] = Field(default=None, description="Columns bucket (for tables).") + config: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + description: Optional[StrictStr] = Field(default=None, description="Visualization description.") + var_from: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object", alias="from") + id: StrictStr = Field(description="Unique identifier of the visualization.") + is_hidden: Optional[StrictBool] = Field(default=None, description="Deprecated. Use showInAiResults instead.") + layers: Optional[List[AacVisualizationLayer]] = Field(default=None, description="Visualization data layers (for geo charts).") + metrics: Optional[List[Any]] = Field(default=None, description="Metrics bucket.") + query: AacQuery + rows: Optional[List[Any]] = Field(default=None, description="Rows bucket (for tables).") + segment_by: Optional[List[Any]] = Field(default=None, description="Segment by attributes bucket.") + show_in_ai_results: Optional[StrictBool] = Field(default=None, description="Whether to show in AI results.") + size_by: Optional[List[Any]] = Field(default=None, description="Size by metrics bucket.") + stack_by: Optional[List[Any]] = Field(default=None, description="Stack by attributes bucket.") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + to: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + trend_by: Optional[List[Any]] = Field(default=None, description="Trend by attributes bucket.") + type: StrictStr + view_by: Optional[List[Any]] = Field(default=None, description="View by attributes bucket.") + __properties: ClassVar[List[str]] = [] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['scatter_chart']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('scatter_chart')") + 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 AacVisualizationScatterBuckets 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 AacVisualizationScatterBuckets from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_visualization_stacked_buckets.py b/gooddata-api-client/gooddata_api_client/models/aac_visualization_stacked_buckets.py new file mode 100644 index 000000000..02daaf5e9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_visualization_stacked_buckets.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_query import AacQuery +from gooddata_api_client.models.aac_visualization_layer import AacVisualizationLayer +from typing import Optional, Set +from typing_extensions import Self + +class AacVisualizationStackedBuckets(BaseModel): + """ + AacVisualizationStackedBuckets + """ # noqa: E501 + additional_properties: Optional[Dict[str, Optional[Dict[str, Any]]]] = Field(default=None, alias="additionalProperties") + attributes: Optional[List[Any]] = Field(default=None, description="Attributes bucket (for scatter).") + columns: Optional[List[Any]] = Field(default=None, description="Columns bucket (for tables).") + config: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + description: Optional[StrictStr] = Field(default=None, description="Visualization description.") + var_from: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object", alias="from") + id: StrictStr = Field(description="Unique identifier of the visualization.") + is_hidden: Optional[StrictBool] = Field(default=None, description="Deprecated. Use showInAiResults instead.") + layers: Optional[List[AacVisualizationLayer]] = Field(default=None, description="Visualization data layers (for geo charts).") + metrics: Optional[List[Any]] = Field(default=None, description="Metrics bucket.") + query: AacQuery + rows: Optional[List[Any]] = Field(default=None, description="Rows bucket (for tables).") + segment_by: Optional[List[Any]] = Field(default=None, description="Segment by attributes bucket.") + show_in_ai_results: Optional[StrictBool] = Field(default=None, description="Whether to show in AI results.") + size_by: Optional[List[Any]] = Field(default=None, description="Size by metrics bucket.") + stack_by: Optional[List[Any]] = Field(default=None, description="Stack by attributes bucket.") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + to: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + trend_by: Optional[List[Any]] = Field(default=None, description="Trend by attributes bucket.") + type: StrictStr + view_by: Optional[List[Any]] = Field(default=None, description="View by attributes bucket.") + __properties: ClassVar[List[str]] = [] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['bar_chart', 'column_chart', 'area_chart']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('bar_chart', 'column_chart', 'area_chart')") + 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 AacVisualizationStackedBuckets 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 AacVisualizationStackedBuckets from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_visualization_switcher_widget.py b/gooddata-api-client/gooddata_api_client/models/aac_visualization_switcher_widget.py new file mode 100644 index 000000000..63f0e33c4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_visualization_switcher_widget.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_widget_size import AacWidgetSize +from typing import Optional, Set +from typing_extensions import Self + +class AacVisualizationSwitcherWidget(BaseModel): + """ + AacVisualizationSwitcherWidget + """ # noqa: E501 + additional_properties: Optional[Dict[str, Optional[Dict[str, Any]]]] = Field(default=None, alias="additionalProperties") + columns: Optional[StrictInt] = Field(default=None, description="Widget width in grid columns (GAAC).") + container: Optional[StrictStr] = Field(default=None, description="Container widget identifier.") + content: Optional[StrictStr] = Field(default=None, description="Rich text content.") + var_date: Optional[StrictStr] = Field(default=None, description="Date dataset for filtering.", alias="date") + description: Optional[Any] = None + drill_down: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + enable_section_headers: Optional[StrictBool] = Field(default=None, description="Whether section headers are enabled for container widgets.") + ignore_dashboard_filters: Optional[List[StrictStr]] = Field(default=None, description="Deprecated. Use ignoredFilters instead.") + ignored_filters: Optional[List[StrictStr]] = Field(default=None, description="A list of dashboard filters to be ignored for this widget (GAAC).") + interactions: Optional[List[Optional[Dict[str, Any]]]] = Field(default=None, description="Widget interactions (GAAC).") + layout_direction: Optional[StrictStr] = Field(default=None, description="Layout direction for container widgets.") + metric: Optional[StrictStr] = Field(default=None, description="Inline metric reference.") + rows: Optional[StrictInt] = Field(default=None, description="Widget height in grid rows (GAAC).") + sections: Optional[List[AacSection]] = Field(default=None, description="Nested sections for layout widgets.") + size: Optional[AacWidgetSize] = None + title: Optional[Any] = None + type: Optional[StrictStr] = Field(default=None, description="Widget type.") + visualization: Optional[StrictStr] = Field(default=None, description="Visualization ID reference.") + visualizations: List[AacVisualizationWidget] + zoom_data: Optional[StrictBool] = Field(default=None, description="Enable zooming to the data for certain visualization types (GAAC).") + __properties: ClassVar[List[str]] = [] + + 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 AacVisualizationSwitcherWidget 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 AacVisualizationSwitcherWidget from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj + +from gooddata_api_client.models.aac_section import AacSection +from gooddata_api_client.models.aac_visualization_widget import AacVisualizationWidget +# TODO: Rewrite to not use raise_errors +AacVisualizationSwitcherWidget.model_rebuild(raise_errors=False) + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_visualization_table_buckets.py b/gooddata-api-client/gooddata_api_client/models/aac_visualization_table_buckets.py new file mode 100644 index 000000000..a046a7e15 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_visualization_table_buckets.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_query import AacQuery +from gooddata_api_client.models.aac_visualization_layer import AacVisualizationLayer +from typing import Optional, Set +from typing_extensions import Self + +class AacVisualizationTableBuckets(BaseModel): + """ + AacVisualizationTableBuckets + """ # noqa: E501 + additional_properties: Optional[Dict[str, Optional[Dict[str, Any]]]] = Field(default=None, alias="additionalProperties") + attributes: Optional[List[Any]] = Field(default=None, description="Attributes bucket (for scatter).") + columns: Optional[List[Any]] = Field(default=None, description="Columns bucket (for tables).") + config: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + description: Optional[StrictStr] = Field(default=None, description="Visualization description.") + var_from: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object", alias="from") + id: StrictStr = Field(description="Unique identifier of the visualization.") + is_hidden: Optional[StrictBool] = Field(default=None, description="Deprecated. Use showInAiResults instead.") + layers: Optional[List[AacVisualizationLayer]] = Field(default=None, description="Visualization data layers (for geo charts).") + metrics: Optional[List[Any]] = Field(default=None, description="Metrics bucket.") + query: AacQuery + rows: Optional[List[Any]] = Field(default=None, description="Rows bucket (for tables).") + segment_by: Optional[List[Any]] = Field(default=None, description="Segment by attributes bucket.") + show_in_ai_results: Optional[StrictBool] = Field(default=None, description="Whether to show in AI results.") + size_by: Optional[List[Any]] = Field(default=None, description="Size by metrics bucket.") + stack_by: Optional[List[Any]] = Field(default=None, description="Stack by attributes bucket.") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + to: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + trend_by: Optional[List[Any]] = Field(default=None, description="Trend by attributes bucket.") + type: StrictStr + view_by: Optional[List[Any]] = Field(default=None, description="View by attributes bucket.") + __properties: ClassVar[List[str]] = [] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['table', 'heatmap_chart', 'repeater_chart']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('table', 'heatmap_chart', 'repeater_chart')") + 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 AacVisualizationTableBuckets 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 AacVisualizationTableBuckets from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_visualization_trend_buckets.py b/gooddata-api-client/gooddata_api_client/models/aac_visualization_trend_buckets.py new file mode 100644 index 000000000..e27a6d79f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_visualization_trend_buckets.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_query import AacQuery +from gooddata_api_client.models.aac_visualization_layer import AacVisualizationLayer +from typing import Optional, Set +from typing_extensions import Self + +class AacVisualizationTrendBuckets(BaseModel): + """ + AacVisualizationTrendBuckets + """ # noqa: E501 + additional_properties: Optional[Dict[str, Optional[Dict[str, Any]]]] = Field(default=None, alias="additionalProperties") + attributes: Optional[List[Any]] = Field(default=None, description="Attributes bucket (for scatter).") + columns: Optional[List[Any]] = Field(default=None, description="Columns bucket (for tables).") + config: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + description: Optional[StrictStr] = Field(default=None, description="Visualization description.") + var_from: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object", alias="from") + id: StrictStr = Field(description="Unique identifier of the visualization.") + is_hidden: Optional[StrictBool] = Field(default=None, description="Deprecated. Use showInAiResults instead.") + layers: Optional[List[AacVisualizationLayer]] = Field(default=None, description="Visualization data layers (for geo charts).") + metrics: Optional[List[Any]] = Field(default=None, description="Metrics bucket.") + query: AacQuery + rows: Optional[List[Any]] = Field(default=None, description="Rows bucket (for tables).") + segment_by: Optional[List[Any]] = Field(default=None, description="Segment by attributes bucket.") + show_in_ai_results: Optional[StrictBool] = Field(default=None, description="Whether to show in AI results.") + size_by: Optional[List[Any]] = Field(default=None, description="Size by metrics bucket.") + stack_by: Optional[List[Any]] = Field(default=None, description="Stack by attributes bucket.") + tags: Optional[List[StrictStr]] = Field(default=None, description="Metadata tags.") + title: Optional[StrictStr] = Field(default=None, description="Human readable title.") + to: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + trend_by: Optional[List[Any]] = Field(default=None, description="Trend by attributes bucket.") + type: StrictStr + view_by: Optional[List[Any]] = Field(default=None, description="View by attributes bucket.") + __properties: ClassVar[List[str]] = [] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['line_chart']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('line_chart')") + 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 AacVisualizationTrendBuckets 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 AacVisualizationTrendBuckets from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_visualization_widget.py b/gooddata-api-client/gooddata_api_client/models/aac_visualization_widget.py new file mode 100644 index 000000000..f77284e5a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_visualization_widget.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.aac_widget_size import AacWidgetSize +from typing import Optional, Set +from typing_extensions import Self + +class AacVisualizationWidget(BaseModel): + """ + AacVisualizationWidget + """ # noqa: E501 + additional_properties: Optional[Dict[str, Optional[Dict[str, Any]]]] = Field(default=None, alias="additionalProperties") + columns: Optional[StrictInt] = Field(default=None, description="Widget width in grid columns (GAAC).") + container: Optional[StrictStr] = Field(default=None, description="Container widget identifier.") + content: Optional[StrictStr] = Field(default=None, description="Rich text content.") + var_date: Optional[StrictStr] = Field(default=None, description="Date dataset for filtering.", alias="date") + description: Optional[Any] = None + drill_down: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + enable_section_headers: Optional[StrictBool] = Field(default=None, description="Whether section headers are enabled for container widgets.") + ignore_dashboard_filters: Optional[List[StrictStr]] = Field(default=None, description="Deprecated. Use ignoredFilters instead.") + ignored_filters: Optional[List[StrictStr]] = Field(default=None, description="A list of dashboard filters to be ignored for this widget (GAAC).") + interactions: Optional[List[Optional[Dict[str, Any]]]] = Field(default=None, description="Widget interactions (GAAC).") + layout_direction: Optional[StrictStr] = Field(default=None, description="Layout direction for container widgets.") + metric: Optional[StrictStr] = Field(default=None, description="Inline metric reference.") + rows: Optional[StrictInt] = Field(default=None, description="Widget height in grid rows (GAAC).") + sections: Optional[List[AacSection]] = Field(default=None, description="Nested sections for layout widgets.") + size: Optional[AacWidgetSize] = None + title: Optional[Any] = None + type: Optional[StrictStr] = Field(default=None, description="Widget type.") + visualization: StrictStr = Field(description="Visualization ID reference.") + visualizations: Optional[List[AacWidget]] = Field(default=None, description="Visualization switcher items.") + zoom_data: Optional[StrictBool] = Field(default=None, description="Enable zooming to the data for certain visualization types (GAAC).") + __properties: ClassVar[List[str]] = [] + + 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 AacVisualizationWidget 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 AacVisualizationWidget from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj + +from gooddata_api_client.models.aac_section import AacSection +from gooddata_api_client.models.aac_widget import AacWidget +# TODO: Rewrite to not use raise_errors +AacVisualizationWidget.model_rebuild(raise_errors=False) + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_widget.py b/gooddata-api-client/gooddata_api_client/models/aac_widget.py new file mode 100644 index 000000000..b450a3ab4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_widget.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +AACWIDGET_ONE_OF_SCHEMAS = ["AacContainerWidget", "AacRichTextWidget", "AacVisualizationSwitcherWidget", "AacVisualizationWidget"] + +class AacWidget(BaseModel): + """ + Widgets in the section. + """ + # data type: AacVisualizationWidget + oneof_schema_1_validator: Optional[AacVisualizationWidget] = None + # data type: AacRichTextWidget + oneof_schema_2_validator: Optional[AacRichTextWidget] = None + # data type: AacVisualizationSwitcherWidget + oneof_schema_3_validator: Optional[AacVisualizationSwitcherWidget] = None + # data type: AacContainerWidget + oneof_schema_4_validator: Optional[AacContainerWidget] = None + actual_instance: Optional[Union[AacContainerWidget, AacRichTextWidget, AacVisualizationSwitcherWidget, AacVisualizationWidget]] = None + one_of_schemas: Set[str] = { "AacContainerWidget", "AacRichTextWidget", "AacVisualizationSwitcherWidget", "AacVisualizationWidget" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = AacWidget.model_construct() + error_messages = [] + match = 0 + # validate data type: AacVisualizationWidget + if not isinstance(v, AacVisualizationWidget): + error_messages.append(f"Error! Input type `{type(v)}` is not `AacVisualizationWidget`") + else: + match += 1 + # validate data type: AacRichTextWidget + if not isinstance(v, AacRichTextWidget): + error_messages.append(f"Error! Input type `{type(v)}` is not `AacRichTextWidget`") + else: + match += 1 + # validate data type: AacVisualizationSwitcherWidget + if not isinstance(v, AacVisualizationSwitcherWidget): + error_messages.append(f"Error! Input type `{type(v)}` is not `AacVisualizationSwitcherWidget`") + else: + match += 1 + # validate data type: AacContainerWidget + if not isinstance(v, AacContainerWidget): + error_messages.append(f"Error! Input type `{type(v)}` is not `AacContainerWidget`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AacWidget with oneOf schemas: AacContainerWidget, AacRichTextWidget, AacVisualizationSwitcherWidget, AacVisualizationWidget. 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 + + # deserialize data into AacVisualizationWidget + try: + if match == 0: + instance.actual_instance = AacVisualizationWidget.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AacRichTextWidget + try: + if match == 0: + instance.actual_instance = AacRichTextWidget.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AacVisualizationSwitcherWidget + try: + if match == 0: + instance.actual_instance = AacVisualizationSwitcherWidget.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AacContainerWidget + try: + if match == 0: + instance.actual_instance = AacContainerWidget.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AacWidget with oneOf schemas: AacContainerWidget, AacRichTextWidget, AacVisualizationSwitcherWidget, AacVisualizationWidget. 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], AacContainerWidget, AacRichTextWidget, AacVisualizationSwitcherWidget, AacVisualizationWidget]]: + """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 gooddata_api_client.models.aac_container_widget import AacContainerWidget +from gooddata_api_client.models.aac_rich_text_widget import AacRichTextWidget +from gooddata_api_client.models.aac_visualization_switcher_widget import AacVisualizationSwitcherWidget +from gooddata_api_client.models.aac_visualization_widget import AacVisualizationWidget +# TODO: Rewrite to not use raise_errors +AacWidget.model_rebuild(raise_errors=False) + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_widget_size.py b/gooddata-api-client/gooddata_api_client/models/aac_widget_size.py new file mode 100644 index 000000000..b431fb51f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_widget_size.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AacWidgetSize(BaseModel): + """ + Deprecated widget size (legacy AAC). + """ # noqa: E501 + height: Optional[StrictInt] = Field(default=None, description="Height in grid rows.") + height_as_ratio: Optional[StrictBool] = Field(default=None, description="Height definition mode.") + width: Optional[StrictInt] = Field(default=None, description="Width in grid columns.") + __properties: ClassVar[List[str]] = ["height", "height_as_ratio", "width"] + + 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 AacWidgetSize 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 AacWidgetSize from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "height": obj.get("height"), + "height_as_ratio": obj.get("height_as_ratio"), + "width": obj.get("width") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aac_workspace_data_filter.py b/gooddata-api-client/gooddata_api_client/models/aac_workspace_data_filter.py new file mode 100644 index 000000000..255bcd957 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aac_workspace_data_filter.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class AacWorkspaceDataFilter(BaseModel): + """ + Workspace data filters. + """ # noqa: E501 + data_type: StrictStr = Field(description="Data type of the column.") + filter_id: StrictStr = Field(description="Filter identifier.") + source_column: StrictStr = Field(description="Source column name.") + __properties: ClassVar[List[str]] = ["data_type", "filter_id", "source_column"] + + @field_validator('data_type') + def data_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 AacWorkspaceDataFilter 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 AacWorkspaceDataFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data_type": obj.get("data_type"), + "filter_id": obj.get("filter_id"), + "source_column": obj.get("source_column") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/absolute_date_filter.py b/gooddata-api-client/gooddata_api_client/models/absolute_date_filter.py new file mode 100644 index 000000000..ef2a39934 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/absolute_date_filter.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.absolute_date_filter_absolute_date_filter import AbsoluteDateFilterAbsoluteDateFilter +from typing import Optional, Set +from typing_extensions import Self + +class AbsoluteDateFilter(BaseModel): + """ + A datetime filter specifying exact from and to values. + """ # noqa: E501 + absolute_date_filter: AbsoluteDateFilterAbsoluteDateFilter = Field(alias="absoluteDateFilter") + __properties: ClassVar[List[str]] = ["absoluteDateFilter"] + + 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 AbsoluteDateFilter 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 absolute_date_filter + if self.absolute_date_filter: + _dict['absoluteDateFilter'] = self.absolute_date_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AbsoluteDateFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "absoluteDateFilter": AbsoluteDateFilterAbsoluteDateFilter.from_dict(obj["absoluteDateFilter"]) if obj.get("absoluteDateFilter") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/absolute_date_filter_absolute_date_filter.py b/gooddata-api-client/gooddata_api_client/models/absolute_date_filter_absolute_date_filter.py new file mode 100644 index 000000000..9973a5159 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/absolute_date_filter_absolute_date_filter.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.afm_object_identifier_dataset import AfmObjectIdentifierDataset +from typing import Optional, Set +from typing_extensions import Self + +class AbsoluteDateFilterAbsoluteDateFilter(BaseModel): + """ + AbsoluteDateFilterAbsoluteDateFilter + """ # noqa: E501 + apply_on_result: Optional[StrictBool] = Field(default=None, alias="applyOnResult") + dataset: AfmObjectIdentifierDataset + empty_value_handling: Optional[StrictStr] = Field(default='EXCLUDE', description="Specifies how rows with empty (null/missing) date values should be handled. INCLUDE includes empty dates in addition to the date range restriction, EXCLUDE removes rows with empty dates (default), ONLY keeps only rows with empty dates.", alias="emptyValueHandling") + var_from: Annotated[str, Field(strict=True)] = Field(alias="from") + local_identifier: Optional[StrictStr] = Field(default=None, alias="localIdentifier") + to: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["applyOnResult", "dataset", "emptyValueHandling", "from", "localIdentifier", "to"] + + @field_validator('empty_value_handling') + def empty_value_handling_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INCLUDE', 'EXCLUDE', 'ONLY']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INCLUDE', 'EXCLUDE', 'ONLY')") + return value + + @field_validator('var_from') + def var_from_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^\d{4}-\d{1,2}-\d{1,2}( \d{1,2}:\d{1,2})?$", value): + raise ValueError(r"must validate the regular expression /^\d{4}-\d{1,2}-\d{1,2}( \d{1,2}:\d{1,2})?$/") + return value + + @field_validator('to') + def to_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^\d{4}-\d{1,2}-\d{1,2}( \d{1,2}:\d{1,2})?$", value): + raise ValueError(r"must validate the regular expression /^\d{4}-\d{1,2}-\d{1,2}( \d{1,2}:\d{1,2})?$/") + 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 AbsoluteDateFilterAbsoluteDateFilter 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 dataset + if self.dataset: + _dict['dataset'] = self.dataset.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AbsoluteDateFilterAbsoluteDateFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applyOnResult": obj.get("applyOnResult"), + "dataset": AfmObjectIdentifierDataset.from_dict(obj["dataset"]) if obj.get("dataset") is not None else None, + "emptyValueHandling": obj.get("emptyValueHandling") if obj.get("emptyValueHandling") is not None else 'EXCLUDE', + "from": obj.get("from"), + "localIdentifier": obj.get("localIdentifier"), + "to": obj.get("to") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/abstract_measure_value_filter.py b/gooddata-api-client/gooddata_api_client/models/abstract_measure_value_filter.py new file mode 100644 index 000000000..c235da094 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/abstract_measure_value_filter.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.comparison_measure_value_filter import ComparisonMeasureValueFilter +from gooddata_api_client.models.compound_measure_value_filter import CompoundMeasureValueFilter +from gooddata_api_client.models.range_measure_value_filter import RangeMeasureValueFilter +from gooddata_api_client.models.ranking_filter import RankingFilter +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ABSTRACTMEASUREVALUEFILTER_ONE_OF_SCHEMAS = ["ComparisonMeasureValueFilter", "CompoundMeasureValueFilter", "RangeMeasureValueFilter", "RankingFilter"] + +class AbstractMeasureValueFilter(BaseModel): + """ + AbstractMeasureValueFilter + """ + # data type: ComparisonMeasureValueFilter + oneof_schema_1_validator: Optional[ComparisonMeasureValueFilter] = None + # data type: RangeMeasureValueFilter + oneof_schema_2_validator: Optional[RangeMeasureValueFilter] = None + # data type: CompoundMeasureValueFilter + oneof_schema_3_validator: Optional[CompoundMeasureValueFilter] = None + # data type: RankingFilter + oneof_schema_4_validator: Optional[RankingFilter] = None + actual_instance: Optional[Union[ComparisonMeasureValueFilter, CompoundMeasureValueFilter, RangeMeasureValueFilter, RankingFilter]] = None + one_of_schemas: Set[str] = { "ComparisonMeasureValueFilter", "CompoundMeasureValueFilter", "RangeMeasureValueFilter", "RankingFilter" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = AbstractMeasureValueFilter.model_construct() + error_messages = [] + match = 0 + # validate data type: ComparisonMeasureValueFilter + if not isinstance(v, ComparisonMeasureValueFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `ComparisonMeasureValueFilter`") + else: + match += 1 + # validate data type: RangeMeasureValueFilter + if not isinstance(v, RangeMeasureValueFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `RangeMeasureValueFilter`") + else: + match += 1 + # validate data type: CompoundMeasureValueFilter + if not isinstance(v, CompoundMeasureValueFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `CompoundMeasureValueFilter`") + else: + match += 1 + # validate data type: RankingFilter + if not isinstance(v, RankingFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `RankingFilter`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AbstractMeasureValueFilter with oneOf schemas: ComparisonMeasureValueFilter, CompoundMeasureValueFilter, RangeMeasureValueFilter, RankingFilter. 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 + + # deserialize data into ComparisonMeasureValueFilter + try: + if match == 0: + instance.actual_instance = ComparisonMeasureValueFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RangeMeasureValueFilter + try: + if match == 0: + instance.actual_instance = RangeMeasureValueFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CompoundMeasureValueFilter + try: + if match == 0: + instance.actual_instance = CompoundMeasureValueFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RankingFilter + try: + if match == 0: + instance.actual_instance = RankingFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AbstractMeasureValueFilter with oneOf schemas: ComparisonMeasureValueFilter, CompoundMeasureValueFilter, RangeMeasureValueFilter, RankingFilter. 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], ComparisonMeasureValueFilter, CompoundMeasureValueFilter, RangeMeasureValueFilter, RankingFilter]]: + """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/gooddata-api-client/gooddata_api_client/models/active_object_identification.py b/gooddata-api-client/gooddata_api_client/models/active_object_identification.py new file mode 100644 index 000000000..caeea2be9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/active_object_identification.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ActiveObjectIdentification(BaseModel): + """ + Object, with which the user is actively working. + """ # noqa: E501 + id: StrictStr = Field(description="Object ID.") + type: StrictStr = Field(description="Object type, e.g. dashboard.") + workspace_id: StrictStr = Field(description="Workspace ID.", alias="workspaceId") + __properties: ClassVar[List[str]] = ["id", "type", "workspaceId"] + + 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 ActiveObjectIdentification 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 ActiveObjectIdentification 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"), + "workspaceId": obj.get("workspaceId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/ad_hoc_automation.py b/gooddata-api-client/gooddata_api_client/models/ad_hoc_automation.py new file mode 100644 index 000000000..1ca0ee297 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/ad_hoc_automation.py @@ -0,0 +1,204 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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_extensions import Annotated +from gooddata_api_client.models.automation_alert import AutomationAlert +from gooddata_api_client.models.automation_dashboard_tabular_export import AutomationDashboardTabularExport +from gooddata_api_client.models.automation_external_recipient import AutomationExternalRecipient +from gooddata_api_client.models.automation_image_export import AutomationImageExport +from gooddata_api_client.models.automation_metadata import AutomationMetadata +from gooddata_api_client.models.automation_raw_export import AutomationRawExport +from gooddata_api_client.models.automation_slides_export import AutomationSlidesExport +from gooddata_api_client.models.automation_tabular_export import AutomationTabularExport +from gooddata_api_client.models.automation_visual_export import AutomationVisualExport +from gooddata_api_client.models.declarative_analytical_dashboard_identifier import DeclarativeAnalyticalDashboardIdentifier +from gooddata_api_client.models.declarative_notification_channel_identifier import DeclarativeNotificationChannelIdentifier +from gooddata_api_client.models.declarative_user_identifier import DeclarativeUserIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class AdHocAutomation(BaseModel): + """ + AdHocAutomation + """ # noqa: E501 + alert: Optional[AutomationAlert] = None + analytical_dashboard: Optional[DeclarativeAnalyticalDashboardIdentifier] = Field(default=None, alias="analyticalDashboard") + dashboard_tabular_exports: Optional[List[AutomationDashboardTabularExport]] = Field(default=None, alias="dashboardTabularExports") + description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + details: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=10000)]]] = Field(default=None, description="Additional details to be included in the automated message.") + external_recipients: Optional[List[AutomationExternalRecipient]] = Field(default=None, description="External recipients of the automation action results.", alias="externalRecipients") + image_exports: Optional[List[AutomationImageExport]] = Field(default=None, alias="imageExports") + metadata: Optional[AutomationMetadata] = None + notification_channel: Optional[DeclarativeNotificationChannelIdentifier] = Field(default=None, alias="notificationChannel") + raw_exports: Optional[List[AutomationRawExport]] = Field(default=None, alias="rawExports") + recipients: Optional[List[DeclarativeUserIdentifier]] = None + slides_exports: Optional[List[AutomationSlidesExport]] = Field(default=None, alias="slidesExports") + tabular_exports: Optional[List[AutomationTabularExport]] = Field(default=None, alias="tabularExports") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + visual_exports: Optional[List[AutomationVisualExport]] = Field(default=None, alias="visualExports") + __properties: ClassVar[List[str]] = ["alert", "analyticalDashboard", "dashboardTabularExports", "description", "details", "externalRecipients", "imageExports", "metadata", "notificationChannel", "rawExports", "recipients", "slidesExports", "tabularExports", "tags", "title", "visualExports"] + + 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 AdHocAutomation 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 alert + if self.alert: + _dict['alert'] = self.alert.to_dict() + # override the default output from pydantic by calling `to_dict()` of analytical_dashboard + if self.analytical_dashboard: + _dict['analyticalDashboard'] = self.analytical_dashboard.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in dashboard_tabular_exports (list) + _items = [] + if self.dashboard_tabular_exports: + for _item_dashboard_tabular_exports in self.dashboard_tabular_exports: + if _item_dashboard_tabular_exports: + _items.append(_item_dashboard_tabular_exports.to_dict()) + _dict['dashboardTabularExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in external_recipients (list) + _items = [] + if self.external_recipients: + for _item_external_recipients in self.external_recipients: + if _item_external_recipients: + _items.append(_item_external_recipients.to_dict()) + _dict['externalRecipients'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in image_exports (list) + _items = [] + if self.image_exports: + for _item_image_exports in self.image_exports: + if _item_image_exports: + _items.append(_item_image_exports.to_dict()) + _dict['imageExports'] = _items + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of notification_channel + if self.notification_channel: + _dict['notificationChannel'] = self.notification_channel.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in raw_exports (list) + _items = [] + if self.raw_exports: + for _item_raw_exports in self.raw_exports: + if _item_raw_exports: + _items.append(_item_raw_exports.to_dict()) + _dict['rawExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in recipients (list) + _items = [] + if self.recipients: + for _item_recipients in self.recipients: + if _item_recipients: + _items.append(_item_recipients.to_dict()) + _dict['recipients'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in slides_exports (list) + _items = [] + if self.slides_exports: + for _item_slides_exports in self.slides_exports: + if _item_slides_exports: + _items.append(_item_slides_exports.to_dict()) + _dict['slidesExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in tabular_exports (list) + _items = [] + if self.tabular_exports: + for _item_tabular_exports in self.tabular_exports: + if _item_tabular_exports: + _items.append(_item_tabular_exports.to_dict()) + _dict['tabularExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in visual_exports (list) + _items = [] + if self.visual_exports: + for _item_visual_exports in self.visual_exports: + if _item_visual_exports: + _items.append(_item_visual_exports.to_dict()) + _dict['visualExports'] = _items + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdHocAutomation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alert": AutomationAlert.from_dict(obj["alert"]) if obj.get("alert") is not None else None, + "analyticalDashboard": DeclarativeAnalyticalDashboardIdentifier.from_dict(obj["analyticalDashboard"]) if obj.get("analyticalDashboard") is not None else None, + "dashboardTabularExports": [AutomationDashboardTabularExport.from_dict(_item) for _item in obj["dashboardTabularExports"]] if obj.get("dashboardTabularExports") is not None else None, + "description": obj.get("description"), + "details": obj.get("details"), + "externalRecipients": [AutomationExternalRecipient.from_dict(_item) for _item in obj["externalRecipients"]] if obj.get("externalRecipients") is not None else None, + "imageExports": [AutomationImageExport.from_dict(_item) for _item in obj["imageExports"]] if obj.get("imageExports") is not None else None, + "metadata": AutomationMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "notificationChannel": DeclarativeNotificationChannelIdentifier.from_dict(obj["notificationChannel"]) if obj.get("notificationChannel") is not None else None, + "rawExports": [AutomationRawExport.from_dict(_item) for _item in obj["rawExports"]] if obj.get("rawExports") is not None else None, + "recipients": [DeclarativeUserIdentifier.from_dict(_item) for _item in obj["recipients"]] if obj.get("recipients") is not None else None, + "slidesExports": [AutomationSlidesExport.from_dict(_item) for _item in obj["slidesExports"]] if obj.get("slidesExports") is not None else None, + "tabularExports": [AutomationTabularExport.from_dict(_item) for _item in obj["tabularExports"]] if obj.get("tabularExports") is not None else None, + "tags": obj.get("tags"), + "title": obj.get("title"), + "visualExports": [AutomationVisualExport.from_dict(_item) for _item in obj["visualExports"]] if obj.get("visualExports") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm.py b/gooddata-api-client/gooddata_api_client/models/afm.py new file mode 100644 index 000000000..effe34725 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.afm_filters_inner import AFMFiltersInner +from gooddata_api_client.models.attribute_item import AttributeItem +from gooddata_api_client.models.measure_item import MeasureItem +from gooddata_api_client.models.metric_definition_override import MetricDefinitionOverride +from typing import Optional, Set +from typing_extensions import Self + +class AFM(BaseModel): + """ + Top level executable entity. Combination of [A]ttributes, [F]ilters & [M]etrics. + """ # noqa: E501 + attributes: List[AttributeItem] = Field(description="Attributes to be used in the computation.") + aux_measures: Optional[List[MeasureItem]] = Field(default=None, description="Metrics to be referenced from other AFM objects (e.g. filters) but not included in the result.", alias="auxMeasures") + filters: List[AFMFiltersInner] = Field(description="Various filter types to filter the execution result.") + measure_definition_overrides: Optional[List[MetricDefinitionOverride]] = Field(default=None, description="(EXPERIMENTAL) Override definitions of catalog metrics for this request. Allows substituting a catalog metric's MAQL definition without modifying the stored definition.", alias="measureDefinitionOverrides") + measures: List[MeasureItem] = Field(description="Metrics to be computed.") + __properties: ClassVar[List[str]] = ["attributes", "auxMeasures", "filters", "measureDefinitionOverrides", "measures"] + + 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 AFM 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 each item in attributes (list) + _items = [] + if self.attributes: + for _item_attributes in self.attributes: + if _item_attributes: + _items.append(_item_attributes.to_dict()) + _dict['attributes'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in aux_measures (list) + _items = [] + if self.aux_measures: + for _item_aux_measures in self.aux_measures: + if _item_aux_measures: + _items.append(_item_aux_measures.to_dict()) + _dict['auxMeasures'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in measure_definition_overrides (list) + _items = [] + if self.measure_definition_overrides: + for _item_measure_definition_overrides in self.measure_definition_overrides: + if _item_measure_definition_overrides: + _items.append(_item_measure_definition_overrides.to_dict()) + _dict['measureDefinitionOverrides'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in measures (list) + _items = [] + if self.measures: + for _item_measures in self.measures: + if _item_measures: + _items.append(_item_measures.to_dict()) + _dict['measures'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AFM from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": [AttributeItem.from_dict(_item) for _item in obj["attributes"]] if obj.get("attributes") is not None else None, + "auxMeasures": [MeasureItem.from_dict(_item) for _item in obj["auxMeasures"]] if obj.get("auxMeasures") is not None else None, + "filters": [AFMFiltersInner.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "measureDefinitionOverrides": [MetricDefinitionOverride.from_dict(_item) for _item in obj["measureDefinitionOverrides"]] if obj.get("measureDefinitionOverrides") is not None else None, + "measures": [MeasureItem.from_dict(_item) for _item in obj["measures"]] if obj.get("measures") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_cancel_tokens.py b/gooddata-api-client/gooddata_api_client/models/afm_cancel_tokens.py new file mode 100644 index 000000000..172cece16 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_cancel_tokens.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class AfmCancelTokens(BaseModel): + """ + Any information related to cancellation. + """ # noqa: E501 + result_id_to_cancel_token_pairs: Dict[str, StrictStr] = Field(description="resultId to cancel token pairs", alias="resultIdToCancelTokenPairs") + __properties: ClassVar[List[str]] = ["resultIdToCancelTokenPairs"] + + 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 AfmCancelTokens 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 AfmCancelTokens from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resultIdToCancelTokenPairs": obj.get("resultIdToCancelTokenPairs") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_execution.py b/gooddata-api-client/gooddata_api_client/models/afm_execution.py new file mode 100644 index 000000000..3ea1595b9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_execution.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.afm import AFM +from gooddata_api_client.models.execution_settings import ExecutionSettings +from gooddata_api_client.models.result_spec import ResultSpec +from typing import Optional, Set +from typing_extensions import Self + +class AfmExecution(BaseModel): + """ + AfmExecution + """ # noqa: E501 + execution: AFM + result_spec: ResultSpec = Field(alias="resultSpec") + settings: Optional[ExecutionSettings] = None + __properties: ClassVar[List[str]] = ["execution", "resultSpec", "settings"] + + 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 AfmExecution 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 execution + if self.execution: + _dict['execution'] = self.execution.to_dict() + # override the default output from pydantic by calling `to_dict()` of result_spec + if self.result_spec: + _dict['resultSpec'] = self.result_spec.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AfmExecution from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "execution": AFM.from_dict(obj["execution"]) if obj.get("execution") is not None else None, + "resultSpec": ResultSpec.from_dict(obj["resultSpec"]) if obj.get("resultSpec") is not None else None, + "settings": ExecutionSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_execution_response.py b/gooddata-api-client/gooddata_api_client/models/afm_execution_response.py new file mode 100644 index 000000000..6339b2cdd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_execution_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.execution_response import ExecutionResponse +from typing import Optional, Set +from typing_extensions import Self + +class AfmExecutionResponse(BaseModel): + """ + Response to AFM execution request + """ # noqa: E501 + execution_response: ExecutionResponse = Field(alias="executionResponse") + __properties: ClassVar[List[str]] = ["executionResponse"] + + 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 AfmExecutionResponse 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 execution_response + if self.execution_response: + _dict['executionResponse'] = self.execution_response.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AfmExecutionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "executionResponse": ExecutionResponse.from_dict(obj["executionResponse"]) if obj.get("executionResponse") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_filters_inner.py b/gooddata-api-client/gooddata_api_client/models/afm_filters_inner.py new file mode 100644 index 000000000..57571b871 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_filters_inner.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.abstract_measure_value_filter import AbstractMeasureValueFilter +from gooddata_api_client.models.filter_definition_for_simple_measure import FilterDefinitionForSimpleMeasure +from gooddata_api_client.models.inline_filter_definition import InlineFilterDefinition +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +AFMFILTERSINNER_ONE_OF_SCHEMAS = ["AbstractMeasureValueFilter", "FilterDefinitionForSimpleMeasure", "InlineFilterDefinition"] + +class AFMFiltersInner(BaseModel): + """ + AFMFiltersInner + """ + # data type: AbstractMeasureValueFilter + oneof_schema_1_validator: Optional[AbstractMeasureValueFilter] = None + # data type: FilterDefinitionForSimpleMeasure + oneof_schema_2_validator: Optional[FilterDefinitionForSimpleMeasure] = None + # data type: InlineFilterDefinition + oneof_schema_3_validator: Optional[InlineFilterDefinition] = None + actual_instance: Optional[Union[AbstractMeasureValueFilter, FilterDefinitionForSimpleMeasure, InlineFilterDefinition]] = None + one_of_schemas: Set[str] = { "AbstractMeasureValueFilter", "FilterDefinitionForSimpleMeasure", "InlineFilterDefinition" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = AFMFiltersInner.model_construct() + error_messages = [] + match = 0 + # validate data type: AbstractMeasureValueFilter + if not isinstance(v, AbstractMeasureValueFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `AbstractMeasureValueFilter`") + else: + match += 1 + # validate data type: FilterDefinitionForSimpleMeasure + if not isinstance(v, FilterDefinitionForSimpleMeasure): + error_messages.append(f"Error! Input type `{type(v)}` is not `FilterDefinitionForSimpleMeasure`") + else: + match += 1 + # validate data type: InlineFilterDefinition + if not isinstance(v, InlineFilterDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `InlineFilterDefinition`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AFMFiltersInner with oneOf schemas: AbstractMeasureValueFilter, FilterDefinitionForSimpleMeasure, InlineFilterDefinition. 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 + + # deserialize data into AbstractMeasureValueFilter + try: + if match == 0: + instance.actual_instance = AbstractMeasureValueFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FilterDefinitionForSimpleMeasure + try: + if match == 0: + instance.actual_instance = FilterDefinitionForSimpleMeasure.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into InlineFilterDefinition + try: + if match == 0: + instance.actual_instance = InlineFilterDefinition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AFMFiltersInner with oneOf schemas: AbstractMeasureValueFilter, FilterDefinitionForSimpleMeasure, InlineFilterDefinition. 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], AbstractMeasureValueFilter, FilterDefinitionForSimpleMeasure, InlineFilterDefinition]]: + """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/gooddata-api-client/gooddata_api_client/models/afm_identifier.py b/gooddata-api-client/gooddata_api_client/models/afm_identifier.py new file mode 100644 index 000000000..fa8cdd0ae --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_identifier.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.afm_local_identifier import AfmLocalIdentifier +from gooddata_api_client.models.afm_object_identifier import AfmObjectIdentifier +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +AFMIDENTIFIER_ONE_OF_SCHEMAS = ["AfmLocalIdentifier", "AfmObjectIdentifier"] + +class AfmIdentifier(BaseModel): + """ + Reference to the attribute label to which the filter should be applied. + """ + # data type: AfmObjectIdentifier + oneof_schema_1_validator: Optional[AfmObjectIdentifier] = None + # data type: AfmLocalIdentifier + oneof_schema_2_validator: Optional[AfmLocalIdentifier] = None + actual_instance: Optional[Union[AfmLocalIdentifier, AfmObjectIdentifier]] = None + one_of_schemas: Set[str] = { "AfmLocalIdentifier", "AfmObjectIdentifier" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = AfmIdentifier.model_construct() + error_messages = [] + match = 0 + # validate data type: AfmObjectIdentifier + if not isinstance(v, AfmObjectIdentifier): + error_messages.append(f"Error! Input type `{type(v)}` is not `AfmObjectIdentifier`") + else: + match += 1 + # validate data type: AfmLocalIdentifier + if not isinstance(v, AfmLocalIdentifier): + error_messages.append(f"Error! Input type `{type(v)}` is not `AfmLocalIdentifier`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AfmIdentifier with oneOf schemas: AfmLocalIdentifier, AfmObjectIdentifier. 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 + + # deserialize data into AfmObjectIdentifier + try: + if match == 0: + instance.actual_instance = AfmObjectIdentifier.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AfmLocalIdentifier + try: + if match == 0: + instance.actual_instance = AfmLocalIdentifier.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AfmIdentifier with oneOf schemas: AfmLocalIdentifier, AfmObjectIdentifier. 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], AfmLocalIdentifier, AfmObjectIdentifier]]: + """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/gooddata-api-client/gooddata_api_client/models/afm_local_identifier.py b/gooddata-api-client/gooddata_api_client/models/afm_local_identifier.py new file mode 100644 index 000000000..0a558d0d4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_local_identifier.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AfmLocalIdentifier(BaseModel): + """ + AfmLocalIdentifier + """ # noqa: E501 + local_identifier: Annotated[str, Field(strict=True)] = Field(alias="localIdentifier") + __properties: ClassVar[List[str]] = ["localIdentifier"] + + @field_validator('local_identifier') + def local_identifier_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[.a-zA-Z0-9_-]+$", value): + raise ValueError(r"must validate the regular expression /^[.a-zA-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 AfmLocalIdentifier 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 AfmLocalIdentifier from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "localIdentifier": obj.get("localIdentifier") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_object_identifier.py b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier.py new file mode 100644 index 000000000..ca9a3106d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.afm_object_identifier_identifier import AfmObjectIdentifierIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class AfmObjectIdentifier(BaseModel): + """ + ObjectIdentifier with `identifier` wrapper. This serves to distinguish MD object identifiers in AFM request from local identifiers. + """ # noqa: E501 + identifier: AfmObjectIdentifierIdentifier + __properties: ClassVar[List[str]] = ["identifier"] + + 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 AfmObjectIdentifier 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 identifier + if self.identifier: + _dict['identifier'] = self.identifier.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AfmObjectIdentifier from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": AfmObjectIdentifierIdentifier.from_dict(obj["identifier"]) if obj.get("identifier") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_attribute.py b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_attribute.py new file mode 100644 index 000000000..1875d835d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_attribute.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.afm_object_identifier_attribute_identifier import AfmObjectIdentifierAttributeIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class AfmObjectIdentifierAttribute(BaseModel): + """ + Reference to the date attribute to use. + """ # noqa: E501 + identifier: AfmObjectIdentifierAttributeIdentifier + __properties: ClassVar[List[str]] = ["identifier"] + + 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 AfmObjectIdentifierAttribute 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 identifier + if self.identifier: + _dict['identifier'] = self.identifier.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AfmObjectIdentifierAttribute from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": AfmObjectIdentifierAttributeIdentifier.from_dict(obj["identifier"]) if obj.get("identifier") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_attribute_identifier.py b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_attribute_identifier.py new file mode 100644 index 000000000..6af85f2ec --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_attribute_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AfmObjectIdentifierAttributeIdentifier(BaseModel): + """ + AfmObjectIdentifierAttributeIdentifier + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attribute']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attribute')") + 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 AfmObjectIdentifierAttributeIdentifier 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 AfmObjectIdentifierAttributeIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_core.py b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_core.py new file mode 100644 index 000000000..3a4397fe3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_core.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.afm_object_identifier_core_identifier import AfmObjectIdentifierCoreIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class AfmObjectIdentifierCore(BaseModel): + """ + Reference to the metric, fact or attribute object to use for the metric. + """ # noqa: E501 + identifier: AfmObjectIdentifierCoreIdentifier + __properties: ClassVar[List[str]] = ["identifier"] + + 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 AfmObjectIdentifierCore 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 identifier + if self.identifier: + _dict['identifier'] = self.identifier.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AfmObjectIdentifierCore from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": AfmObjectIdentifierCoreIdentifier.from_dict(obj["identifier"]) if obj.get("identifier") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_core_identifier.py b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_core_identifier.py new file mode 100644 index 000000000..2fb6ec41e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_core_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AfmObjectIdentifierCoreIdentifier(BaseModel): + """ + AfmObjectIdentifierCoreIdentifier + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attribute', 'label', 'fact', 'metric']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attribute', 'label', 'fact', 'metric')") + 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 AfmObjectIdentifierCoreIdentifier 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 AfmObjectIdentifierCoreIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_dataset.py b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_dataset.py new file mode 100644 index 000000000..0cda35c5d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_dataset.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.afm_object_identifier_dataset_identifier import AfmObjectIdentifierDatasetIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class AfmObjectIdentifierDataset(BaseModel): + """ + Reference to the date dataset to which the filter should be applied. + """ # noqa: E501 + identifier: AfmObjectIdentifierDatasetIdentifier + __properties: ClassVar[List[str]] = ["identifier"] + + 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 AfmObjectIdentifierDataset 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 identifier + if self.identifier: + _dict['identifier'] = self.identifier.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AfmObjectIdentifierDataset from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": AfmObjectIdentifierDatasetIdentifier.from_dict(obj["identifier"]) if obj.get("identifier") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_dataset_identifier.py b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_dataset_identifier.py new file mode 100644 index 000000000..de39a03be --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_dataset_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AfmObjectIdentifierDatasetIdentifier(BaseModel): + """ + AfmObjectIdentifierDatasetIdentifier + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dataset']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dataset')") + 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 AfmObjectIdentifierDatasetIdentifier 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 AfmObjectIdentifierDatasetIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_identifier.py b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_identifier.py new file mode 100644 index 000000000..70b4f1ada --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AfmObjectIdentifierIdentifier(BaseModel): + """ + AfmObjectIdentifierIdentifier + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['analyticalDashboard', 'attribute', 'dashboardPlugin', 'dataset', 'fact', 'label', 'metric', 'prompt', 'visualizationObject', 'filterContext']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('analyticalDashboard', 'attribute', 'dashboardPlugin', 'dataset', 'fact', 'label', 'metric', 'prompt', 'visualizationObject', 'filterContext')") + 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 AfmObjectIdentifierIdentifier 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 AfmObjectIdentifierIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_label.py b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_label.py new file mode 100644 index 000000000..6df69a95f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_label.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.afm_object_identifier_label_identifier import AfmObjectIdentifierLabelIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class AfmObjectIdentifierLabel(BaseModel): + """ + AfmObjectIdentifierLabel + """ # noqa: E501 + identifier: AfmObjectIdentifierLabelIdentifier + __properties: ClassVar[List[str]] = ["identifier"] + + 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 AfmObjectIdentifierLabel 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 identifier + if self.identifier: + _dict['identifier'] = self.identifier.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AfmObjectIdentifierLabel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": AfmObjectIdentifierLabelIdentifier.from_dict(obj["identifier"]) if obj.get("identifier") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_label_identifier.py b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_label_identifier.py new file mode 100644 index 000000000..babeb585a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_object_identifier_label_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AfmObjectIdentifierLabelIdentifier(BaseModel): + """ + AfmObjectIdentifierLabelIdentifier + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['label']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('label')") + 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 AfmObjectIdentifierLabelIdentifier 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 AfmObjectIdentifierLabelIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_valid_descendants_query.py b/gooddata-api-client/gooddata_api_client/models/afm_valid_descendants_query.py new file mode 100644 index 000000000..6ca770624 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_valid_descendants_query.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.afm_object_identifier_attribute import AfmObjectIdentifierAttribute +from typing import Optional, Set +from typing_extensions import Self + +class AfmValidDescendantsQuery(BaseModel): + """ + Entity describing the valid descendants request. + """ # noqa: E501 + attributes: List[AfmObjectIdentifierAttribute] = Field(description="List of identifiers of the attributes to get the valid descendants for.") + __properties: ClassVar[List[str]] = ["attributes"] + + 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 AfmValidDescendantsQuery 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 each item in attributes (list) + _items = [] + if self.attributes: + for _item_attributes in self.attributes: + if _item_attributes: + _items.append(_item_attributes.to_dict()) + _dict['attributes'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AfmValidDescendantsQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": [AfmObjectIdentifierAttribute.from_dict(_item) for _item in obj["attributes"]] if obj.get("attributes") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_valid_descendants_response.py b/gooddata-api-client/gooddata_api_client/models/afm_valid_descendants_response.py new file mode 100644 index 000000000..3b9aefc83 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_valid_descendants_response.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.afm_object_identifier_attribute import AfmObjectIdentifierAttribute +from typing import Optional, Set +from typing_extensions import Self + +class AfmValidDescendantsResponse(BaseModel): + """ + Entity describing the valid descendants response. + """ # noqa: E501 + valid_descendants: Dict[str, List[AfmObjectIdentifierAttribute]] = Field(description="Map of attribute identifiers to list of valid descendants identifiers.", alias="validDescendants") + __properties: ClassVar[List[str]] = ["validDescendants"] + + 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 AfmValidDescendantsResponse 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 each value in valid_descendants (dict of array) + _field_dict_of_array = {} + if self.valid_descendants: + for _key_valid_descendants in self.valid_descendants: + if self.valid_descendants[_key_valid_descendants] is not None: + _field_dict_of_array[_key_valid_descendants] = [ + _item.to_dict() for _item in self.valid_descendants[_key_valid_descendants] + ] + _dict['validDescendants'] = _field_dict_of_array + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AfmValidDescendantsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "validDescendants": dict( + (_k, + [AfmObjectIdentifierAttribute.from_dict(_item) for _item in _v] + if _v is not None + else None + ) + for _k, _v in obj.get("validDescendants", {}).items() + ) + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_valid_objects_query.py b/gooddata-api-client/gooddata_api_client/models/afm_valid_objects_query.py new file mode 100644 index 000000000..d6cd50913 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_valid_objects_query.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.afm import AFM +from typing import Optional, Set +from typing_extensions import Self + +class AfmValidObjectsQuery(BaseModel): + """ + Entity holding AFM and list of object types whose validity should be computed. + """ # noqa: E501 + afm: AFM + types: List[StrictStr] + __properties: ClassVar[List[str]] = ["afm", "types"] + + @field_validator('types') + def types_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['facts', 'attributes', 'measures']): + raise ValueError("each list item must be one of ('facts', 'attributes', 'measures')") + 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 AfmValidObjectsQuery 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 afm + if self.afm: + _dict['afm'] = self.afm.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AfmValidObjectsQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "afm": AFM.from_dict(obj["afm"]) if obj.get("afm") is not None else None, + "types": obj.get("types") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/afm_valid_objects_response.py b/gooddata-api-client/gooddata_api_client/models/afm_valid_objects_response.py new file mode 100644 index 000000000..382b556eb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/afm_valid_objects_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.rest_api_identifier import RestApiIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class AfmValidObjectsResponse(BaseModel): + """ + All objects of specified types valid with respect to given AFM. + """ # noqa: E501 + items: List[RestApiIdentifier] + __properties: ClassVar[List[str]] = ["items"] + + 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 AfmValidObjectsResponse 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 each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AfmValidObjectsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [RestApiIdentifier.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/alert_afm.py b/gooddata-api-client/gooddata_api_client/models/alert_afm.py new file mode 100644 index 000000000..42e3f52b7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/alert_afm.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.attribute_item import AttributeItem +from gooddata_api_client.models.filter_definition import FilterDefinition +from gooddata_api_client.models.measure_item import MeasureItem +from typing import Optional, Set +from typing_extensions import Self + +class AlertAfm(BaseModel): + """ + AlertAfm + """ # noqa: E501 + attributes: Optional[List[AttributeItem]] = Field(default=None, description="Attributes to be used in the computation.") + aux_measures: Optional[List[MeasureItem]] = Field(default=None, description="Metrics to be referenced from other AFM objects (e.g. filters) but not included in the result.", alias="auxMeasures") + filters: List[FilterDefinition] = Field(description="Various filter types to filter execution result. For anomaly detection, exactly one dataset is specified in the condition. The AFM may contain multiple date filters for different datasets, but only the date filter matching the dataset from the condition is used for anomaly detection.") + measures: List[MeasureItem] = Field(description="Metrics to be computed. One metric if the alert condition is evaluated to a scalar. Two metrics when they should be evaluated to each other.") + __properties: ClassVar[List[str]] = ["attributes", "auxMeasures", "filters", "measures"] + + 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 AlertAfm 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 each item in attributes (list) + _items = [] + if self.attributes: + for _item_attributes in self.attributes: + if _item_attributes: + _items.append(_item_attributes.to_dict()) + _dict['attributes'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in aux_measures (list) + _items = [] + if self.aux_measures: + for _item_aux_measures in self.aux_measures: + if _item_aux_measures: + _items.append(_item_aux_measures.to_dict()) + _dict['auxMeasures'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in measures (list) + _items = [] + if self.measures: + for _item_measures in self.measures: + if _item_measures: + _items.append(_item_measures.to_dict()) + _dict['measures'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AlertAfm from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": [AttributeItem.from_dict(_item) for _item in obj["attributes"]] if obj.get("attributes") is not None else None, + "auxMeasures": [MeasureItem.from_dict(_item) for _item in obj["auxMeasures"]] if obj.get("auxMeasures") is not None else None, + "filters": [FilterDefinition.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "measures": [MeasureItem.from_dict(_item) for _item in obj["measures"]] if obj.get("measures") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/alert_condition.py b/gooddata-api-client/gooddata_api_client/models/alert_condition.py new file mode 100644 index 000000000..27d1e8db3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/alert_condition.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.anomaly_detection_wrapper import AnomalyDetectionWrapper +from gooddata_api_client.models.comparison_wrapper import ComparisonWrapper +from gooddata_api_client.models.range_wrapper import RangeWrapper +from gooddata_api_client.models.relative_wrapper import RelativeWrapper +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ALERTCONDITION_ONE_OF_SCHEMAS = ["AnomalyDetectionWrapper", "ComparisonWrapper", "RangeWrapper", "RelativeWrapper"] + +class AlertCondition(BaseModel): + """ + Alert trigger condition. + """ + # data type: ComparisonWrapper + oneof_schema_1_validator: Optional[ComparisonWrapper] = None + # data type: RangeWrapper + oneof_schema_2_validator: Optional[RangeWrapper] = None + # data type: RelativeWrapper + oneof_schema_3_validator: Optional[RelativeWrapper] = None + # data type: AnomalyDetectionWrapper + oneof_schema_4_validator: Optional[AnomalyDetectionWrapper] = None + actual_instance: Optional[Union[AnomalyDetectionWrapper, ComparisonWrapper, RangeWrapper, RelativeWrapper]] = None + one_of_schemas: Set[str] = { "AnomalyDetectionWrapper", "ComparisonWrapper", "RangeWrapper", "RelativeWrapper" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = AlertCondition.model_construct() + error_messages = [] + match = 0 + # validate data type: ComparisonWrapper + if not isinstance(v, ComparisonWrapper): + error_messages.append(f"Error! Input type `{type(v)}` is not `ComparisonWrapper`") + else: + match += 1 + # validate data type: RangeWrapper + if not isinstance(v, RangeWrapper): + error_messages.append(f"Error! Input type `{type(v)}` is not `RangeWrapper`") + else: + match += 1 + # validate data type: RelativeWrapper + if not isinstance(v, RelativeWrapper): + error_messages.append(f"Error! Input type `{type(v)}` is not `RelativeWrapper`") + else: + match += 1 + # validate data type: AnomalyDetectionWrapper + if not isinstance(v, AnomalyDetectionWrapper): + error_messages.append(f"Error! Input type `{type(v)}` is not `AnomalyDetectionWrapper`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AlertCondition with oneOf schemas: AnomalyDetectionWrapper, ComparisonWrapper, RangeWrapper, RelativeWrapper. 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 + + # deserialize data into ComparisonWrapper + try: + if match == 0: + instance.actual_instance = ComparisonWrapper.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RangeWrapper + try: + if match == 0: + instance.actual_instance = RangeWrapper.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RelativeWrapper + try: + if match == 0: + instance.actual_instance = RelativeWrapper.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AnomalyDetectionWrapper + try: + if match == 0: + instance.actual_instance = AnomalyDetectionWrapper.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AlertCondition with oneOf schemas: AnomalyDetectionWrapper, ComparisonWrapper, RangeWrapper, RelativeWrapper. 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], AnomalyDetectionWrapper, ComparisonWrapper, RangeWrapper, RelativeWrapper]]: + """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/gooddata-api-client/gooddata_api_client/models/alert_condition_operand.py b/gooddata-api-client/gooddata_api_client/models/alert_condition_operand.py new file mode 100644 index 000000000..da4761c27 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/alert_condition_operand.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.local_identifier import LocalIdentifier +from gooddata_api_client.models.value import Value +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ALERTCONDITIONOPERAND_ONE_OF_SCHEMAS = ["LocalIdentifier", "Value"] + +class AlertConditionOperand(BaseModel): + """ + Operand of the alert condition. + """ + # data type: LocalIdentifier + oneof_schema_1_validator: Optional[LocalIdentifier] = None + # data type: Value + oneof_schema_2_validator: Optional[Value] = None + actual_instance: Optional[Union[LocalIdentifier, Value]] = None + one_of_schemas: Set[str] = { "LocalIdentifier", "Value" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = AlertConditionOperand.model_construct() + error_messages = [] + match = 0 + # validate data type: LocalIdentifier + if not isinstance(v, LocalIdentifier): + error_messages.append(f"Error! Input type `{type(v)}` is not `LocalIdentifier`") + else: + match += 1 + # validate data type: Value + if not isinstance(v, Value): + error_messages.append(f"Error! Input type `{type(v)}` is not `Value`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AlertConditionOperand with oneOf schemas: LocalIdentifier, Value. 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 + + # deserialize data into LocalIdentifier + try: + if match == 0: + instance.actual_instance = LocalIdentifier.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Value + try: + if match == 0: + instance.actual_instance = Value.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AlertConditionOperand with oneOf schemas: LocalIdentifier, Value. 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], LocalIdentifier, Value]]: + """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/gooddata-api-client/gooddata_api_client/models/alert_description.py b/gooddata-api-client/gooddata_api_client/models/alert_description.py new file mode 100644 index 000000000..e58e6436d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/alert_description.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from gooddata_api_client.models.alert_evaluation_row import AlertEvaluationRow +from typing import Optional, Set +from typing_extensions import Self + +class AlertDescription(BaseModel): + """ + AlertDescription + """ # noqa: E501 + attribute: Optional[StrictStr] = None + condition: StrictStr + current_values: Optional[List[AlertEvaluationRow]] = Field(default=None, alias="currentValues") + error_message: Optional[StrictStr] = Field(default=None, alias="errorMessage") + formatted_threshold: Optional[StrictStr] = Field(default=None, alias="formattedThreshold") + lower_threshold: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="lowerThreshold") + metric: StrictStr + remaining_alert_evaluation_count: Optional[StrictInt] = Field(default=None, alias="remainingAlertEvaluationCount") + status: Optional[StrictStr] = None + threshold: Optional[Union[StrictFloat, StrictInt]] = None + total_value_count: Optional[StrictInt] = Field(default=None, alias="totalValueCount") + trace_id: Optional[StrictStr] = Field(default=None, alias="traceId") + triggered_at: Optional[datetime] = Field(default=None, alias="triggeredAt") + triggered_count: Optional[StrictInt] = Field(default=None, alias="triggeredCount") + upper_threshold: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="upperThreshold") + __properties: ClassVar[List[str]] = ["attribute", "condition", "currentValues", "errorMessage", "formattedThreshold", "lowerThreshold", "metric", "remainingAlertEvaluationCount", "status", "threshold", "totalValueCount", "traceId", "triggeredAt", "triggeredCount", "upperThreshold"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['SUCCESS', 'ERROR', 'INTERNAL_ERROR', 'TIMEOUT']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SUCCESS', 'ERROR', 'INTERNAL_ERROR', 'TIMEOUT')") + 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 AlertDescription 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 each item in current_values (list) + _items = [] + if self.current_values: + for _item_current_values in self.current_values: + if _item_current_values: + _items.append(_item_current_values.to_dict()) + _dict['currentValues'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AlertDescription from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attribute": obj.get("attribute"), + "condition": obj.get("condition"), + "currentValues": [AlertEvaluationRow.from_dict(_item) for _item in obj["currentValues"]] if obj.get("currentValues") is not None else None, + "errorMessage": obj.get("errorMessage"), + "formattedThreshold": obj.get("formattedThreshold"), + "lowerThreshold": obj.get("lowerThreshold"), + "metric": obj.get("metric"), + "remainingAlertEvaluationCount": obj.get("remainingAlertEvaluationCount"), + "status": obj.get("status"), + "threshold": obj.get("threshold"), + "totalValueCount": obj.get("totalValueCount"), + "traceId": obj.get("traceId"), + "triggeredAt": obj.get("triggeredAt"), + "triggeredCount": obj.get("triggeredCount"), + "upperThreshold": obj.get("upperThreshold") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/alert_evaluation_row.py b/gooddata-api-client/gooddata_api_client/models/alert_evaluation_row.py new file mode 100644 index 000000000..25ec4900d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/alert_evaluation_row.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.metric_record import MetricRecord +from typing import Optional, Set +from typing_extensions import Self + +class AlertEvaluationRow(BaseModel): + """ + AlertEvaluationRow + """ # noqa: E501 + computed_metric: Optional[MetricRecord] = Field(default=None, alias="computedMetric") + label_value: Optional[StrictStr] = Field(default=None, alias="labelValue") + primary_metric: Optional[MetricRecord] = Field(default=None, alias="primaryMetric") + secondary_metric: Optional[MetricRecord] = Field(default=None, alias="secondaryMetric") + __properties: ClassVar[List[str]] = ["computedMetric", "labelValue", "primaryMetric", "secondaryMetric"] + + 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 AlertEvaluationRow 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 computed_metric + if self.computed_metric: + _dict['computedMetric'] = self.computed_metric.to_dict() + # override the default output from pydantic by calling `to_dict()` of primary_metric + if self.primary_metric: + _dict['primaryMetric'] = self.primary_metric.to_dict() + # override the default output from pydantic by calling `to_dict()` of secondary_metric + if self.secondary_metric: + _dict['secondaryMetric'] = self.secondary_metric.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AlertEvaluationRow from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "computedMetric": MetricRecord.from_dict(obj["computedMetric"]) if obj.get("computedMetric") is not None else None, + "labelValue": obj.get("labelValue"), + "primaryMetric": MetricRecord.from_dict(obj["primaryMetric"]) if obj.get("primaryMetric") is not None else None, + "secondaryMetric": MetricRecord.from_dict(obj["secondaryMetric"]) if obj.get("secondaryMetric") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/all_time_date_filter.py b/gooddata-api-client/gooddata_api_client/models/all_time_date_filter.py new file mode 100644 index 000000000..d903052eb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/all_time_date_filter.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.all_time_date_filter_all_time_date_filter import AllTimeDateFilterAllTimeDateFilter +from typing import Optional, Set +from typing_extensions import Self + +class AllTimeDateFilter(BaseModel): + """ + An all-time date filter that does not restrict by date range. Controls how rows with empty (null/missing) date values are handled. + """ # noqa: E501 + all_time_date_filter: AllTimeDateFilterAllTimeDateFilter = Field(alias="allTimeDateFilter") + __properties: ClassVar[List[str]] = ["allTimeDateFilter"] + + 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 AllTimeDateFilter 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 all_time_date_filter + if self.all_time_date_filter: + _dict['allTimeDateFilter'] = self.all_time_date_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AllTimeDateFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allTimeDateFilter": AllTimeDateFilterAllTimeDateFilter.from_dict(obj["allTimeDateFilter"]) if obj.get("allTimeDateFilter") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/all_time_date_filter_all_time_date_filter.py b/gooddata-api-client/gooddata_api_client/models/all_time_date_filter_all_time_date_filter.py new file mode 100644 index 000000000..07b6ec077 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/all_time_date_filter_all_time_date_filter.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.afm_object_identifier_dataset import AfmObjectIdentifierDataset +from typing import Optional, Set +from typing_extensions import Self + +class AllTimeDateFilterAllTimeDateFilter(BaseModel): + """ + AllTimeDateFilterAllTimeDateFilter + """ # noqa: E501 + apply_on_result: Optional[StrictBool] = Field(default=None, alias="applyOnResult") + dataset: AfmObjectIdentifierDataset + empty_value_handling: Optional[StrictStr] = Field(default='INCLUDE', description="Specifies how rows with empty (null/missing) date values should be handled. INCLUDE means no filtering effect (default), EXCLUDE removes rows with null dates, ONLY keeps only rows with null dates.", alias="emptyValueHandling") + granularity: Optional[StrictStr] = Field(default='DAY', description="Date granularity used to resolve the date attribute label for null value checks. Defaults to DAY if not specified.") + local_identifier: Optional[StrictStr] = Field(default=None, alias="localIdentifier") + __properties: ClassVar[List[str]] = ["applyOnResult", "dataset", "emptyValueHandling", "granularity", "localIdentifier"] + + @field_validator('empty_value_handling') + def empty_value_handling_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INCLUDE', 'EXCLUDE', 'ONLY']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INCLUDE', 'EXCLUDE', 'ONLY')") + return value + + @field_validator('granularity') + def granularity_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR')") + 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 AllTimeDateFilterAllTimeDateFilter 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 dataset + if self.dataset: + _dict['dataset'] = self.dataset.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AllTimeDateFilterAllTimeDateFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applyOnResult": obj.get("applyOnResult"), + "dataset": AfmObjectIdentifierDataset.from_dict(obj["dataset"]) if obj.get("dataset") is not None else None, + "emptyValueHandling": obj.get("emptyValueHandling") if obj.get("emptyValueHandling") is not None else 'INCLUDE', + "granularity": obj.get("granularity") if obj.get("granularity") is not None else 'DAY', + "localIdentifier": obj.get("localIdentifier") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/allowed_relationship_type.py b/gooddata-api-client/gooddata_api_client/models/allowed_relationship_type.py new file mode 100644 index 000000000..a954776ab --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/allowed_relationship_type.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AllowedRelationshipType(BaseModel): + """ + Allowed relationship type combination. + """ # noqa: E501 + allow_orphans: Optional[StrictBool] = Field(default=True, description="If true, allows target objects that are not part of any relationship (orphans) to be included in results. If false, orphan target objects will be excluded even if they directly match the search query. Default is true (orphans are allowed).", alias="allowOrphans") + source_type: StrictStr = Field(description="Source object type (e.g., 'dashboard', 'visualization', 'metric').", alias="sourceType") + target_type: StrictStr = Field(description="Target object type (e.g., 'visualization', 'metric', 'attribute').", alias="targetType") + __properties: ClassVar[List[str]] = ["allowOrphans", "sourceType", "targetType"] + + @field_validator('source_type') + def source_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attribute', 'metric', 'fact', 'label', 'date', 'dataset', 'visualization', 'dashboard']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attribute', 'metric', 'fact', 'label', 'date', 'dataset', 'visualization', 'dashboard')") + return value + + @field_validator('target_type') + def target_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attribute', 'metric', 'fact', 'label', 'date', 'dataset', 'visualization', 'dashboard']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attribute', 'metric', 'fact', 'label', 'date', 'dataset', 'visualization', 'dashboard')") + 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 AllowedRelationshipType 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 AllowedRelationshipType from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowOrphans": obj.get("allowOrphans") if obj.get("allowOrphans") is not None else True, + "sourceType": obj.get("sourceType"), + "targetType": obj.get("targetType") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/analytics_catalog_created_by.py b/gooddata-api-client/gooddata_api_client/models/analytics_catalog_created_by.py new file mode 100644 index 000000000..bb8102961 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/analytics_catalog_created_by.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.analytics_catalog_user import AnalyticsCatalogUser +from typing import Optional, Set +from typing_extensions import Self + +class AnalyticsCatalogCreatedBy(BaseModel): + """ + AnalyticsCatalogCreatedBy + """ # noqa: E501 + reasoning: StrictStr = Field(description="Reasoning for error states") + users: List[AnalyticsCatalogUser] = Field(description="Users who created any object in the catalog") + __properties: ClassVar[List[str]] = ["reasoning", "users"] + + 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 AnalyticsCatalogCreatedBy 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 each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalyticsCatalogCreatedBy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reasoning": obj.get("reasoning"), + "users": [AnalyticsCatalogUser.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/analytics_catalog_tags.py b/gooddata-api-client/gooddata_api_client/models/analytics_catalog_tags.py new file mode 100644 index 000000000..829650dff --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/analytics_catalog_tags.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class AnalyticsCatalogTags(BaseModel): + """ + AnalyticsCatalogTags + """ # noqa: E501 + tags: List[StrictStr] + __properties: ClassVar[List[str]] = ["tags"] + + 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 AnalyticsCatalogTags 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 AnalyticsCatalogTags from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tags": obj.get("tags") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/analytics_catalog_user.py b/gooddata-api-client/gooddata_api_client/models/analytics_catalog_user.py new file mode 100644 index 000000000..1b776c6af --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/analytics_catalog_user.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class AnalyticsCatalogUser(BaseModel): + """ + Users who created any object in the catalog + """ # noqa: E501 + firstname: StrictStr = Field(description="First name of the user who created any objects") + lastname: StrictStr = Field(description="Last name of the user who created any objects") + user_id: StrictStr = Field(description="User ID of the user who created any objects", alias="userId") + __properties: ClassVar[List[str]] = ["firstname", "lastname", "userId"] + + 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 AnalyticsCatalogUser 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 AnalyticsCatalogUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "userId": obj.get("userId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/anomaly_detection.py b/gooddata-api-client/gooddata_api_client/models/anomaly_detection.py new file mode 100644 index 000000000..e8be21d24 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/anomaly_detection.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.afm_object_identifier_dataset import AfmObjectIdentifierDataset +from gooddata_api_client.models.local_identifier import LocalIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class AnomalyDetection(BaseModel): + """ + AnomalyDetection + """ # noqa: E501 + dataset: AfmObjectIdentifierDataset + granularity: StrictStr = Field(description="Date granularity for anomaly detection. Only time-based granularities are supported (HOUR, DAY, WEEK, MONTH, QUARTER, YEAR).") + measure: LocalIdentifier + sensitivity: StrictStr = Field(description="Sensitivity level for anomaly detection") + __properties: ClassVar[List[str]] = ["dataset", "granularity", "measure", "sensitivity"] + + @field_validator('granularity') + def granularity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR')") + return value + + @field_validator('sensitivity') + def sensitivity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['LOW', 'MEDIUM', 'HIGH']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('LOW', 'MEDIUM', 'HIGH')") + 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 AnomalyDetection 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 dataset + if self.dataset: + _dict['dataset'] = self.dataset.to_dict() + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnomalyDetection from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataset": AfmObjectIdentifierDataset.from_dict(obj["dataset"]) if obj.get("dataset") is not None else None, + "granularity": obj.get("granularity"), + "measure": LocalIdentifier.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "sensitivity": obj.get("sensitivity") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/anomaly_detection_config.py b/gooddata-api-client/gooddata_api_client/models/anomaly_detection_config.py new file mode 100644 index 000000000..6308933be --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/anomaly_detection_config.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class AnomalyDetectionConfig(BaseModel): + """ + Anomaly detection configuration. + """ # noqa: E501 + sensitivity: StrictStr = Field(description="Outlier sensitivity level.") + __properties: ClassVar[List[str]] = ["sensitivity"] + + @field_validator('sensitivity') + def sensitivity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['LOW', 'MEDIUM', 'HIGH']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('LOW', 'MEDIUM', 'HIGH')") + 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 AnomalyDetectionConfig 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 AnomalyDetectionConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sensitivity": obj.get("sensitivity") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/anomaly_detection_request.py b/gooddata-api-client/gooddata_api_client/models/anomaly_detection_request.py new file mode 100644 index 000000000..9e01b5b95 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/anomaly_detection_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class AnomalyDetectionRequest(BaseModel): + """ + AnomalyDetectionRequest + """ # noqa: E501 + sensitivity: Union[StrictFloat, StrictInt] = Field(description="Anomaly detection sensitivity.") + __properties: ClassVar[List[str]] = ["sensitivity"] + + 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 AnomalyDetectionRequest 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 AnomalyDetectionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sensitivity": obj.get("sensitivity") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/anomaly_detection_result.py b/gooddata-api-client/gooddata_api_client/models/anomaly_detection_result.py new file mode 100644 index 000000000..89d96873a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/anomaly_detection_result.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class AnomalyDetectionResult(BaseModel): + """ + AnomalyDetectionResult + """ # noqa: E501 + anomaly_flag: List[Optional[StrictBool]] = Field(alias="anomalyFlag") + attribute: List[StrictStr] + values: List[Optional[Union[StrictFloat, StrictInt]]] + __properties: ClassVar[List[str]] = ["anomalyFlag", "attribute", "values"] + + 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 AnomalyDetectionResult 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 AnomalyDetectionResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "anomalyFlag": obj.get("anomalyFlag"), + "attribute": obj.get("attribute"), + "values": obj.get("values") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/anomaly_detection_wrapper.py b/gooddata-api-client/gooddata_api_client/models/anomaly_detection_wrapper.py new file mode 100644 index 000000000..d17e7ab24 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/anomaly_detection_wrapper.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.anomaly_detection import AnomalyDetection +from typing import Optional, Set +from typing_extensions import Self + +class AnomalyDetectionWrapper(BaseModel): + """ + AnomalyDetectionWrapper + """ # noqa: E501 + anomaly: AnomalyDetection + __properties: ClassVar[List[str]] = ["anomaly"] + + 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 AnomalyDetectionWrapper 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 anomaly + if self.anomaly: + _dict['anomaly'] = self.anomaly.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnomalyDetectionWrapper from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "anomaly": AnomalyDetection.from_dict(obj["anomaly"]) if obj.get("anomaly") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/api_entitlement.py b/gooddata-api-client/gooddata_api_client/models/api_entitlement.py new file mode 100644 index 000000000..384a83cf5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/api_entitlement.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import date +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiEntitlement(BaseModel): + """ + ApiEntitlement + """ # noqa: E501 + expiry: Optional[date] = None + name: StrictStr + value: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["expiry", "name", "value"] + + @field_validator('name') + def name_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CacheStrategy', 'Contract', 'CustomTheming', 'ExtraCache', 'Hipaa', 'PdfExports', 'UiLocalization', 'Tier', 'UserCount', 'ManagedIdpUserCount', 'UnlimitedUsers', 'UnlimitedWorkspaces', 'WhiteLabeling', 'WorkspaceCount', 'UserTelemetryDisabled', 'AutomationCount', 'UnlimitedAutomations', 'AutomationRecipientCount', 'UnlimitedAutomationRecipients', 'DailyScheduledActionCount', 'UnlimitedDailyScheduledActions', 'DailyAlertActionCount', 'UnlimitedDailyAlertActions', 'ScheduledActionMinimumRecurrenceMinutes', 'FederatedIdentityManagement', 'AuditLogging', 'ControlledFeatureRollout', 'AiLake']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('CacheStrategy', 'Contract', 'CustomTheming', 'ExtraCache', 'Hipaa', 'PdfExports', 'UiLocalization', 'Tier', 'UserCount', 'ManagedIdpUserCount', 'UnlimitedUsers', 'UnlimitedWorkspaces', 'WhiteLabeling', 'WorkspaceCount', 'UserTelemetryDisabled', 'AutomationCount', 'UnlimitedAutomations', 'AutomationRecipientCount', 'UnlimitedAutomationRecipients', 'DailyScheduledActionCount', 'UnlimitedDailyScheduledActions', 'DailyAlertActionCount', 'UnlimitedDailyAlertActions', 'ScheduledActionMinimumRecurrenceMinutes', 'FederatedIdentityManagement', 'AuditLogging', 'ControlledFeatureRollout', 'AiLake')") + 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 ApiEntitlement 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 ApiEntitlement from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "expiry": obj.get("expiry"), + "name": obj.get("name"), + "value": obj.get("value") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/arithmetic_measure.py b/gooddata-api-client/gooddata_api_client/models/arithmetic_measure.py new file mode 100644 index 000000000..4b5192f74 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/arithmetic_measure.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.local_identifier import LocalIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class ArithmeticMeasure(BaseModel): + """ + ArithmeticMeasure + """ # noqa: E501 + left: LocalIdentifier + operator: StrictStr = Field(description="Arithmetic operator. DIFFERENCE - m₁−m₂ - the difference between two metrics. CHANGE - (m₁−m₂)÷m₂ - the relative difference between two metrics. ") + right: LocalIdentifier + __properties: ClassVar[List[str]] = ["left", "operator", "right"] + + @field_validator('operator') + def operator_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['DIFFERENCE', 'CHANGE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('DIFFERENCE', 'CHANGE')") + 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 ArithmeticMeasure 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 left + if self.left: + _dict['left'] = self.left.to_dict() + # override the default output from pydantic by calling `to_dict()` of right + if self.right: + _dict['right'] = self.right.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ArithmeticMeasure from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "left": LocalIdentifier.from_dict(obj["left"]) if obj.get("left") is not None else None, + "operator": obj.get("operator"), + "right": LocalIdentifier.from_dict(obj["right"]) if obj.get("right") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/arithmetic_measure_definition.py b/gooddata-api-client/gooddata_api_client/models/arithmetic_measure_definition.py new file mode 100644 index 000000000..419cb2c14 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/arithmetic_measure_definition.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.arithmetic_measure_definition_arithmetic_measure import ArithmeticMeasureDefinitionArithmeticMeasure +from typing import Optional, Set +from typing_extensions import Self + +class ArithmeticMeasureDefinition(BaseModel): + """ + Metric representing arithmetics between other metrics. + """ # noqa: E501 + arithmetic_measure: ArithmeticMeasureDefinitionArithmeticMeasure = Field(alias="arithmeticMeasure") + __properties: ClassVar[List[str]] = ["arithmeticMeasure"] + + 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 ArithmeticMeasureDefinition 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 arithmetic_measure + if self.arithmetic_measure: + _dict['arithmeticMeasure'] = self.arithmetic_measure.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ArithmeticMeasureDefinition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "arithmeticMeasure": ArithmeticMeasureDefinitionArithmeticMeasure.from_dict(obj["arithmeticMeasure"]) if obj.get("arithmeticMeasure") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/arithmetic_measure_definition_arithmetic_measure.py b/gooddata-api-client/gooddata_api_client/models/arithmetic_measure_definition_arithmetic_measure.py new file mode 100644 index 000000000..317a7bca3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/arithmetic_measure_definition_arithmetic_measure.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.afm_local_identifier import AfmLocalIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class ArithmeticMeasureDefinitionArithmeticMeasure(BaseModel): + """ + ArithmeticMeasureDefinitionArithmeticMeasure + """ # noqa: E501 + measure_identifiers: List[AfmLocalIdentifier] = Field(description="List of metrics to apply arithmetic operation by chosen operator.", alias="measureIdentifiers") + operator: StrictStr = Field(description="Arithmetic operator describing operation between metrics.") + __properties: ClassVar[List[str]] = ["measureIdentifiers", "operator"] + + @field_validator('operator') + def operator_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['SUM', 'DIFFERENCE', 'MULTIPLICATION', 'RATIO', 'CHANGE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SUM', 'DIFFERENCE', 'MULTIPLICATION', 'RATIO', 'CHANGE')") + 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 ArithmeticMeasureDefinitionArithmeticMeasure 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 each item in measure_identifiers (list) + _items = [] + if self.measure_identifiers: + for _item_measure_identifiers in self.measure_identifiers: + if _item_measure_identifiers: + _items.append(_item_measure_identifiers.to_dict()) + _dict['measureIdentifiers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ArithmeticMeasureDefinitionArithmeticMeasure from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "measureIdentifiers": [AfmLocalIdentifier.from_dict(_item) for _item in obj["measureIdentifiers"]] if obj.get("measureIdentifiers") is not None else None, + "operator": obj.get("operator") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/assignee_identifier.py b/gooddata-api-client/gooddata_api_client/models/assignee_identifier.py new file mode 100644 index 000000000..864080dbf --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/assignee_identifier.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 AssigneeIdentifier(BaseModel): + """ + Identifier of a user or user-group. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user', 'userGroup']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('user', 'userGroup')") + 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 AssigneeIdentifier 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 AssigneeIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/assignee_rule.py b/gooddata-api-client/gooddata_api_client/models/assignee_rule.py new file mode 100644 index 000000000..7d77a6a79 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/assignee_rule.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 AssigneeRule(BaseModel): + """ + Identifier of an assignee rule. + """ # noqa: E501 + type: StrictStr + __properties: ClassVar[List[str]] = ["type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['allWorkspaceUsers']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('allWorkspaceUsers')") + 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 AssigneeRule 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 AssigneeRule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/attribute_elements.py b/gooddata-api-client/gooddata_api_client/models/attribute_elements.py new file mode 100644 index 000000000..0af3b8213 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/attribute_elements.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.attribute_elements_by_ref import AttributeElementsByRef +from gooddata_api_client.models.attribute_elements_by_value import AttributeElementsByValue +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ATTRIBUTEELEMENTS_ONE_OF_SCHEMAS = ["AttributeElementsByRef", "AttributeElementsByValue"] + +class AttributeElements(BaseModel): + """ + AttributeElements + """ + # data type: AttributeElementsByRef + oneof_schema_1_validator: Optional[AttributeElementsByRef] = None + # data type: AttributeElementsByValue + oneof_schema_2_validator: Optional[AttributeElementsByValue] = None + actual_instance: Optional[Union[AttributeElementsByRef, AttributeElementsByValue]] = None + one_of_schemas: Set[str] = { "AttributeElementsByRef", "AttributeElementsByValue" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = AttributeElements.model_construct() + error_messages = [] + match = 0 + # validate data type: AttributeElementsByRef + if not isinstance(v, AttributeElementsByRef): + error_messages.append(f"Error! Input type `{type(v)}` is not `AttributeElementsByRef`") + else: + match += 1 + # validate data type: AttributeElementsByValue + if not isinstance(v, AttributeElementsByValue): + error_messages.append(f"Error! Input type `{type(v)}` is not `AttributeElementsByValue`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AttributeElements with oneOf schemas: AttributeElementsByRef, AttributeElementsByValue. 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 + + # deserialize data into AttributeElementsByRef + try: + if match == 0: + instance.actual_instance = AttributeElementsByRef.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AttributeElementsByValue + try: + if match == 0: + instance.actual_instance = AttributeElementsByValue.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AttributeElements with oneOf schemas: AttributeElementsByRef, AttributeElementsByValue. 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], AttributeElementsByRef, AttributeElementsByValue]]: + """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/gooddata-api-client/gooddata_api_client/models/attribute_elements_by_ref.py b/gooddata-api-client/gooddata_api_client/models/attribute_elements_by_ref.py new file mode 100644 index 000000000..6f4f6b35f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/attribute_elements_by_ref.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 AttributeElementsByRef(BaseModel): + """ + AttributeElementsByRef + """ # noqa: E501 + uris: List[Optional[StrictStr]] = Field(description="List of attribute elements by reference") + __properties: ClassVar[List[str]] = ["uris"] + + 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 AttributeElementsByRef 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 AttributeElementsByRef from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "uris": obj.get("uris") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/attribute_elements_by_value.py b/gooddata-api-client/gooddata_api_client/models/attribute_elements_by_value.py new file mode 100644 index 000000000..253315428 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/attribute_elements_by_value.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 AttributeElementsByValue(BaseModel): + """ + AttributeElementsByValue + """ # noqa: E501 + values: List[Optional[StrictStr]] = Field(description="List of attribute elements by value") + __properties: ClassVar[List[str]] = ["values"] + + 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 AttributeElementsByValue 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 AttributeElementsByValue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "values": obj.get("values") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/attribute_execution_result_header.py b/gooddata-api-client/gooddata_api_client/models/attribute_execution_result_header.py new file mode 100644 index 000000000..e12412392 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/attribute_execution_result_header.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.attribute_result_header import AttributeResultHeader +from typing import Optional, Set +from typing_extensions import Self + +class AttributeExecutionResultHeader(BaseModel): + """ + AttributeExecutionResultHeader + """ # noqa: E501 + attribute_header: AttributeResultHeader = Field(alias="attributeHeader") + __properties: ClassVar[List[str]] = ["attributeHeader"] + + 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 AttributeExecutionResultHeader 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 attribute_header + if self.attribute_header: + _dict['attributeHeader'] = self.attribute_header.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AttributeExecutionResultHeader from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributeHeader": AttributeResultHeader.from_dict(obj["attributeHeader"]) if obj.get("attributeHeader") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/attribute_filter.py b/gooddata-api-client/gooddata_api_client/models/attribute_filter.py new file mode 100644 index 000000000..4cb99b8d4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/attribute_filter.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.match_attribute_filter import MatchAttributeFilter +from gooddata_api_client.models.negative_attribute_filter import NegativeAttributeFilter +from gooddata_api_client.models.positive_attribute_filter import PositiveAttributeFilter +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ATTRIBUTEFILTER_ONE_OF_SCHEMAS = ["MatchAttributeFilter", "NegativeAttributeFilter", "PositiveAttributeFilter"] + +class AttributeFilter(BaseModel): + """ + Abstract filter definition type attributes + """ + # data type: NegativeAttributeFilter + oneof_schema_1_validator: Optional[NegativeAttributeFilter] = None + # data type: PositiveAttributeFilter + oneof_schema_2_validator: Optional[PositiveAttributeFilter] = None + # data type: MatchAttributeFilter + oneof_schema_3_validator: Optional[MatchAttributeFilter] = None + actual_instance: Optional[Union[MatchAttributeFilter, NegativeAttributeFilter, PositiveAttributeFilter]] = None + one_of_schemas: Set[str] = { "MatchAttributeFilter", "NegativeAttributeFilter", "PositiveAttributeFilter" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = AttributeFilter.model_construct() + error_messages = [] + match = 0 + # validate data type: NegativeAttributeFilter + if not isinstance(v, NegativeAttributeFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `NegativeAttributeFilter`") + else: + match += 1 + # validate data type: PositiveAttributeFilter + if not isinstance(v, PositiveAttributeFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `PositiveAttributeFilter`") + else: + match += 1 + # validate data type: MatchAttributeFilter + if not isinstance(v, MatchAttributeFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `MatchAttributeFilter`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AttributeFilter with oneOf schemas: MatchAttributeFilter, NegativeAttributeFilter, PositiveAttributeFilter. 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 + + # deserialize data into NegativeAttributeFilter + try: + if match == 0: + instance.actual_instance = NegativeAttributeFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PositiveAttributeFilter + try: + if match == 0: + instance.actual_instance = PositiveAttributeFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MatchAttributeFilter + try: + if match == 0: + instance.actual_instance = MatchAttributeFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AttributeFilter with oneOf schemas: MatchAttributeFilter, NegativeAttributeFilter, PositiveAttributeFilter. 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], MatchAttributeFilter, NegativeAttributeFilter, PositiveAttributeFilter]]: + """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/gooddata-api-client/gooddata_api_client/models/attribute_filter_by_date.py b/gooddata-api-client/gooddata_api_client/models/attribute_filter_by_date.py new file mode 100644 index 000000000..419cd5d07 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/attribute_filter_by_date.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AttributeFilterByDate(BaseModel): + """ + AttributeFilterByDate + """ # noqa: E501 + filter_local_identifier: StrictStr = Field(alias="filterLocalIdentifier") + is_common_date: StrictBool = Field(alias="isCommonDate") + __properties: ClassVar[List[str]] = ["filterLocalIdentifier", "isCommonDate"] + + 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 AttributeFilterByDate 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 AttributeFilterByDate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filterLocalIdentifier": obj.get("filterLocalIdentifier"), + "isCommonDate": obj.get("isCommonDate") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/attribute_filter_elements.py b/gooddata-api-client/gooddata_api_client/models/attribute_filter_elements.py new file mode 100644 index 000000000..581142358 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/attribute_filter_elements.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 AttributeFilterElements(BaseModel): + """ + Filter on specific set of label values. + """ # noqa: E501 + values: List[Optional[StrictStr]] = Field(description="Set of label values.") + __properties: ClassVar[List[str]] = ["values"] + + 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 AttributeFilterElements 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 AttributeFilterElements from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "values": obj.get("values") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/attribute_filter_parent.py b/gooddata-api-client/gooddata_api_client/models/attribute_filter_parent.py new file mode 100644 index 000000000..5ffc3c63b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/attribute_filter_parent.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.over import Over +from typing import Optional, Set +from typing_extensions import Self + +class AttributeFilterParent(BaseModel): + """ + AttributeFilterParent + """ # noqa: E501 + filter_local_identifier: StrictStr = Field(alias="filterLocalIdentifier") + over: Over + __properties: ClassVar[List[str]] = ["filterLocalIdentifier", "over"] + + 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 AttributeFilterParent 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 over + if self.over: + _dict['over'] = self.over.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AttributeFilterParent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filterLocalIdentifier": obj.get("filterLocalIdentifier"), + "over": Over.from_dict(obj["over"]) if obj.get("over") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/attribute_format.py b/gooddata-api-client/gooddata_api_client/models/attribute_format.py new file mode 100644 index 000000000..60a076528 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/attribute_format.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 AttributeFormat(BaseModel): + """ + Attribute format describes formatting information to effectively format attribute values when needed. + """ # noqa: E501 + locale: StrictStr = Field(description="Format locale code like 'en-US', 'cs-CZ', etc.") + pattern: StrictStr = Field(description="ICU formatting pattern like 'y', 'dd.MM.y', etc.") + timezone: Optional[StrictStr] = Field(default=None, description="Timezone for date formatting like 'America/New_York', 'Europe/Prague', etc.") + __properties: ClassVar[List[str]] = ["locale", "pattern", "timezone"] + + 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 AttributeFormat 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 AttributeFormat from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "locale": obj.get("locale"), + "pattern": obj.get("pattern"), + "timezone": obj.get("timezone") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/attribute_header.py b/gooddata-api-client/gooddata_api_client/models/attribute_header.py new file mode 100644 index 000000000..6597f50b1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/attribute_header.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.attribute_header_attribute_header import AttributeHeaderAttributeHeader +from typing import Optional, Set +from typing_extensions import Self + +class AttributeHeader(BaseModel): + """ + AttributeHeader + """ # noqa: E501 + attribute_header: AttributeHeaderAttributeHeader = Field(alias="attributeHeader") + __properties: ClassVar[List[str]] = ["attributeHeader"] + + 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 AttributeHeader 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 attribute_header + if self.attribute_header: + _dict['attributeHeader'] = self.attribute_header.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AttributeHeader from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributeHeader": AttributeHeaderAttributeHeader.from_dict(obj["attributeHeader"]) if obj.get("attributeHeader") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/attribute_header_attribute_header.py b/gooddata-api-client/gooddata_api_client/models/attribute_header_attribute_header.py new file mode 100644 index 000000000..afb959624 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/attribute_header_attribute_header.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.attribute_format import AttributeFormat +from gooddata_api_client.models.geo_area_config import GeoAreaConfig +from gooddata_api_client.models.rest_api_identifier import RestApiIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class AttributeHeaderAttributeHeader(BaseModel): + """ + AttributeHeaderAttributeHeader + """ # noqa: E501 + attribute: RestApiIdentifier + attribute_name: StrictStr = Field(description="Attribute name.", alias="attributeName") + format: Optional[AttributeFormat] = None + geo_area_config: Optional[GeoAreaConfig] = Field(default=None, alias="geoAreaConfig") + granularity: Optional[StrictStr] = Field(default=None, description="Date granularity of the attribute, only filled for date attributes.") + label: RestApiIdentifier + label_name: StrictStr = Field(description="Label name.", alias="labelName") + local_identifier: Annotated[str, Field(strict=True)] = Field(description="Local identifier of the attribute this header relates to.", alias="localIdentifier") + primary_label: RestApiIdentifier = Field(alias="primaryLabel") + value_type: Optional[StrictStr] = Field(default=None, description="Attribute value type.", alias="valueType") + __properties: ClassVar[List[str]] = ["attribute", "attributeName", "format", "geoAreaConfig", "granularity", "label", "labelName", "localIdentifier", "primaryLabel", "valueType"] + + @field_validator('granularity') + def granularity_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR')") + return value + + @field_validator('local_identifier') + def local_identifier_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[.a-zA-Z0-9_-]+$", value): + raise ValueError(r"must validate the regular expression /^[.a-zA-Z0-9_-]+$/") + return value + + @field_validator('value_type') + def value_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['TEXT', 'HYPERLINK', 'GEO', 'GEO_LONGITUDE', 'GEO_LATITUDE', 'GEO_AREA', 'IMAGE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('TEXT', 'HYPERLINK', 'GEO', 'GEO_LONGITUDE', 'GEO_LATITUDE', 'GEO_AREA', 'IMAGE')") + 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 AttributeHeaderAttributeHeader 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 attribute + if self.attribute: + _dict['attribute'] = self.attribute.to_dict() + # override the default output from pydantic by calling `to_dict()` of format + if self.format: + _dict['format'] = self.format.to_dict() + # override the default output from pydantic by calling `to_dict()` of geo_area_config + if self.geo_area_config: + _dict['geoAreaConfig'] = self.geo_area_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of label + if self.label: + _dict['label'] = self.label.to_dict() + # override the default output from pydantic by calling `to_dict()` of primary_label + if self.primary_label: + _dict['primaryLabel'] = self.primary_label.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AttributeHeaderAttributeHeader from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attribute": RestApiIdentifier.from_dict(obj["attribute"]) if obj.get("attribute") is not None else None, + "attributeName": obj.get("attributeName"), + "format": AttributeFormat.from_dict(obj["format"]) if obj.get("format") is not None else None, + "geoAreaConfig": GeoAreaConfig.from_dict(obj["geoAreaConfig"]) if obj.get("geoAreaConfig") is not None else None, + "granularity": obj.get("granularity"), + "label": RestApiIdentifier.from_dict(obj["label"]) if obj.get("label") is not None else None, + "labelName": obj.get("labelName"), + "localIdentifier": obj.get("localIdentifier"), + "primaryLabel": RestApiIdentifier.from_dict(obj["primaryLabel"]) if obj.get("primaryLabel") is not None else None, + "valueType": obj.get("valueType") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/attribute_item.py b/gooddata-api-client/gooddata_api_client/models/attribute_item.py new file mode 100644 index 000000000..5c19557be --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/attribute_item.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.afm_object_identifier_label import AfmObjectIdentifierLabel +from typing import Optional, Set +from typing_extensions import Self + +class AttributeItem(BaseModel): + """ + AttributeItem + """ # noqa: E501 + label: AfmObjectIdentifierLabel + local_identifier: Annotated[str, Field(strict=True)] = Field(description="Local identifier of the attribute. This can be used to reference the attribute in other parts of the execution definition.", alias="localIdentifier") + show_all_values: Optional[StrictBool] = Field(default=False, description="Indicates whether to show all values of given attribute even if the data bound to those values is not available.", alias="showAllValues") + __properties: ClassVar[List[str]] = ["label", "localIdentifier", "showAllValues"] + + @field_validator('local_identifier') + def local_identifier_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[.a-zA-Z0-9_-]+$", value): + raise ValueError(r"must validate the regular expression /^[.a-zA-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 AttributeItem 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 label + if self.label: + _dict['label'] = self.label.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AttributeItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "label": AfmObjectIdentifierLabel.from_dict(obj["label"]) if obj.get("label") is not None else None, + "localIdentifier": obj.get("localIdentifier"), + "showAllValues": obj.get("showAllValues") if obj.get("showAllValues") is not None else False + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/attribute_negative_filter.py b/gooddata-api-client/gooddata_api_client/models/attribute_negative_filter.py new file mode 100644 index 000000000..38f8b4dcf --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/attribute_negative_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class AttributeNegativeFilter(BaseModel): + """ + AttributeNegativeFilter + """ # noqa: E501 + exclude: List[StrictStr] + using: StrictStr + __properties: ClassVar[List[str]] = ["exclude", "using"] + + 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 AttributeNegativeFilter 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 AttributeNegativeFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "exclude": obj.get("exclude"), + "using": obj.get("using") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/attribute_positive_filter.py b/gooddata-api-client/gooddata_api_client/models/attribute_positive_filter.py new file mode 100644 index 000000000..3712ac7fd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/attribute_positive_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class AttributePositiveFilter(BaseModel): + """ + AttributePositiveFilter + """ # noqa: E501 + include: List[StrictStr] + using: StrictStr + __properties: ClassVar[List[str]] = ["include", "using"] + + 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 AttributePositiveFilter 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 AttributePositiveFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "include": obj.get("include"), + "using": obj.get("using") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/attribute_result_header.py b/gooddata-api-client/gooddata_api_client/models/attribute_result_header.py new file mode 100644 index 000000000..f7690a90d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/attribute_result_header.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class AttributeResultHeader(BaseModel): + """ + Header containing the information related to attributes. + """ # noqa: E501 + label_value: StrictStr = Field(description="A value of the current attribute label.", alias="labelValue") + primary_label_value: StrictStr = Field(description="A value of the primary attribute label.", alias="primaryLabelValue") + __properties: ClassVar[List[str]] = ["labelValue", "primaryLabelValue"] + + 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 AttributeResultHeader 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 AttributeResultHeader from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labelValue": obj.get("labelValue"), + "primaryLabelValue": obj.get("primaryLabelValue") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/automation_alert.py b/gooddata-api-client/gooddata_api_client/models/automation_alert.py new file mode 100644 index 000000000..7dbb619f4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/automation_alert.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.alert_afm import AlertAfm +from gooddata_api_client.models.automation_alert_condition import AutomationAlertCondition +from typing import Optional, Set +from typing_extensions import Self + +class AutomationAlert(BaseModel): + """ + AutomationAlert + """ # noqa: E501 + condition: AutomationAlertCondition + execution: AlertAfm + interval: Optional[StrictStr] = Field(default=None, description="Date granularity for the interval of ONCE_PER_INTERVAL trigger. Supported granularities: DAY, WEEK, MONTH, QUARTER, YEAR.") + trigger: Optional[StrictStr] = Field(default='ALWAYS', description="Trigger behavior for the alert. ALWAYS - alert is triggered every time the condition is met. ONCE - alert is triggered only once when the condition is met. ONCE_PER_INTERVAL - alert is triggered when the condition is met, then suppressed for the interval. If no interval is specified, it behaves as ALWAYS. ") + __properties: ClassVar[List[str]] = ["condition", "execution", "interval", "trigger"] + + @field_validator('interval') + def interval_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR')") + return value + + @field_validator('trigger') + def trigger_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ALWAYS', 'ONCE', 'ONCE_PER_INTERVAL']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ALWAYS', 'ONCE', 'ONCE_PER_INTERVAL')") + 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 AutomationAlert 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 condition + if self.condition: + _dict['condition'] = self.condition.to_dict() + # override the default output from pydantic by calling `to_dict()` of execution + if self.execution: + _dict['execution'] = self.execution.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AutomationAlert from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "condition": AutomationAlertCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, + "execution": AlertAfm.from_dict(obj["execution"]) if obj.get("execution") is not None else None, + "interval": obj.get("interval"), + "trigger": obj.get("trigger") if obj.get("trigger") is not None else 'ALWAYS' + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/automation_alert_condition.py b/gooddata-api-client/gooddata_api_client/models/automation_alert_condition.py new file mode 100644 index 000000000..e79b1e0ac --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/automation_alert_condition.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.anomaly_detection_wrapper import AnomalyDetectionWrapper +from gooddata_api_client.models.comparison_wrapper import ComparisonWrapper +from gooddata_api_client.models.range_wrapper import RangeWrapper +from gooddata_api_client.models.relative_wrapper import RelativeWrapper +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +AUTOMATIONALERTCONDITION_ONE_OF_SCHEMAS = ["AnomalyDetectionWrapper", "ComparisonWrapper", "RangeWrapper", "RelativeWrapper"] + +class AutomationAlertCondition(BaseModel): + """ + AutomationAlertCondition + """ + # data type: AnomalyDetectionWrapper + oneof_schema_1_validator: Optional[AnomalyDetectionWrapper] = None + # data type: ComparisonWrapper + oneof_schema_2_validator: Optional[ComparisonWrapper] = None + # data type: RangeWrapper + oneof_schema_3_validator: Optional[RangeWrapper] = None + # data type: RelativeWrapper + oneof_schema_4_validator: Optional[RelativeWrapper] = None + actual_instance: Optional[Union[AnomalyDetectionWrapper, ComparisonWrapper, RangeWrapper, RelativeWrapper]] = None + one_of_schemas: Set[str] = { "AnomalyDetectionWrapper", "ComparisonWrapper", "RangeWrapper", "RelativeWrapper" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = AutomationAlertCondition.model_construct() + error_messages = [] + match = 0 + # validate data type: AnomalyDetectionWrapper + if not isinstance(v, AnomalyDetectionWrapper): + error_messages.append(f"Error! Input type `{type(v)}` is not `AnomalyDetectionWrapper`") + else: + match += 1 + # validate data type: ComparisonWrapper + if not isinstance(v, ComparisonWrapper): + error_messages.append(f"Error! Input type `{type(v)}` is not `ComparisonWrapper`") + else: + match += 1 + # validate data type: RangeWrapper + if not isinstance(v, RangeWrapper): + error_messages.append(f"Error! Input type `{type(v)}` is not `RangeWrapper`") + else: + match += 1 + # validate data type: RelativeWrapper + if not isinstance(v, RelativeWrapper): + error_messages.append(f"Error! Input type `{type(v)}` is not `RelativeWrapper`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AutomationAlertCondition with oneOf schemas: AnomalyDetectionWrapper, ComparisonWrapper, RangeWrapper, RelativeWrapper. 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 + + # deserialize data into AnomalyDetectionWrapper + try: + if match == 0: + instance.actual_instance = AnomalyDetectionWrapper.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ComparisonWrapper + try: + if match == 0: + instance.actual_instance = ComparisonWrapper.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RangeWrapper + try: + if match == 0: + instance.actual_instance = RangeWrapper.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RelativeWrapper + try: + if match == 0: + instance.actual_instance = RelativeWrapper.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AutomationAlertCondition with oneOf schemas: AnomalyDetectionWrapper, ComparisonWrapper, RangeWrapper, RelativeWrapper. 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], AnomalyDetectionWrapper, ComparisonWrapper, RangeWrapper, RelativeWrapper]]: + """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/gooddata-api-client/gooddata_api_client/models/automation_dashboard_tabular_export.py b/gooddata-api-client/gooddata_api_client/models/automation_dashboard_tabular_export.py new file mode 100644 index 000000000..3de74641c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/automation_dashboard_tabular_export.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.dashboard_tabular_export_request_v2 import DashboardTabularExportRequestV2 +from typing import Optional, Set +from typing_extensions import Self + +class AutomationDashboardTabularExport(BaseModel): + """ + AutomationDashboardTabularExport + """ # noqa: E501 + request_payload: DashboardTabularExportRequestV2 = Field(alias="requestPayload") + __properties: ClassVar[List[str]] = ["requestPayload"] + + 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 AutomationDashboardTabularExport 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 request_payload + if self.request_payload: + _dict['requestPayload'] = self.request_payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AutomationDashboardTabularExport from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestPayload": DashboardTabularExportRequestV2.from_dict(obj["requestPayload"]) if obj.get("requestPayload") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/automation_external_recipient.py b/gooddata-api-client/gooddata_api_client/models/automation_external_recipient.py new file mode 100644 index 000000000..d7122ab1b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/automation_external_recipient.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class AutomationExternalRecipient(BaseModel): + """ + AutomationExternalRecipient + """ # noqa: E501 + email: StrictStr = Field(description="E-mail address to send notifications from.") + __properties: ClassVar[List[str]] = ["email"] + + 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 AutomationExternalRecipient 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 AutomationExternalRecipient from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/automation_image_export.py b/gooddata-api-client/gooddata_api_client/models/automation_image_export.py new file mode 100644 index 000000000..b908ef88f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/automation_image_export.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.image_export_request import ImageExportRequest +from typing import Optional, Set +from typing_extensions import Self + +class AutomationImageExport(BaseModel): + """ + AutomationImageExport + """ # noqa: E501 + request_payload: ImageExportRequest = Field(alias="requestPayload") + __properties: ClassVar[List[str]] = ["requestPayload"] + + 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 AutomationImageExport 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 request_payload + if self.request_payload: + _dict['requestPayload'] = self.request_payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AutomationImageExport from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestPayload": ImageExportRequest.from_dict(obj["requestPayload"]) if obj.get("requestPayload") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/automation_metadata.py b/gooddata-api-client/gooddata_api_client/models/automation_metadata.py new file mode 100644 index 000000000..1a9126482 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/automation_metadata.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.visible_filter import VisibleFilter +from typing import Optional, Set +from typing_extensions import Self + +class AutomationMetadata(BaseModel): + """ + Additional information for the automation. + """ # noqa: E501 + visible_filters: Optional[List[VisibleFilter]] = Field(default=None, alias="visibleFilters") + widget: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["visibleFilters", "widget"] + + 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 AutomationMetadata 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. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in visible_filters (list) + _items = [] + if self.visible_filters: + for _item_visible_filters in self.visible_filters: + if _item_visible_filters: + _items.append(_item_visible_filters.to_dict()) + _dict['visibleFilters'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AutomationMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "visibleFilters": [VisibleFilter.from_dict(_item) for _item in obj["visibleFilters"]] if obj.get("visibleFilters") is not None else None, + "widget": obj.get("widget") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/automation_notification.py b/gooddata-api-client/gooddata_api_client/models/automation_notification.py new file mode 100644 index 000000000..4e08d6f47 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/automation_notification.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 ConfigDict +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.notification_content import NotificationContent +from gooddata_api_client.models.webhook_message import WebhookMessage +from typing import Optional, Set +from typing_extensions import Self + +class AutomationNotification(NotificationContent): + """ + AutomationNotification + """ # noqa: E501 + content: WebhookMessage + __properties: ClassVar[List[str]] = ["type", "content"] + + 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 AutomationNotification 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AutomationNotification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "content": WebhookMessage.from_dict(obj["content"]) if obj.get("content") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/automation_raw_export.py b/gooddata-api-client/gooddata_api_client/models/automation_raw_export.py new file mode 100644 index 000000000..b3aa533de --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/automation_raw_export.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.raw_export_automation_request import RawExportAutomationRequest +from typing import Optional, Set +from typing_extensions import Self + +class AutomationRawExport(BaseModel): + """ + AutomationRawExport + """ # noqa: E501 + request_payload: RawExportAutomationRequest = Field(alias="requestPayload") + __properties: ClassVar[List[str]] = ["requestPayload"] + + 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 AutomationRawExport 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 request_payload + if self.request_payload: + _dict['requestPayload'] = self.request_payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AutomationRawExport from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestPayload": RawExportAutomationRequest.from_dict(obj["requestPayload"]) if obj.get("requestPayload") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/automation_schedule.py b/gooddata-api-client/gooddata_api_client/models/automation_schedule.py new file mode 100644 index 000000000..756f4a73a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/automation_schedule.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AutomationSchedule(BaseModel): + """ + AutomationSchedule + """ # noqa: E501 + cron: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Cron expression defining the schedule of the automation. The format is SECOND MINUTE HOUR DAY-OF-MONTH MONTH DAY-OF-WEEK (YEAR). The example expression signifies an action every 30 minutes from 9:00 to 17:00 on workdays.") + cron_description: Optional[StrictStr] = Field(default=None, description="Human-readable description of the cron expression.", alias="cronDescription") + first_run: Optional[datetime] = Field(default=None, description="Timestamp of the first scheduled action. If not provided default to the next scheduled time.", alias="firstRun") + timezone: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Timezone in which the schedule is defined.") + __properties: ClassVar[List[str]] = ["cron", "cronDescription", "firstRun", "timezone"] + + 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 AutomationSchedule 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. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "cron_description", + ]) + + _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 AutomationSchedule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cron": obj.get("cron"), + "cronDescription": obj.get("cronDescription"), + "firstRun": obj.get("firstRun"), + "timezone": obj.get("timezone") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/automation_slides_export.py b/gooddata-api-client/gooddata_api_client/models/automation_slides_export.py new file mode 100644 index 000000000..a53d65e04 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/automation_slides_export.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.slides_export_request import SlidesExportRequest +from typing import Optional, Set +from typing_extensions import Self + +class AutomationSlidesExport(BaseModel): + """ + AutomationSlidesExport + """ # noqa: E501 + request_payload: SlidesExportRequest = Field(alias="requestPayload") + __properties: ClassVar[List[str]] = ["requestPayload"] + + 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 AutomationSlidesExport 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 request_payload + if self.request_payload: + _dict['requestPayload'] = self.request_payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AutomationSlidesExport from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestPayload": SlidesExportRequest.from_dict(obj["requestPayload"]) if obj.get("requestPayload") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/automation_tabular_export.py b/gooddata-api-client/gooddata_api_client/models/automation_tabular_export.py new file mode 100644 index 000000000..2bb6d699c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/automation_tabular_export.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.tabular_export_request import TabularExportRequest +from typing import Optional, Set +from typing_extensions import Self + +class AutomationTabularExport(BaseModel): + """ + AutomationTabularExport + """ # noqa: E501 + request_payload: TabularExportRequest = Field(alias="requestPayload") + __properties: ClassVar[List[str]] = ["requestPayload"] + + 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 AutomationTabularExport 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 request_payload + if self.request_payload: + _dict['requestPayload'] = self.request_payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AutomationTabularExport from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestPayload": TabularExportRequest.from_dict(obj["requestPayload"]) if obj.get("requestPayload") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/automation_visual_export.py b/gooddata-api-client/gooddata_api_client/models/automation_visual_export.py new file mode 100644 index 000000000..5cb93b0b5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/automation_visual_export.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.visual_export_request import VisualExportRequest +from typing import Optional, Set +from typing_extensions import Self + +class AutomationVisualExport(BaseModel): + """ + AutomationVisualExport + """ # noqa: E501 + request_payload: VisualExportRequest = Field(alias="requestPayload") + __properties: ClassVar[List[str]] = ["requestPayload"] + + 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 AutomationVisualExport 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 request_payload + if self.request_payload: + _dict['requestPayload'] = self.request_payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AutomationVisualExport from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestPayload": VisualExportRequest.from_dict(obj["requestPayload"]) if obj.get("requestPayload") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/available_assignees.py b/gooddata-api-client/gooddata_api_client/models/available_assignees.py new file mode 100644 index 000000000..f9b072477 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/available_assignees.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.user_assignee import UserAssignee +from gooddata_api_client.models.user_group_assignee import UserGroupAssignee +from typing import Optional, Set +from typing_extensions import Self + +class AvailableAssignees(BaseModel): + """ + AvailableAssignees + """ # noqa: E501 + user_groups: List[UserGroupAssignee] = Field(description="List of user groups", alias="userGroups") + users: List[UserAssignee] = Field(description="List of users") + __properties: ClassVar[List[str]] = ["userGroups", "users"] + + 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 AvailableAssignees 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 each item in user_groups (list) + _items = [] + if self.user_groups: + for _item_user_groups in self.user_groups: + if _item_user_groups: + _items.append(_item_user_groups.to_dict()) + _dict['userGroups'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AvailableAssignees from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userGroups": [UserGroupAssignee.from_dict(_item) for _item in obj["userGroups"]] if obj.get("userGroups") is not None else None, + "users": [UserAssignee.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aws_bedrock_access_key_auth.py b/gooddata-api-client/gooddata_api_client/models/aws_bedrock_access_key_auth.py new file mode 100644 index 000000000..f58d8de8a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aws_bedrock_access_key_auth.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 AwsBedrockAccessKeyAuth(BaseModel): + """ + AwsBedrockAccessKeyAuth + """ # noqa: E501 + access_key_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="AWS Access Key ID.", alias="accessKeyId") + secret_access_key: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="AWS Secret Access Key.", alias="secretAccessKey") + session_token: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="AWS Session Token (for temporary credentials).", alias="sessionToken") + type: StrictStr = Field(description="Authentication type.") + __properties: ClassVar[List[str]] = ["accessKeyId", "secretAccessKey", "sessionToken", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ACCESS_KEY']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ACCESS_KEY')") + 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 AwsBedrockAccessKeyAuth 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 access_key_id (nullable) is None + # and model_fields_set contains the field + if self.access_key_id is None and "access_key_id" in self.model_fields_set: + _dict['accessKeyId'] = None + + # set to None if secret_access_key (nullable) is None + # and model_fields_set contains the field + if self.secret_access_key is None and "secret_access_key" in self.model_fields_set: + _dict['secretAccessKey'] = None + + # set to None if session_token (nullable) is None + # and model_fields_set contains the field + if self.session_token is None and "session_token" in self.model_fields_set: + _dict['sessionToken'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AwsBedrockAccessKeyAuth from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accessKeyId": obj.get("accessKeyId"), + "secretAccessKey": obj.get("secretAccessKey"), + "sessionToken": obj.get("sessionToken"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/aws_bedrock_provider_config.py b/gooddata-api-client/gooddata_api_client/models/aws_bedrock_provider_config.py new file mode 100644 index 000000000..8f811ad7f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/aws_bedrock_provider_config.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.bedrock_provider_auth import BedrockProviderAuth +from typing import Optional, Set +from typing_extensions import Self + +class AwsBedrockProviderConfig(BaseModel): + """ + Configuration for AWS Bedrock provider. + """ # noqa: E501 + auth: BedrockProviderAuth + region: Annotated[str, Field(strict=True, max_length=255)] = Field(description="AWS region for Bedrock.") + type: StrictStr = Field(description="Provider type.") + __properties: ClassVar[List[str]] = ["auth", "region", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['AWS_BEDROCK']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('AWS_BEDROCK')") + 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 AwsBedrockProviderConfig 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 auth + if self.auth: + _dict['auth'] = self.auth.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AwsBedrockProviderConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "auth": BedrockProviderAuth.from_dict(obj["auth"]) if obj.get("auth") is not None else None, + "region": obj.get("region"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/azure_foundry_api_key_auth.py b/gooddata-api-client/gooddata_api_client/models/azure_foundry_api_key_auth.py new file mode 100644 index 000000000..bcc416bb4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/azure_foundry_api_key_auth.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 AzureFoundryApiKeyAuth(BaseModel): + """ + AzureFoundryApiKeyAuth + """ # noqa: E501 + api_key: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Azure API key.", alias="apiKey") + type: StrictStr = Field(description="Authentication type.") + __properties: ClassVar[List[str]] = ["apiKey", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['API_KEY']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('API_KEY')") + 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 AzureFoundryApiKeyAuth 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 api_key (nullable) is None + # and model_fields_set contains the field + if self.api_key is None and "api_key" in self.model_fields_set: + _dict['apiKey'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AzureFoundryApiKeyAuth from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "apiKey": obj.get("apiKey"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/azure_foundry_provider_auth.py b/gooddata-api-client/gooddata_api_client/models/azure_foundry_provider_auth.py new file mode 100644 index 000000000..1205a15fe --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/azure_foundry_provider_auth.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.azure_foundry_api_key_auth import AzureFoundryApiKeyAuth +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +AZUREFOUNDRYPROVIDERAUTH_ONE_OF_SCHEMAS = ["AzureFoundryApiKeyAuth"] + +class AzureFoundryProviderAuth(BaseModel): + """ + Authentication configuration. + """ + # data type: AzureFoundryApiKeyAuth + oneof_schema_1_validator: Optional[AzureFoundryApiKeyAuth] = None + actual_instance: Optional[Union[AzureFoundryApiKeyAuth]] = None + one_of_schemas: Set[str] = { "AzureFoundryApiKeyAuth" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = AzureFoundryProviderAuth.model_construct() + error_messages = [] + match = 0 + # validate data type: AzureFoundryApiKeyAuth + if not isinstance(v, AzureFoundryApiKeyAuth): + error_messages.append(f"Error! Input type `{type(v)}` is not `AzureFoundryApiKeyAuth`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AzureFoundryProviderAuth with oneOf schemas: AzureFoundryApiKeyAuth. 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 + + # deserialize data into AzureFoundryApiKeyAuth + try: + if match == 0: + instance.actual_instance = AzureFoundryApiKeyAuth.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AzureFoundryProviderAuth with oneOf schemas: AzureFoundryApiKeyAuth. 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], AzureFoundryApiKeyAuth]]: + """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/gooddata-api-client/gooddata_api_client/models/azure_foundry_provider_config.py b/gooddata-api-client/gooddata_api_client/models/azure_foundry_provider_config.py new file mode 100644 index 000000000..b67871882 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/azure_foundry_provider_config.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.azure_foundry_provider_auth import AzureFoundryProviderAuth +from typing import Optional, Set +from typing_extensions import Self + +class AzureFoundryProviderConfig(BaseModel): + """ + Configuration for Azure Foundry provider. + """ # noqa: E501 + auth: AzureFoundryProviderAuth + endpoint: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Azure AI inference endpoint URL.") + type: StrictStr = Field(description="Provider type.") + __properties: ClassVar[List[str]] = ["auth", "endpoint", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['AZURE_FOUNDRY']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('AZURE_FOUNDRY')") + 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 AzureFoundryProviderConfig 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 auth + if self.auth: + _dict['auth'] = self.auth.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AzureFoundryProviderConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "auth": AzureFoundryProviderAuth.from_dict(obj["auth"]) if obj.get("auth") is not None else None, + "endpoint": obj.get("endpoint"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/bedrock_provider_auth.py b/gooddata-api-client/gooddata_api_client/models/bedrock_provider_auth.py new file mode 100644 index 000000000..43b869c51 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/bedrock_provider_auth.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.aws_bedrock_access_key_auth import AwsBedrockAccessKeyAuth +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BEDROCKPROVIDERAUTH_ONE_OF_SCHEMAS = ["AwsBedrockAccessKeyAuth"] + +class BedrockProviderAuth(BaseModel): + """ + Authentication configuration. + """ + # data type: AwsBedrockAccessKeyAuth + oneof_schema_1_validator: Optional[AwsBedrockAccessKeyAuth] = None + actual_instance: Optional[Union[AwsBedrockAccessKeyAuth]] = None + one_of_schemas: Set[str] = { "AwsBedrockAccessKeyAuth" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = BedrockProviderAuth.model_construct() + error_messages = [] + match = 0 + # validate data type: AwsBedrockAccessKeyAuth + if not isinstance(v, AwsBedrockAccessKeyAuth): + error_messages.append(f"Error! Input type `{type(v)}` is not `AwsBedrockAccessKeyAuth`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BedrockProviderAuth with oneOf schemas: AwsBedrockAccessKeyAuth. 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 + + # deserialize data into AwsBedrockAccessKeyAuth + try: + if match == 0: + instance.actual_instance = AwsBedrockAccessKeyAuth.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BedrockProviderAuth with oneOf schemas: AwsBedrockAccessKeyAuth. 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], AwsBedrockAccessKeyAuth]]: + """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/gooddata-api-client/gooddata_api_client/models/bounded_filter.py b/gooddata-api-client/gooddata_api_client/models/bounded_filter.py new file mode 100644 index 000000000..a8062b69d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/bounded_filter.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class BoundedFilter(BaseModel): + """ + Bounding filter for this relative date filter. This can be used to limit the range of the relative date filter to a specific date range. + """ # noqa: E501 + var_from: Optional[StrictInt] = Field(default=None, description="Start of the filtering interval. Specified by number of periods (with respect to given granularity). Typically negative (historical time interval like -2 for '2 days/weeks, ... ago'). If null, then start of the range is unbounded.", alias="from") + granularity: StrictStr = Field(description="Date granularity specifying particular date attribute in given dimension.") + to: Optional[StrictInt] = Field(default=None, description="End of the filtering interval. Specified by number of periods (with respect to given granularity). Value 'O' is representing current time-interval (current day, week, ...). If null, then end of the range is unbounded.") + __properties: ClassVar[List[str]] = ["from", "granularity", "to"] + + @field_validator('granularity') + def granularity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR')") + 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 BoundedFilter 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 var_from (nullable) is None + # and model_fields_set contains the field + if self.var_from is None and "var_from" in self.model_fields_set: + _dict['from'] = None + + # set to None if to (nullable) is None + # and model_fields_set contains the field + if self.to is None and "to" in self.model_fields_set: + _dict['to'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BoundedFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "from": obj.get("from"), + "granularity": obj.get("granularity"), + "to": obj.get("to") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/change_analysis_params.py b/gooddata-api-client/gooddata_api_client/models/change_analysis_params.py new file mode 100644 index 000000000..102475afc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/change_analysis_params.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.attribute_item import AttributeItem +from gooddata_api_client.models.change_analysis_params_filters_inner import ChangeAnalysisParamsFiltersInner +from gooddata_api_client.models.measure_item import MeasureItem +from typing import Optional, Set +from typing_extensions import Self + +class ChangeAnalysisParams(BaseModel): + """ + Change analysis specification. + """ # noqa: E501 + analyzed_period: StrictStr = Field(description="The analyzed time period", alias="analyzedPeriod") + attributes: List[AttributeItem] = Field(description="Attributes to analyze for significant changes") + date_attribute: AttributeItem = Field(alias="dateAttribute") + filters: List[ChangeAnalysisParamsFiltersInner] = Field(description="Optional filters to apply") + measure: MeasureItem + measure_title: StrictStr = Field(description="The title of the measure being analyzed", alias="measureTitle") + reference_period: StrictStr = Field(description="The reference time period", alias="referencePeriod") + use_smart_attribute_selection: StrictBool = Field(description="Whether to use smart attribute selection", alias="useSmartAttributeSelection") + __properties: ClassVar[List[str]] = ["analyzedPeriod", "attributes", "dateAttribute", "filters", "measure", "measureTitle", "referencePeriod", "useSmartAttributeSelection"] + + 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 ChangeAnalysisParams 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 each item in attributes (list) + _items = [] + if self.attributes: + for _item_attributes in self.attributes: + if _item_attributes: + _items.append(_item_attributes.to_dict()) + _dict['attributes'] = _items + # override the default output from pydantic by calling `to_dict()` of date_attribute + if self.date_attribute: + _dict['dateAttribute'] = self.date_attribute.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangeAnalysisParams from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyzedPeriod": obj.get("analyzedPeriod"), + "attributes": [AttributeItem.from_dict(_item) for _item in obj["attributes"]] if obj.get("attributes") is not None else None, + "dateAttribute": AttributeItem.from_dict(obj["dateAttribute"]) if obj.get("dateAttribute") is not None else None, + "filters": [ChangeAnalysisParamsFiltersInner.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "measure": MeasureItem.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "measureTitle": obj.get("measureTitle"), + "referencePeriod": obj.get("referencePeriod"), + "useSmartAttributeSelection": obj.get("useSmartAttributeSelection") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/change_analysis_params_filters_inner.py b/gooddata-api-client/gooddata_api_client/models/change_analysis_params_filters_inner.py new file mode 100644 index 000000000..c73b4ea9f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/change_analysis_params_filters_inner.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.abstract_measure_value_filter import AbstractMeasureValueFilter +from gooddata_api_client.models.filter_definition_for_simple_measure import FilterDefinitionForSimpleMeasure +from gooddata_api_client.models.inline_filter_definition import InlineFilterDefinition +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +CHANGEANALYSISPARAMSFILTERSINNER_ONE_OF_SCHEMAS = ["AbstractMeasureValueFilter", "FilterDefinitionForSimpleMeasure", "InlineFilterDefinition"] + +class ChangeAnalysisParamsFiltersInner(BaseModel): + """ + ChangeAnalysisParamsFiltersInner + """ + # data type: AbstractMeasureValueFilter + oneof_schema_1_validator: Optional[AbstractMeasureValueFilter] = None + # data type: FilterDefinitionForSimpleMeasure + oneof_schema_2_validator: Optional[FilterDefinitionForSimpleMeasure] = None + # data type: InlineFilterDefinition + oneof_schema_3_validator: Optional[InlineFilterDefinition] = None + actual_instance: Optional[Union[AbstractMeasureValueFilter, FilterDefinitionForSimpleMeasure, InlineFilterDefinition]] = None + one_of_schemas: Set[str] = { "AbstractMeasureValueFilter", "FilterDefinitionForSimpleMeasure", "InlineFilterDefinition" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = ChangeAnalysisParamsFiltersInner.model_construct() + error_messages = [] + match = 0 + # validate data type: AbstractMeasureValueFilter + if not isinstance(v, AbstractMeasureValueFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `AbstractMeasureValueFilter`") + else: + match += 1 + # validate data type: FilterDefinitionForSimpleMeasure + if not isinstance(v, FilterDefinitionForSimpleMeasure): + error_messages.append(f"Error! Input type `{type(v)}` is not `FilterDefinitionForSimpleMeasure`") + else: + match += 1 + # validate data type: InlineFilterDefinition + if not isinstance(v, InlineFilterDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `InlineFilterDefinition`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ChangeAnalysisParamsFiltersInner with oneOf schemas: AbstractMeasureValueFilter, FilterDefinitionForSimpleMeasure, InlineFilterDefinition. 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 + + # deserialize data into AbstractMeasureValueFilter + try: + if match == 0: + instance.actual_instance = AbstractMeasureValueFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FilterDefinitionForSimpleMeasure + try: + if match == 0: + instance.actual_instance = FilterDefinitionForSimpleMeasure.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into InlineFilterDefinition + try: + if match == 0: + instance.actual_instance = InlineFilterDefinition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ChangeAnalysisParamsFiltersInner with oneOf schemas: AbstractMeasureValueFilter, FilterDefinitionForSimpleMeasure, InlineFilterDefinition. 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], AbstractMeasureValueFilter, FilterDefinitionForSimpleMeasure, InlineFilterDefinition]]: + """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/gooddata-api-client/gooddata_api_client/models/change_analysis_request.py b/gooddata-api-client/gooddata_api_client/models/change_analysis_request.py new file mode 100644 index 000000000..1e501c519 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/change_analysis_request.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.attribute_item import AttributeItem +from gooddata_api_client.models.change_analysis_params_filters_inner import ChangeAnalysisParamsFiltersInner +from gooddata_api_client.models.measure_item import MeasureItem +from typing import Optional, Set +from typing_extensions import Self + +class ChangeAnalysisRequest(BaseModel): + """ + Request for change analysis computation + """ # noqa: E501 + analyzed_period: StrictStr = Field(description="The analyzed time period (e.g., '2025-02')", alias="analyzedPeriod") + attributes: Optional[List[AttributeItem]] = Field(default=None, description="Attributes to analyze for significant changes. If empty, valid attributes will be automatically discovered.") + aux_measures: Optional[List[MeasureItem]] = Field(default=None, description="Auxiliary measures", alias="auxMeasures") + date_attribute: AttributeItem = Field(alias="dateAttribute") + exclude_tags: Optional[List[StrictStr]] = Field(default=None, description="Exclude attributes with any of these tags. This filter applies to both auto-discovered and explicitly provided attributes.", alias="excludeTags") + filters: Optional[List[ChangeAnalysisParamsFiltersInner]] = Field(default=None, description="Optional filters to apply.") + include_tags: Optional[List[StrictStr]] = Field(default=None, description="Only include attributes with at least one of these tags. If empty, no inclusion filter is applied. This filter applies to both auto-discovered and explicitly provided attributes.", alias="includeTags") + measure: MeasureItem + reference_period: StrictStr = Field(description="The reference time period (e.g., '2025-01')", alias="referencePeriod") + use_smart_attribute_selection: Optional[StrictBool] = Field(default=False, description="Whether to use smart attribute selection (LLM-based) instead of discovering all valid attributes. If true, GenAI will intelligently select the most relevant attributes for change analysis. If false or not set, all valid attributes will be discovered using Calcique. Smart attribute selection applies only when no attributes are provided.", alias="useSmartAttributeSelection") + __properties: ClassVar[List[str]] = ["analyzedPeriod", "attributes", "auxMeasures", "dateAttribute", "excludeTags", "filters", "includeTags", "measure", "referencePeriod", "useSmartAttributeSelection"] + + 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 ChangeAnalysisRequest 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 each item in attributes (list) + _items = [] + if self.attributes: + for _item_attributes in self.attributes: + if _item_attributes: + _items.append(_item_attributes.to_dict()) + _dict['attributes'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in aux_measures (list) + _items = [] + if self.aux_measures: + for _item_aux_measures in self.aux_measures: + if _item_aux_measures: + _items.append(_item_aux_measures.to_dict()) + _dict['auxMeasures'] = _items + # override the default output from pydantic by calling `to_dict()` of date_attribute + if self.date_attribute: + _dict['dateAttribute'] = self.date_attribute.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangeAnalysisRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyzedPeriod": obj.get("analyzedPeriod"), + "attributes": [AttributeItem.from_dict(_item) for _item in obj["attributes"]] if obj.get("attributes") is not None else None, + "auxMeasures": [MeasureItem.from_dict(_item) for _item in obj["auxMeasures"]] if obj.get("auxMeasures") is not None else None, + "dateAttribute": AttributeItem.from_dict(obj["dateAttribute"]) if obj.get("dateAttribute") is not None else None, + "excludeTags": obj.get("excludeTags"), + "filters": [ChangeAnalysisParamsFiltersInner.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "includeTags": obj.get("includeTags"), + "measure": MeasureItem.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "referencePeriod": obj.get("referencePeriod"), + "useSmartAttributeSelection": obj.get("useSmartAttributeSelection") if obj.get("useSmartAttributeSelection") is not None else False + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/change_analysis_response.py b/gooddata-api-client/gooddata_api_client/models/change_analysis_response.py new file mode 100644 index 000000000..6e7276af6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/change_analysis_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.execution_links import ExecutionLinks +from typing import Optional, Set +from typing_extensions import Self + +class ChangeAnalysisResponse(BaseModel): + """ + Response for change analysis computation + """ # noqa: E501 + links: ExecutionLinks + __properties: ClassVar[List[str]] = ["links"] + + 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 ChangeAnalysisResponse 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 links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangeAnalysisResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "links": ExecutionLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/change_analysis_result.py b/gooddata-api-client/gooddata_api_client/models/change_analysis_result.py new file mode 100644 index 000000000..ec805de97 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/change_analysis_result.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.metric_value_change import MetricValueChange +from typing import Optional, Set +from typing_extensions import Self + +class ChangeAnalysisResult(BaseModel): + """ + Result of a change analysis execution. + """ # noqa: E501 + data: List[MetricValueChange] = Field(description="The change analysis result data containing significant changes.") + __properties: ClassVar[List[str]] = ["data"] + + 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 ChangeAnalysisResult 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangeAnalysisResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [MetricValueChange.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/chat_history_interaction.py b/gooddata-api-client/gooddata_api_client/models/chat_history_interaction.py new file mode 100644 index 000000000..ea99ebb8e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/chat_history_interaction.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.change_analysis_params import ChangeAnalysisParams +from gooddata_api_client.models.created_visualizations import CreatedVisualizations +from gooddata_api_client.models.found_objects import FoundObjects +from gooddata_api_client.models.reasoning import Reasoning +from gooddata_api_client.models.route_result import RouteResult +from gooddata_api_client.models.search_result import SearchResult +from typing import Optional, Set +from typing_extensions import Self + +class ChatHistoryInteraction(BaseModel): + """ + List of chat history interactions. + """ # noqa: E501 + change_analysis_params: Optional[ChangeAnalysisParams] = Field(default=None, alias="changeAnalysisParams") + chat_history_interaction_id: StrictStr = Field(description="Chat History interaction ID. Unique ID for each interaction.", alias="chatHistoryInteractionId") + created_visualizations: Optional[CreatedVisualizations] = Field(default=None, alias="createdVisualizations") + error_response: Optional[StrictStr] = Field(default=None, description="Error response in anything fails.", alias="errorResponse") + found_objects: Optional[FoundObjects] = Field(default=None, alias="foundObjects") + interaction_finished: StrictBool = Field(description="Has the interaction already finished? Can be used for polling when interaction is in progress.", alias="interactionFinished") + question: Annotated[str, Field(strict=True, max_length=2000)] = Field(description="User question") + reasoning: Optional[Reasoning] = None + routing: RouteResult + semantic_search: Optional[SearchResult] = Field(default=None, alias="semanticSearch") + text_response: Optional[StrictStr] = Field(default=None, description="Text response for general questions.", alias="textResponse") + thread_id_suffix: Optional[StrictStr] = Field(default=None, description="Chat History thread suffix appended to ID generated by backend. Enables more chat windows.", alias="threadIdSuffix") + user_feedback: Optional[StrictStr] = Field(default=None, description="User feedback.", alias="userFeedback") + __properties: ClassVar[List[str]] = ["changeAnalysisParams", "chatHistoryInteractionId", "createdVisualizations", "errorResponse", "foundObjects", "interactionFinished", "question", "reasoning", "routing", "semanticSearch", "textResponse", "threadIdSuffix", "userFeedback"] + + @field_validator('user_feedback') + def user_feedback_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['POSITIVE', 'NEGATIVE', 'NONE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('POSITIVE', 'NEGATIVE', 'NONE')") + 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 ChatHistoryInteraction 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 change_analysis_params + if self.change_analysis_params: + _dict['changeAnalysisParams'] = self.change_analysis_params.to_dict() + # override the default output from pydantic by calling `to_dict()` of created_visualizations + if self.created_visualizations: + _dict['createdVisualizations'] = self.created_visualizations.to_dict() + # override the default output from pydantic by calling `to_dict()` of found_objects + if self.found_objects: + _dict['foundObjects'] = self.found_objects.to_dict() + # override the default output from pydantic by calling `to_dict()` of reasoning + if self.reasoning: + _dict['reasoning'] = self.reasoning.to_dict() + # override the default output from pydantic by calling `to_dict()` of routing + if self.routing: + _dict['routing'] = self.routing.to_dict() + # override the default output from pydantic by calling `to_dict()` of semantic_search + if self.semantic_search: + _dict['semanticSearch'] = self.semantic_search.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChatHistoryInteraction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeAnalysisParams": ChangeAnalysisParams.from_dict(obj["changeAnalysisParams"]) if obj.get("changeAnalysisParams") is not None else None, + "chatHistoryInteractionId": obj.get("chatHistoryInteractionId"), + "createdVisualizations": CreatedVisualizations.from_dict(obj["createdVisualizations"]) if obj.get("createdVisualizations") is not None else None, + "errorResponse": obj.get("errorResponse"), + "foundObjects": FoundObjects.from_dict(obj["foundObjects"]) if obj.get("foundObjects") is not None else None, + "interactionFinished": obj.get("interactionFinished"), + "question": obj.get("question"), + "reasoning": Reasoning.from_dict(obj["reasoning"]) if obj.get("reasoning") is not None else None, + "routing": RouteResult.from_dict(obj["routing"]) if obj.get("routing") is not None else None, + "semanticSearch": SearchResult.from_dict(obj["semanticSearch"]) if obj.get("semanticSearch") is not None else None, + "textResponse": obj.get("textResponse"), + "threadIdSuffix": obj.get("threadIdSuffix"), + "userFeedback": obj.get("userFeedback") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/chat_history_request.py b/gooddata-api-client/gooddata_api_client/models/chat_history_request.py new file mode 100644 index 000000000..fcee4e00e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/chat_history_request.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.saved_visualization import SavedVisualization +from typing import Optional, Set +from typing_extensions import Self + +class ChatHistoryRequest(BaseModel): + """ + ChatHistoryRequest + """ # noqa: E501 + chat_history_interaction_id: Optional[StrictStr] = Field(default=None, description="Return chat history records only after this interaction ID. If empty, complete chat history is returned.", alias="chatHistoryInteractionId") + reset: Optional[StrictBool] = Field(default=None, description="User feedback.") + response_state: Optional[StrictStr] = Field(default=None, description="Response state indicating the outcome of the AI interaction.", alias="responseState") + saved_visualization: Optional[SavedVisualization] = Field(default=None, alias="savedVisualization") + thread_id_suffix: Optional[StrictStr] = Field(default=None, description="Chat History thread suffix appended to ID generated by backend. Enables more chat windows.", alias="threadIdSuffix") + user_feedback: Optional[StrictStr] = Field(default=None, description="User feedback.", alias="userFeedback") + user_text_feedback: Optional[StrictStr] = Field(default=None, description="User text feedback for the interaction.", alias="userTextFeedback") + __properties: ClassVar[List[str]] = ["chatHistoryInteractionId", "reset", "responseState", "savedVisualization", "threadIdSuffix", "userFeedback", "userTextFeedback"] + + @field_validator('response_state') + def response_state_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['SUCCESSFUL', 'UNEXPECTED_ERROR', 'NOT_FOUND_ATTRIBUTES', 'TOO_MANY_DATA_POINTS', 'NO_DATA', 'NO_RESULTS', 'OUT_OF_TOPIC']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SUCCESSFUL', 'UNEXPECTED_ERROR', 'NOT_FOUND_ATTRIBUTES', 'TOO_MANY_DATA_POINTS', 'NO_DATA', 'NO_RESULTS', 'OUT_OF_TOPIC')") + return value + + @field_validator('user_feedback') + def user_feedback_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['POSITIVE', 'NEGATIVE', 'NONE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('POSITIVE', 'NEGATIVE', 'NONE')") + 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 ChatHistoryRequest 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 saved_visualization + if self.saved_visualization: + _dict['savedVisualization'] = self.saved_visualization.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChatHistoryRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "chatHistoryInteractionId": obj.get("chatHistoryInteractionId"), + "reset": obj.get("reset"), + "responseState": obj.get("responseState"), + "savedVisualization": SavedVisualization.from_dict(obj["savedVisualization"]) if obj.get("savedVisualization") is not None else None, + "threadIdSuffix": obj.get("threadIdSuffix"), + "userFeedback": obj.get("userFeedback"), + "userTextFeedback": obj.get("userTextFeedback") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/chat_history_result.py b/gooddata-api-client/gooddata_api_client/models/chat_history_result.py new file mode 100644 index 000000000..94c62158d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/chat_history_result.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.chat_history_interaction import ChatHistoryInteraction +from typing import Optional, Set +from typing_extensions import Self + +class ChatHistoryResult(BaseModel): + """ + ChatHistoryResult + """ # noqa: E501 + interactions: List[ChatHistoryInteraction] = Field(description="List of chat history interactions.") + thread_id: StrictStr = Field(description="The conversation thread ID.", alias="threadId") + __properties: ClassVar[List[str]] = ["interactions", "threadId"] + + 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 ChatHistoryResult 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 each item in interactions (list) + _items = [] + if self.interactions: + for _item_interactions in self.interactions: + if _item_interactions: + _items.append(_item_interactions.to_dict()) + _dict['interactions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChatHistoryResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interactions": [ChatHistoryInteraction.from_dict(_item) for _item in obj["interactions"]] if obj.get("interactions") is not None else None, + "threadId": obj.get("threadId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/chat_request.py b/gooddata-api-client/gooddata_api_client/models/chat_request.py new file mode 100644 index 000000000..2dde53a33 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/chat_request.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from gooddata_api_client.models.allowed_relationship_type import AllowedRelationshipType +from gooddata_api_client.models.user_context import UserContext +from typing import Optional, Set +from typing_extensions import Self + +class ChatRequest(BaseModel): + """ + ChatRequest + """ # noqa: E501 + allowed_relationship_types: Optional[List[AllowedRelationshipType]] = Field(default=None, description="Filter relationships and search results based on allowed relationship type combinations. When specified, only relationships matching the allowed types are returned (e.g. for view-only users).", alias="allowedRelationshipTypes") + include_hidden: Optional[StrictBool] = Field(default=False, description="If true, includes hidden objects in search and visualization building. If false (default), excludes objects where isHidden=true.", alias="includeHidden") + limit_create: Optional[StrictInt] = Field(default=3, description="Maximum number of created results.", alias="limitCreate") + limit_create_context: Optional[StrictInt] = Field(default=10, description="Maximum number of relevant objects included into context for LLM (for each object type).", alias="limitCreateContext") + limit_search: Optional[StrictInt] = Field(default=5, description="Maximum number of search results.", alias="limitSearch") + object_types: Optional[List[StrictStr]] = Field(default=None, description="List of object types to filter the search and visualization building. If empty or null, all object types are considered.", alias="objectTypes") + question: Annotated[str, Field(strict=True, max_length=2000)] = Field(description="User question") + relevant_score_threshold: Optional[Union[StrictFloat, StrictInt]] = Field(default=0.45, description="Score, above which we return found objects. Below this score objects are not relevant.", alias="relevantScoreThreshold") + search_score_threshold: Optional[Union[StrictFloat, StrictInt]] = Field(default=0.9, description="Score, above which we return found object(s) and don't call LLM to create new objects.", alias="searchScoreThreshold") + thread_id_suffix: Optional[StrictStr] = Field(default=None, description="Chat History thread suffix appended to ID generated by backend. Enables more chat windows.", alias="threadIdSuffix") + title_to_descriptor_ratio: Optional[Union[StrictFloat, StrictInt]] = Field(default=0.7, description="Temporary for experiments. Ratio of title score to descriptor score.", alias="titleToDescriptorRatio") + user_context: Optional[UserContext] = Field(default=None, alias="userContext") + __properties: ClassVar[List[str]] = ["allowedRelationshipTypes", "includeHidden", "limitCreate", "limitCreateContext", "limitSearch", "objectTypes", "question", "relevantScoreThreshold", "searchScoreThreshold", "threadIdSuffix", "titleToDescriptorRatio", "userContext"] + + @field_validator('object_types') + def object_types_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['attribute', 'metric', 'fact', 'label', 'date', 'dataset', 'visualization', 'dashboard']): + raise ValueError("each list item must be one of ('attribute', 'metric', 'fact', 'label', 'date', 'dataset', 'visualization', 'dashboard')") + 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 ChatRequest 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 each item in allowed_relationship_types (list) + _items = [] + if self.allowed_relationship_types: + for _item_allowed_relationship_types in self.allowed_relationship_types: + if _item_allowed_relationship_types: + _items.append(_item_allowed_relationship_types.to_dict()) + _dict['allowedRelationshipTypes'] = _items + # override the default output from pydantic by calling `to_dict()` of user_context + if self.user_context: + _dict['userContext'] = self.user_context.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChatRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowedRelationshipTypes": [AllowedRelationshipType.from_dict(_item) for _item in obj["allowedRelationshipTypes"]] if obj.get("allowedRelationshipTypes") is not None else None, + "includeHidden": obj.get("includeHidden") if obj.get("includeHidden") is not None else False, + "limitCreate": obj.get("limitCreate") if obj.get("limitCreate") is not None else 3, + "limitCreateContext": obj.get("limitCreateContext") if obj.get("limitCreateContext") is not None else 10, + "limitSearch": obj.get("limitSearch") if obj.get("limitSearch") is not None else 5, + "objectTypes": obj.get("objectTypes"), + "question": obj.get("question"), + "relevantScoreThreshold": obj.get("relevantScoreThreshold") if obj.get("relevantScoreThreshold") is not None else 0.45, + "searchScoreThreshold": obj.get("searchScoreThreshold") if obj.get("searchScoreThreshold") is not None else 0.9, + "threadIdSuffix": obj.get("threadIdSuffix"), + "titleToDescriptorRatio": obj.get("titleToDescriptorRatio") if obj.get("titleToDescriptorRatio") is not None else 0.7, + "userContext": UserContext.from_dict(obj["userContext"]) if obj.get("userContext") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/chat_result.py b/gooddata-api-client/gooddata_api_client/models/chat_result.py new file mode 100644 index 000000000..2ebdd3715 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/chat_result.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.change_analysis_params import ChangeAnalysisParams +from gooddata_api_client.models.created_visualizations import CreatedVisualizations +from gooddata_api_client.models.found_objects import FoundObjects +from gooddata_api_client.models.reasoning import Reasoning +from gooddata_api_client.models.route_result import RouteResult +from gooddata_api_client.models.search_result import SearchResult +from typing import Optional, Set +from typing_extensions import Self + +class ChatResult(BaseModel): + """ + ChatResult + """ # noqa: E501 + change_analysis_params: Optional[ChangeAnalysisParams] = Field(default=None, alias="changeAnalysisParams") + chat_history_interaction_id: Optional[StrictStr] = Field(default=None, description="Chat History interaction ID. Unique ID for each interaction.", alias="chatHistoryInteractionId") + created_visualizations: Optional[CreatedVisualizations] = Field(default=None, alias="createdVisualizations") + error_response: Optional[StrictStr] = Field(default=None, description="Error response in anything fails.", alias="errorResponse") + found_objects: Optional[FoundObjects] = Field(default=None, alias="foundObjects") + reasoning: Optional[Reasoning] = None + routing: Optional[RouteResult] = None + semantic_search: Optional[SearchResult] = Field(default=None, alias="semanticSearch") + text_response: Optional[StrictStr] = Field(default=None, description="Text response for general questions.", alias="textResponse") + thread_id_suffix: Optional[StrictStr] = Field(default=None, description="Chat History thread suffix appended to ID generated by backend. Enables more chat windows.", alias="threadIdSuffix") + __properties: ClassVar[List[str]] = ["changeAnalysisParams", "chatHistoryInteractionId", "createdVisualizations", "errorResponse", "foundObjects", "reasoning", "routing", "semanticSearch", "textResponse", "threadIdSuffix"] + + 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 ChatResult 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 change_analysis_params + if self.change_analysis_params: + _dict['changeAnalysisParams'] = self.change_analysis_params.to_dict() + # override the default output from pydantic by calling `to_dict()` of created_visualizations + if self.created_visualizations: + _dict['createdVisualizations'] = self.created_visualizations.to_dict() + # override the default output from pydantic by calling `to_dict()` of found_objects + if self.found_objects: + _dict['foundObjects'] = self.found_objects.to_dict() + # override the default output from pydantic by calling `to_dict()` of reasoning + if self.reasoning: + _dict['reasoning'] = self.reasoning.to_dict() + # override the default output from pydantic by calling `to_dict()` of routing + if self.routing: + _dict['routing'] = self.routing.to_dict() + # override the default output from pydantic by calling `to_dict()` of semantic_search + if self.semantic_search: + _dict['semanticSearch'] = self.semantic_search.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChatResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeAnalysisParams": ChangeAnalysisParams.from_dict(obj["changeAnalysisParams"]) if obj.get("changeAnalysisParams") is not None else None, + "chatHistoryInteractionId": obj.get("chatHistoryInteractionId"), + "createdVisualizations": CreatedVisualizations.from_dict(obj["createdVisualizations"]) if obj.get("createdVisualizations") is not None else None, + "errorResponse": obj.get("errorResponse"), + "foundObjects": FoundObjects.from_dict(obj["foundObjects"]) if obj.get("foundObjects") is not None else None, + "reasoning": Reasoning.from_dict(obj["reasoning"]) if obj.get("reasoning") is not None else None, + "routing": RouteResult.from_dict(obj["routing"]) if obj.get("routing") is not None else None, + "semanticSearch": SearchResult.from_dict(obj["semanticSearch"]) if obj.get("semanticSearch") is not None else None, + "textResponse": obj.get("textResponse"), + "threadIdSuffix": obj.get("threadIdSuffix") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/chat_usage_response.py b/gooddata-api-client/gooddata_api_client/models/chat_usage_response.py new file mode 100644 index 000000000..c8e2e6e22 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/chat_usage_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ChatUsageResponse(BaseModel): + """ + ChatUsageResponse + """ # noqa: E501 + interaction_count: StrictInt = Field(description="Number of interactions in the time window", alias="interactionCount") + interaction_limit: StrictInt = Field(description="Maximum number of interactions in the time window any user can do in the workspace", alias="interactionLimit") + time_window_hours: StrictInt = Field(description="Time window in hours", alias="timeWindowHours") + __properties: ClassVar[List[str]] = ["interactionCount", "interactionLimit", "timeWindowHours"] + + 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 ChatUsageResponse 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 ChatUsageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interactionCount": obj.get("interactionCount"), + "interactionLimit": obj.get("interactionLimit"), + "timeWindowHours": obj.get("timeWindowHours") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/clustering_config.py b/gooddata-api-client/gooddata_api_client/models/clustering_config.py new file mode 100644 index 000000000..13e3641a8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/clustering_config.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class ClusteringConfig(BaseModel): + """ + Clustering configuration. + """ # noqa: E501 + number_of_clusters: StrictInt = Field(description="Number of clusters to create", alias="numberOfClusters") + threshold: Union[StrictFloat, StrictInt] = Field(description="Clustering algorithm threshold") + __properties: ClassVar[List[str]] = ["numberOfClusters", "threshold"] + + 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 ClusteringConfig 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 ClusteringConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "numberOfClusters": obj.get("numberOfClusters"), + "threshold": obj.get("threshold") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/clustering_request.py b/gooddata-api-client/gooddata_api_client/models/clustering_request.py new file mode 100644 index 000000000..82e21441f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/clustering_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ClusteringRequest(BaseModel): + """ + ClusteringRequest + """ # noqa: E501 + number_of_clusters: Annotated[int, Field(strict=True, ge=1)] = Field(description="Number of clusters to create", alias="numberOfClusters") + threshold: Optional[Union[Annotated[float, Field(strict=True, gt=0)], Annotated[int, Field(strict=True, gt=0)]]] = Field(default=0.03, description="Threshold used for algorithm") + __properties: ClassVar[List[str]] = ["numberOfClusters", "threshold"] + + 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 ClusteringRequest 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 ClusteringRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "numberOfClusters": obj.get("numberOfClusters"), + "threshold": obj.get("threshold") if obj.get("threshold") is not None else 0.03 + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/clustering_result.py b/gooddata-api-client/gooddata_api_client/models/clustering_result.py new file mode 100644 index 000000000..546f87aae --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/clustering_result.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ClusteringResult(BaseModel): + """ + ClusteringResult + """ # noqa: E501 + attribute: List[Dict[str, Any]] + clusters: List[Optional[StrictInt]] + x_coord: Optional[List[Optional[Union[StrictFloat, StrictInt]]]] = Field(default=None, alias="xCoord") + xcoord: List[Union[StrictFloat, StrictInt]] + y_coord: Optional[List[Optional[Union[StrictFloat, StrictInt]]]] = Field(default=None, alias="yCoord") + ycoord: List[Union[StrictFloat, StrictInt]] + __properties: ClassVar[List[str]] = ["attribute", "clusters", "xCoord", "xcoord", "yCoord", "ycoord"] + + 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 ClusteringResult 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 ClusteringResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attribute": obj.get("attribute"), + "clusters": obj.get("clusters"), + "xCoord": obj.get("xCoord"), + "xcoord": obj.get("xcoord"), + "yCoord": obj.get("yCoord"), + "ycoord": obj.get("ycoord") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/column_override.py b/gooddata-api-client/gooddata_api_client/models/column_override.py new file mode 100644 index 000000000..eafd31bc5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/column_override.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class ColumnOverride(BaseModel): + """ + Table column override. + """ # noqa: E501 + label_target_column: Optional[StrictStr] = Field(default=None, description="Specifies the attribute's column to which this label is associated.", alias="labelTargetColumn") + label_type: Optional[StrictStr] = Field(default=None, description="Label type for the target attribute.", alias="labelType") + ldm_type_override: Optional[StrictStr] = Field(default=None, description="Logical Data Model type for the column.", alias="ldmTypeOverride") + name: StrictStr = Field(description="Column name.") + __properties: ClassVar[List[str]] = ["labelTargetColumn", "labelType", "ldmTypeOverride", "name"] + + @field_validator('label_type') + def label_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['TEXT', 'HYPERLINK', 'GEO', 'GEO_LONGITUDE', 'GEO_LATITUDE', 'GEO_AREA', 'IMAGE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('TEXT', 'HYPERLINK', 'GEO', 'GEO_LONGITUDE', 'GEO_LATITUDE', 'GEO_AREA', 'IMAGE')") + return value + + @field_validator('ldm_type_override') + def ldm_type_override_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['FACT', 'LABEL']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('FACT', 'LABEL')") + 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 ColumnOverride 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 ColumnOverride from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labelTargetColumn": obj.get("labelTargetColumn"), + "labelType": obj.get("labelType"), + "ldmTypeOverride": obj.get("ldmTypeOverride"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/column_statistic.py b/gooddata-api-client/gooddata_api_client/models/column_statistic.py new file mode 100644 index 000000000..ce03b4e09 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/column_statistic.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ColumnStatistic(BaseModel): + """ + ColumnStatistic + """ # noqa: E501 + type: StrictStr + value: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["type", "value"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['COUNT', 'COUNT_NULL', 'COUNT_UNIQUE', 'AVG', 'STDDEV', 'MIN', 'MAX', 'PERCENTILE_25', 'PERCENTILE_50', 'PERCENTILE_75']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('COUNT', 'COUNT_NULL', 'COUNT_UNIQUE', 'AVG', 'STDDEV', 'MIN', 'MAX', 'PERCENTILE_25', 'PERCENTILE_50', 'PERCENTILE_75')") + 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 ColumnStatistic 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 ColumnStatistic from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/column_statistic_warning.py b/gooddata-api-client/gooddata_api_client/models/column_statistic_warning.py new file mode 100644 index 000000000..03bed3459 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/column_statistic_warning.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ColumnStatisticWarning(BaseModel): + """ + ColumnStatisticWarning + """ # noqa: E501 + action: StrictStr + message: StrictStr + __properties: ClassVar[List[str]] = ["action", "message"] + + 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 ColumnStatisticWarning 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 ColumnStatisticWarning from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "action": obj.get("action"), + "message": obj.get("message") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/column_statistics_request.py b/gooddata-api-client/gooddata_api_client/models/column_statistics_request.py new file mode 100644 index 000000000..f3e7f488c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/column_statistics_request.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.column_statistics_request_from import ColumnStatisticsRequestFrom +from gooddata_api_client.models.frequency_properties import FrequencyProperties +from gooddata_api_client.models.histogram_properties import HistogramProperties +from typing import Optional, Set +from typing_extensions import Self + +class ColumnStatisticsRequest(BaseModel): + """ + A request to retrieve statistics for a column. + """ # noqa: E501 + column_name: StrictStr = Field(alias="columnName") + frequency: Optional[FrequencyProperties] = None + var_from: ColumnStatisticsRequestFrom = Field(alias="from") + histogram: Optional[HistogramProperties] = None + statistics: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["columnName", "frequency", "from", "histogram", "statistics"] + + @field_validator('statistics') + def statistics_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['COUNT', 'COUNT_NULL', 'COUNT_UNIQUE', 'AVG', 'STDDEV', 'MIN', 'MAX', 'PERCENTILE_25', 'PERCENTILE_50', 'PERCENTILE_75']): + raise ValueError("each list item must be one of ('COUNT', 'COUNT_NULL', 'COUNT_UNIQUE', 'AVG', 'STDDEV', 'MIN', 'MAX', 'PERCENTILE_25', 'PERCENTILE_50', 'PERCENTILE_75')") + 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 ColumnStatisticsRequest 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 frequency + if self.frequency: + _dict['frequency'] = self.frequency.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_from + if self.var_from: + _dict['from'] = self.var_from.to_dict() + # override the default output from pydantic by calling `to_dict()` of histogram + if self.histogram: + _dict['histogram'] = self.histogram.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ColumnStatisticsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "columnName": obj.get("columnName"), + "frequency": FrequencyProperties.from_dict(obj["frequency"]) if obj.get("frequency") is not None else None, + "from": ColumnStatisticsRequestFrom.from_dict(obj["from"]) if obj.get("from") is not None else None, + "histogram": HistogramProperties.from_dict(obj["histogram"]) if obj.get("histogram") is not None else None, + "statistics": obj.get("statistics") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/column_statistics_request_from.py b/gooddata-api-client/gooddata_api_client/models/column_statistics_request_from.py new file mode 100644 index 000000000..f149c035a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/column_statistics_request_from.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.sql_query import SqlQuery +from gooddata_api_client.models.table import Table +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +COLUMNSTATISTICSREQUESTFROM_ONE_OF_SCHEMAS = ["SqlQuery", "Table"] + +class ColumnStatisticsRequestFrom(BaseModel): + """ + ColumnStatisticsRequestFrom + """ + # data type: SqlQuery + oneof_schema_1_validator: Optional[SqlQuery] = None + # data type: Table + oneof_schema_2_validator: Optional[Table] = None + actual_instance: Optional[Union[SqlQuery, Table]] = None + one_of_schemas: Set[str] = { "SqlQuery", "Table" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = ColumnStatisticsRequestFrom.model_construct() + error_messages = [] + match = 0 + # validate data type: SqlQuery + if not isinstance(v, SqlQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `SqlQuery`") + else: + match += 1 + # validate data type: Table + if not isinstance(v, Table): + error_messages.append(f"Error! Input type `{type(v)}` is not `Table`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ColumnStatisticsRequestFrom with oneOf schemas: SqlQuery, Table. 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 + + # deserialize data into SqlQuery + try: + if match == 0: + instance.actual_instance = SqlQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Table + try: + if match == 0: + instance.actual_instance = Table.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ColumnStatisticsRequestFrom with oneOf schemas: SqlQuery, Table. 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], SqlQuery, Table]]: + """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/gooddata-api-client/gooddata_api_client/models/column_statistics_response.py b/gooddata-api-client/gooddata_api_client/models/column_statistics_response.py new file mode 100644 index 000000000..e0c1b122c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/column_statistics_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.column_statistic import ColumnStatistic +from gooddata_api_client.models.column_statistic_warning import ColumnStatisticWarning +from gooddata_api_client.models.frequency import Frequency +from gooddata_api_client.models.histogram import Histogram +from typing import Optional, Set +from typing_extensions import Self + +class ColumnStatisticsResponse(BaseModel): + """ + ColumnStatisticsResponse + """ # noqa: E501 + frequency: Optional[Frequency] = None + histogram: Optional[Histogram] = None + statistics: Optional[List[ColumnStatistic]] = None + warnings: Optional[List[ColumnStatisticWarning]] = None + __properties: ClassVar[List[str]] = ["frequency", "histogram", "statistics", "warnings"] + + 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 ColumnStatisticsResponse 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 frequency + if self.frequency: + _dict['frequency'] = self.frequency.to_dict() + # override the default output from pydantic by calling `to_dict()` of histogram + if self.histogram: + _dict['histogram'] = self.histogram.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in statistics (list) + _items = [] + if self.statistics: + for _item_statistics in self.statistics: + if _item_statistics: + _items.append(_item_statistics.to_dict()) + _dict['statistics'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) + _items = [] + if self.warnings: + for _item_warnings in self.warnings: + if _item_warnings: + _items.append(_item_warnings.to_dict()) + _dict['warnings'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ColumnStatisticsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frequency": Frequency.from_dict(obj["frequency"]) if obj.get("frequency") is not None else None, + "histogram": Histogram.from_dict(obj["histogram"]) if obj.get("histogram") is not None else None, + "statistics": [ColumnStatistic.from_dict(_item) for _item in obj["statistics"]] if obj.get("statistics") is not None else None, + "warnings": [ColumnStatisticWarning.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/column_warning.py b/gooddata-api-client/gooddata_api_client/models/column_warning.py new file mode 100644 index 000000000..3e6c6bb6f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/column_warning.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ColumnWarning(BaseModel): + """ + Warning related to single column. + """ # noqa: E501 + message: StrictStr = Field(description="Warning message related to the column.") + name: StrictStr = Field(description="Column name.") + __properties: ClassVar[List[str]] = ["message", "name"] + + 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 ColumnWarning 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 ColumnWarning from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/comparison.py b/gooddata-api-client/gooddata_api_client/models/comparison.py new file mode 100644 index 000000000..a60d0d265 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/comparison.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.alert_condition_operand import AlertConditionOperand +from gooddata_api_client.models.local_identifier import LocalIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class Comparison(BaseModel): + """ + Comparison + """ # noqa: E501 + left: LocalIdentifier + operator: StrictStr + right: AlertConditionOperand + __properties: ClassVar[List[str]] = ["left", "operator", "right"] + + @field_validator('operator') + def operator_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['GREATER_THAN', 'GREATER_THAN_OR_EQUAL_TO', 'LESS_THAN', 'LESS_THAN_OR_EQUAL_TO', 'EQUAL_TO', 'NOT_EQUAL_TO']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('GREATER_THAN', 'GREATER_THAN_OR_EQUAL_TO', 'LESS_THAN', 'LESS_THAN_OR_EQUAL_TO', 'EQUAL_TO', 'NOT_EQUAL_TO')") + 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 Comparison 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 left + if self.left: + _dict['left'] = self.left.to_dict() + # override the default output from pydantic by calling `to_dict()` of right + if self.right: + _dict['right'] = self.right.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Comparison from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "left": LocalIdentifier.from_dict(obj["left"]) if obj.get("left") is not None else None, + "operator": obj.get("operator"), + "right": AlertConditionOperand.from_dict(obj["right"]) if obj.get("right") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/comparison_condition.py b/gooddata-api-client/gooddata_api_client/models/comparison_condition.py new file mode 100644 index 000000000..6fbaf64b9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/comparison_condition.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.comparison_condition_comparison import ComparisonConditionComparison +from typing import Optional, Set +from typing_extensions import Self + +class ComparisonCondition(BaseModel): + """ + Condition that compares the metric value to a given constant value using a comparison operator. + """ # noqa: E501 + comparison: ComparisonConditionComparison + __properties: ClassVar[List[str]] = ["comparison"] + + 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 ComparisonCondition 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 comparison + if self.comparison: + _dict['comparison'] = self.comparison.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ComparisonCondition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "comparison": ComparisonConditionComparison.from_dict(obj["comparison"]) if obj.get("comparison") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/comparison_condition_comparison.py b/gooddata-api-client/gooddata_api_client/models/comparison_condition_comparison.py new file mode 100644 index 000000000..376dd6423 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/comparison_condition_comparison.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class ComparisonConditionComparison(BaseModel): + """ + ComparisonConditionComparison + """ # noqa: E501 + operator: StrictStr + value: Union[StrictFloat, StrictInt] + __properties: ClassVar[List[str]] = ["operator", "value"] + + @field_validator('operator') + def operator_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['GREATER_THAN', 'GREATER_THAN_OR_EQUAL_TO', 'LESS_THAN', 'LESS_THAN_OR_EQUAL_TO', 'EQUAL_TO', 'NOT_EQUAL_TO']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('GREATER_THAN', 'GREATER_THAN_OR_EQUAL_TO', 'LESS_THAN', 'LESS_THAN_OR_EQUAL_TO', 'EQUAL_TO', 'NOT_EQUAL_TO')") + 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 ComparisonConditionComparison 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 ComparisonConditionComparison from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "operator": obj.get("operator"), + "value": obj.get("value") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/comparison_measure_value_filter.py b/gooddata-api-client/gooddata_api_client/models/comparison_measure_value_filter.py new file mode 100644 index 000000000..48a71fd73 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/comparison_measure_value_filter.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.comparison_measure_value_filter_comparison_measure_value_filter import ComparisonMeasureValueFilterComparisonMeasureValueFilter +from typing import Optional, Set +from typing_extensions import Self + +class ComparisonMeasureValueFilter(BaseModel): + """ + Filter the result by comparing specified metric to given constant value, using given comparison operator. + """ # noqa: E501 + comparison_measure_value_filter: ComparisonMeasureValueFilterComparisonMeasureValueFilter = Field(alias="comparisonMeasureValueFilter") + __properties: ClassVar[List[str]] = ["comparisonMeasureValueFilter"] + + 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 ComparisonMeasureValueFilter 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 comparison_measure_value_filter + if self.comparison_measure_value_filter: + _dict['comparisonMeasureValueFilter'] = self.comparison_measure_value_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ComparisonMeasureValueFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "comparisonMeasureValueFilter": ComparisonMeasureValueFilterComparisonMeasureValueFilter.from_dict(obj["comparisonMeasureValueFilter"]) if obj.get("comparisonMeasureValueFilter") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/comparison_measure_value_filter_comparison_measure_value_filter.py b/gooddata-api-client/gooddata_api_client/models/comparison_measure_value_filter_comparison_measure_value_filter.py new file mode 100644 index 000000000..acd076649 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/comparison_measure_value_filter_comparison_measure_value_filter.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from gooddata_api_client.models.afm_identifier import AfmIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class ComparisonMeasureValueFilterComparisonMeasureValueFilter(BaseModel): + """ + ComparisonMeasureValueFilterComparisonMeasureValueFilter + """ # noqa: E501 + apply_on_result: Optional[StrictBool] = Field(default=None, alias="applyOnResult") + dimensionality: Optional[List[AfmIdentifier]] = Field(default=None, description="References to the attributes to be used when filtering.") + local_identifier: Optional[StrictStr] = Field(default=None, alias="localIdentifier") + measure: AfmIdentifier + operator: StrictStr + treat_null_values_as: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="A value that will be substituted for null values in the metric for the comparisons.", alias="treatNullValuesAs") + value: Union[StrictFloat, StrictInt] + __properties: ClassVar[List[str]] = ["applyOnResult", "dimensionality", "localIdentifier", "measure", "operator", "treatNullValuesAs", "value"] + + @field_validator('operator') + def operator_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['GREATER_THAN', 'GREATER_THAN_OR_EQUAL_TO', 'LESS_THAN', 'LESS_THAN_OR_EQUAL_TO', 'EQUAL_TO', 'NOT_EQUAL_TO']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('GREATER_THAN', 'GREATER_THAN_OR_EQUAL_TO', 'LESS_THAN', 'LESS_THAN_OR_EQUAL_TO', 'EQUAL_TO', 'NOT_EQUAL_TO')") + 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 ComparisonMeasureValueFilterComparisonMeasureValueFilter 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 each item in dimensionality (list) + _items = [] + if self.dimensionality: + for _item_dimensionality in self.dimensionality: + if _item_dimensionality: + _items.append(_item_dimensionality.to_dict()) + _dict['dimensionality'] = _items + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ComparisonMeasureValueFilterComparisonMeasureValueFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applyOnResult": obj.get("applyOnResult"), + "dimensionality": [AfmIdentifier.from_dict(_item) for _item in obj["dimensionality"]] if obj.get("dimensionality") is not None else None, + "localIdentifier": obj.get("localIdentifier"), + "measure": AfmIdentifier.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "operator": obj.get("operator"), + "treatNullValuesAs": obj.get("treatNullValuesAs"), + "value": obj.get("value") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/comparison_wrapper.py b/gooddata-api-client/gooddata_api_client/models/comparison_wrapper.py new file mode 100644 index 000000000..d6aa08396 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/comparison_wrapper.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.comparison import Comparison +from typing import Optional, Set +from typing_extensions import Self + +class ComparisonWrapper(BaseModel): + """ + ComparisonWrapper + """ # noqa: E501 + comparison: Comparison + __properties: ClassVar[List[str]] = ["comparison"] + + 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 ComparisonWrapper 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 comparison + if self.comparison: + _dict['comparison'] = self.comparison.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ComparisonWrapper from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "comparison": Comparison.from_dict(obj["comparison"]) if obj.get("comparison") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/compound_measure_value_filter.py b/gooddata-api-client/gooddata_api_client/models/compound_measure_value_filter.py new file mode 100644 index 000000000..dbc8734be --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/compound_measure_value_filter.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.compound_measure_value_filter_compound_measure_value_filter import CompoundMeasureValueFilterCompoundMeasureValueFilter +from typing import Optional, Set +from typing_extensions import Self + +class CompoundMeasureValueFilter(BaseModel): + """ + Filter the result by applying multiple comparison and/or range conditions combined with OR logic. If conditions list is empty, no filtering is applied (all rows are returned). + """ # noqa: E501 + compound_measure_value_filter: CompoundMeasureValueFilterCompoundMeasureValueFilter = Field(alias="compoundMeasureValueFilter") + __properties: ClassVar[List[str]] = ["compoundMeasureValueFilter"] + + 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 CompoundMeasureValueFilter 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 compound_measure_value_filter + if self.compound_measure_value_filter: + _dict['compoundMeasureValueFilter'] = self.compound_measure_value_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CompoundMeasureValueFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "compoundMeasureValueFilter": CompoundMeasureValueFilterCompoundMeasureValueFilter.from_dict(obj["compoundMeasureValueFilter"]) if obj.get("compoundMeasureValueFilter") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/compound_measure_value_filter_compound_measure_value_filter.py b/gooddata-api-client/gooddata_api_client/models/compound_measure_value_filter_compound_measure_value_filter.py new file mode 100644 index 000000000..5ffcf198b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/compound_measure_value_filter_compound_measure_value_filter.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from gooddata_api_client.models.afm_identifier import AfmIdentifier +from gooddata_api_client.models.measure_value_condition import MeasureValueCondition +from typing import Optional, Set +from typing_extensions import Self + +class CompoundMeasureValueFilterCompoundMeasureValueFilter(BaseModel): + """ + CompoundMeasureValueFilterCompoundMeasureValueFilter + """ # noqa: E501 + apply_on_result: Optional[StrictBool] = Field(default=None, alias="applyOnResult") + conditions: List[MeasureValueCondition] = Field(description="List of conditions to apply. Conditions are combined with OR logic. Each condition can be either a comparison (e.g., > 100) or a range (e.g., BETWEEN 10 AND 50). If empty, no filtering is applied and all rows are returned.") + dimensionality: Optional[List[AfmIdentifier]] = Field(default=None, description="References to the attributes to be used when filtering.") + local_identifier: Optional[StrictStr] = Field(default=None, alias="localIdentifier") + measure: AfmIdentifier + treat_null_values_as: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="A value that will be substituted for null values in the metric for the comparisons.", alias="treatNullValuesAs") + __properties: ClassVar[List[str]] = ["applyOnResult", "conditions", "dimensionality", "localIdentifier", "measure", "treatNullValuesAs"] + + 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 CompoundMeasureValueFilterCompoundMeasureValueFilter 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 each item in conditions (list) + _items = [] + if self.conditions: + for _item_conditions in self.conditions: + if _item_conditions: + _items.append(_item_conditions.to_dict()) + _dict['conditions'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in dimensionality (list) + _items = [] + if self.dimensionality: + for _item_dimensionality in self.dimensionality: + if _item_dimensionality: + _items.append(_item_dimensionality.to_dict()) + _dict['dimensionality'] = _items + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CompoundMeasureValueFilterCompoundMeasureValueFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applyOnResult": obj.get("applyOnResult"), + "conditions": [MeasureValueCondition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None, + "dimensionality": [AfmIdentifier.from_dict(_item) for _item in obj["dimensionality"]] if obj.get("dimensionality") is not None else None, + "localIdentifier": obj.get("localIdentifier"), + "measure": AfmIdentifier.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "treatNullValuesAs": obj.get("treatNullValuesAs") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/content_slide_template.py b/gooddata-api-client/gooddata_api_client/models/content_slide_template.py new file mode 100644 index 000000000..ee6e45ae5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/content_slide_template.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.running_section import RunningSection +from typing import Optional, Set +from typing_extensions import Self + +class ContentSlideTemplate(BaseModel): + """ + Settings for content slide. + """ # noqa: E501 + description_field: Optional[StrictStr] = Field(default=None, alias="descriptionField") + footer: Optional[RunningSection] = None + header: Optional[RunningSection] = None + __properties: ClassVar[List[str]] = ["descriptionField", "footer", "header"] + + 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 ContentSlideTemplate 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 footer + if self.footer: + _dict['footer'] = self.footer.to_dict() + # override the default output from pydantic by calling `to_dict()` of header + if self.header: + _dict['header'] = self.header.to_dict() + # set to None if description_field (nullable) is None + # and model_fields_set contains the field + if self.description_field is None and "description_field" in self.model_fields_set: + _dict['descriptionField'] = None + + # set to None if footer (nullable) is None + # and model_fields_set contains the field + if self.footer is None and "footer" in self.model_fields_set: + _dict['footer'] = None + + # set to None if header (nullable) is None + # and model_fields_set contains the field + if self.header is None and "header" in self.model_fields_set: + _dict['header'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ContentSlideTemplate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "descriptionField": obj.get("descriptionField"), + "footer": RunningSection.from_dict(obj["footer"]) if obj.get("footer") is not None else None, + "header": RunningSection.from_dict(obj["header"]) if obj.get("header") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/cover_slide_template.py b/gooddata-api-client/gooddata_api_client/models/cover_slide_template.py new file mode 100644 index 000000000..2af866d56 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/cover_slide_template.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.running_section import RunningSection +from typing import Optional, Set +from typing_extensions import Self + +class CoverSlideTemplate(BaseModel): + """ + Settings for cover slide. + """ # noqa: E501 + background_image: Optional[StrictBool] = Field(default=True, description="Show background image on the slide.", alias="backgroundImage") + description_field: Optional[StrictStr] = Field(default=None, alias="descriptionField") + footer: Optional[RunningSection] = None + header: Optional[RunningSection] = None + __properties: ClassVar[List[str]] = ["backgroundImage", "descriptionField", "footer", "header"] + + 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 CoverSlideTemplate 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 footer + if self.footer: + _dict['footer'] = self.footer.to_dict() + # override the default output from pydantic by calling `to_dict()` of header + if self.header: + _dict['header'] = self.header.to_dict() + # set to None if description_field (nullable) is None + # and model_fields_set contains the field + if self.description_field is None and "description_field" in self.model_fields_set: + _dict['descriptionField'] = None + + # set to None if footer (nullable) is None + # and model_fields_set contains the field + if self.footer is None and "footer" in self.model_fields_set: + _dict['footer'] = None + + # set to None if header (nullable) is None + # and model_fields_set contains the field + if self.header is None and "header" in self.model_fields_set: + _dict['header'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CoverSlideTemplate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "backgroundImage": obj.get("backgroundImage") if obj.get("backgroundImage") is not None else True, + "descriptionField": obj.get("descriptionField"), + "footer": RunningSection.from_dict(obj["footer"]) if obj.get("footer") is not None else None, + "header": RunningSection.from_dict(obj["header"]) if obj.get("header") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/create_knowledge_document_request_dto.py b/gooddata-api-client/gooddata_api_client/models/create_knowledge_document_request_dto.py new file mode 100644 index 000000000..c9e52c439 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/create_knowledge_document_request_dto.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateKnowledgeDocumentRequestDto(BaseModel): + """ + CreateKnowledgeDocumentRequestDto + """ # noqa: E501 + content: StrictStr + filename: StrictStr + page_boundaries: Optional[List[StrictInt]] = Field(default=None, alias="pageBoundaries") + scopes: Optional[List[StrictStr]] = None + title: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["content", "filename", "pageBoundaries", "scopes", "title"] + + 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 CreateKnowledgeDocumentRequestDto 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 CreateKnowledgeDocumentRequestDto from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "filename": obj.get("filename"), + "pageBoundaries": obj.get("pageBoundaries"), + "scopes": obj.get("scopes"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/create_knowledge_document_response_dto.py b/gooddata-api-client/gooddata_api_client/models/create_knowledge_document_response_dto.py new file mode 100644 index 000000000..301d9f6b6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/create_knowledge_document_response_dto.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateKnowledgeDocumentResponseDto(BaseModel): + """ + CreateKnowledgeDocumentResponseDto + """ # noqa: E501 + filename: StrictStr + message: StrictStr + num_chunks: StrictInt = Field(alias="numChunks") + success: StrictBool + __properties: ClassVar[List[str]] = ["filename", "message", "numChunks", "success"] + + 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 CreateKnowledgeDocumentResponseDto 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 CreateKnowledgeDocumentResponseDto from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filename": obj.get("filename"), + "message": obj.get("message"), + "numChunks": obj.get("numChunks"), + "success": obj.get("success") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/created_visualization.py b/gooddata-api-client/gooddata_api_client/models/created_visualization.py new file mode 100644 index 000000000..044a8de58 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/created_visualization.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.created_visualization_filters_inner import CreatedVisualizationFiltersInner +from gooddata_api_client.models.dim_attribute import DimAttribute +from gooddata_api_client.models.metric import Metric +from gooddata_api_client.models.suggestion import Suggestion +from gooddata_api_client.models.visualization_config import VisualizationConfig +from typing import Optional, Set +from typing_extensions import Self + +class CreatedVisualization(BaseModel): + """ + List of created visualization objects + """ # noqa: E501 + config: Optional[VisualizationConfig] = None + dimensionality: List[DimAttribute] = Field(description="List of attributes representing the dimensionality of the new visualization") + filters: List[CreatedVisualizationFiltersInner] = Field(description="List of filters to be applied to the new visualization") + id: StrictStr = Field(description="Proposed ID of the new visualization") + metrics: List[Metric] = Field(description="List of metrics to be used in the new visualization") + saved_visualization_id: Optional[StrictStr] = Field(default=None, description="Saved visualization ID.", alias="savedVisualizationId") + suggestions: List[Suggestion] = Field(description="Suggestions for next steps") + title: StrictStr = Field(description="Proposed title of the new visualization") + visualization_type: StrictStr = Field(description="Visualization type requested in question", alias="visualizationType") + __properties: ClassVar[List[str]] = ["config", "dimensionality", "filters", "id", "metrics", "savedVisualizationId", "suggestions", "title", "visualizationType"] + + @field_validator('visualization_type') + def visualization_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['TABLE', 'HEADLINE', 'BAR', 'LINE', 'PIE', 'COLUMN', 'SCATTER']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('TABLE', 'HEADLINE', 'BAR', 'LINE', 'PIE', 'COLUMN', 'SCATTER')") + 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 CreatedVisualization 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 config + if self.config: + _dict['config'] = self.config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in dimensionality (list) + _items = [] + if self.dimensionality: + for _item_dimensionality in self.dimensionality: + if _item_dimensionality: + _items.append(_item_dimensionality.to_dict()) + _dict['dimensionality'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in metrics (list) + _items = [] + if self.metrics: + for _item_metrics in self.metrics: + if _item_metrics: + _items.append(_item_metrics.to_dict()) + _dict['metrics'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in suggestions (list) + _items = [] + if self.suggestions: + for _item_suggestions in self.suggestions: + if _item_suggestions: + _items.append(_item_suggestions.to_dict()) + _dict['suggestions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreatedVisualization from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "config": VisualizationConfig.from_dict(obj["config"]) if obj.get("config") is not None else None, + "dimensionality": [DimAttribute.from_dict(_item) for _item in obj["dimensionality"]] if obj.get("dimensionality") is not None else None, + "filters": [CreatedVisualizationFiltersInner.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "id": obj.get("id"), + "metrics": [Metric.from_dict(_item) for _item in obj["metrics"]] if obj.get("metrics") is not None else None, + "savedVisualizationId": obj.get("savedVisualizationId"), + "suggestions": [Suggestion.from_dict(_item) for _item in obj["suggestions"]] if obj.get("suggestions") is not None else None, + "title": obj.get("title"), + "visualizationType": obj.get("visualizationType") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/created_visualization_filters_inner.py b/gooddata-api-client/gooddata_api_client/models/created_visualization_filters_inner.py new file mode 100644 index 000000000..55b4cf8cc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/created_visualization_filters_inner.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.attribute_negative_filter import AttributeNegativeFilter +from gooddata_api_client.models.attribute_positive_filter import AttributePositiveFilter +from gooddata_api_client.models.date_absolute_filter import DateAbsoluteFilter +from gooddata_api_client.models.date_relative_filter import DateRelativeFilter +from gooddata_api_client.models.ranking_filter import RankingFilter +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +CREATEDVISUALIZATIONFILTERSINNER_ONE_OF_SCHEMAS = ["AttributeNegativeFilter", "AttributePositiveFilter", "DateAbsoluteFilter", "DateRelativeFilter", "RankingFilter"] + +class CreatedVisualizationFiltersInner(BaseModel): + """ + CreatedVisualizationFiltersInner + """ + # data type: AttributeNegativeFilter + oneof_schema_1_validator: Optional[AttributeNegativeFilter] = None + # data type: AttributePositiveFilter + oneof_schema_2_validator: Optional[AttributePositiveFilter] = None + # data type: DateAbsoluteFilter + oneof_schema_3_validator: Optional[DateAbsoluteFilter] = None + # data type: DateRelativeFilter + oneof_schema_4_validator: Optional[DateRelativeFilter] = None + # data type: RankingFilter + oneof_schema_5_validator: Optional[RankingFilter] = None + actual_instance: Optional[Union[AttributeNegativeFilter, AttributePositiveFilter, DateAbsoluteFilter, DateRelativeFilter, RankingFilter]] = None + one_of_schemas: Set[str] = { "AttributeNegativeFilter", "AttributePositiveFilter", "DateAbsoluteFilter", "DateRelativeFilter", "RankingFilter" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = CreatedVisualizationFiltersInner.model_construct() + error_messages = [] + match = 0 + # validate data type: AttributeNegativeFilter + if not isinstance(v, AttributeNegativeFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `AttributeNegativeFilter`") + else: + match += 1 + # validate data type: AttributePositiveFilter + if not isinstance(v, AttributePositiveFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `AttributePositiveFilter`") + else: + match += 1 + # validate data type: DateAbsoluteFilter + if not isinstance(v, DateAbsoluteFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `DateAbsoluteFilter`") + else: + match += 1 + # validate data type: DateRelativeFilter + if not isinstance(v, DateRelativeFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `DateRelativeFilter`") + else: + match += 1 + # validate data type: RankingFilter + if not isinstance(v, RankingFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `RankingFilter`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in CreatedVisualizationFiltersInner with oneOf schemas: AttributeNegativeFilter, AttributePositiveFilter, DateAbsoluteFilter, DateRelativeFilter, RankingFilter. 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 + + # deserialize data into AttributeNegativeFilter + try: + if match == 0: + instance.actual_instance = AttributeNegativeFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AttributePositiveFilter + try: + if match == 0: + instance.actual_instance = AttributePositiveFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DateAbsoluteFilter + try: + if match == 0: + instance.actual_instance = DateAbsoluteFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DateRelativeFilter + try: + if match == 0: + instance.actual_instance = DateRelativeFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RankingFilter + try: + if match == 0: + instance.actual_instance = RankingFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into CreatedVisualizationFiltersInner with oneOf schemas: AttributeNegativeFilter, AttributePositiveFilter, DateAbsoluteFilter, DateRelativeFilter, RankingFilter. 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], AttributeNegativeFilter, AttributePositiveFilter, DateAbsoluteFilter, DateRelativeFilter, RankingFilter]]: + """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/gooddata-api-client/gooddata_api_client/models/created_visualizations.py b/gooddata-api-client/gooddata_api_client/models/created_visualizations.py new file mode 100644 index 000000000..c797bd079 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/created_visualizations.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.created_visualization import CreatedVisualization +from gooddata_api_client.models.suggestion import Suggestion +from typing import Optional, Set +from typing_extensions import Self + +class CreatedVisualizations(BaseModel): + """ + Visualization definitions created by AI. + """ # noqa: E501 + objects: List[CreatedVisualization] = Field(description="List of created visualization objects") + reasoning: StrictStr = Field(description="DEPRECATED: Use top-level reasoning.steps instead. Reasoning from LLM. Description of how and why the answer was generated.") + suggestions: List[Suggestion] = Field(description="List of suggestions for next steps. Filled when no visualization was created, suggests alternatives.") + __properties: ClassVar[List[str]] = ["objects", "reasoning", "suggestions"] + + 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 CreatedVisualizations 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 each item in objects (list) + _items = [] + if self.objects: + for _item_objects in self.objects: + if _item_objects: + _items.append(_item_objects.to_dict()) + _dict['objects'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in suggestions (list) + _items = [] + if self.suggestions: + for _item_suggestions in self.suggestions: + if _item_suggestions: + _items.append(_item_suggestions.to_dict()) + _dict['suggestions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreatedVisualizations from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "objects": [CreatedVisualization.from_dict(_item) for _item in obj["objects"]] if obj.get("objects") is not None else None, + "reasoning": obj.get("reasoning"), + "suggestions": [Suggestion.from_dict(_item) for _item in obj["suggestions"]] if obj.get("suggestions") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/custom_label.py b/gooddata-api-client/gooddata_api_client/models/custom_label.py new file mode 100644 index 000000000..2ed5d5faa --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/custom_label.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class CustomLabel(BaseModel): + """ + Custom label object override. + """ # noqa: E501 + title: StrictStr = Field(description="Override value.") + __properties: ClassVar[List[str]] = ["title"] + + 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 CustomLabel 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 CustomLabel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/custom_metric.py b/gooddata-api-client/gooddata_api_client/models/custom_metric.py new file mode 100644 index 000000000..3bc3b6fb7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/custom_metric.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class CustomMetric(BaseModel): + """ + Custom metric object override. + """ # noqa: E501 + format: StrictStr = Field(description="Format override.") + title: StrictStr = Field(description="Metric title override.") + __properties: ClassVar[List[str]] = ["format", "title"] + + 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 CustomMetric 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 CustomMetric from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "format": obj.get("format"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/custom_override.py b/gooddata-api-client/gooddata_api_client/models/custom_override.py new file mode 100644 index 000000000..d67277092 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/custom_override.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.custom_label import CustomLabel +from gooddata_api_client.models.custom_metric import CustomMetric +from typing import Optional, Set +from typing_extensions import Self + +class CustomOverride(BaseModel): + """ + Custom cell value overrides (IDs will be replaced with specified values). + """ # noqa: E501 + labels: Optional[Dict[str, CustomLabel]] = Field(default=None, description="Map of CustomLabels with keys used as placeholders in document.") + metrics: Optional[Dict[str, CustomMetric]] = Field(default=None, description="Map of CustomMetrics with keys used as placeholders in document.") + __properties: ClassVar[List[str]] = ["labels", "metrics"] + + 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 CustomOverride 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 each value in labels (dict) + _field_dict = {} + if self.labels: + for _key_labels in self.labels: + if self.labels[_key_labels]: + _field_dict[_key_labels] = self.labels[_key_labels].to_dict() + _dict['labels'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in metrics (dict) + _field_dict = {} + if self.metrics: + for _key_metrics in self.metrics: + if self.metrics[_key_metrics]: + _field_dict[_key_metrics] = self.metrics[_key_metrics].to_dict() + _dict['metrics'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CustomOverride from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labels": dict( + (_k, CustomLabel.from_dict(_v)) + for _k, _v in obj["labels"].items() + ) + if obj.get("labels") is not None + else None, + "metrics": dict( + (_k, CustomMetric.from_dict(_v)) + for _k, _v in obj["metrics"].items() + ) + if obj.get("metrics") is not None + else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dashboard_attribute_filter.py b/gooddata-api-client/gooddata_api_client/models/dashboard_attribute_filter.py new file mode 100644 index 000000000..9ee129a79 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dashboard_attribute_filter.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.dashboard_attribute_filter_attribute_filter import DashboardAttributeFilterAttributeFilter +from typing import Optional, Set +from typing_extensions import Self + +class DashboardAttributeFilter(BaseModel): + """ + DashboardAttributeFilter + """ # noqa: E501 + attribute_filter: DashboardAttributeFilterAttributeFilter = Field(alias="attributeFilter") + __properties: ClassVar[List[str]] = ["attributeFilter"] + + 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 DashboardAttributeFilter 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 attribute_filter + if self.attribute_filter: + _dict['attributeFilter'] = self.attribute_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DashboardAttributeFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributeFilter": DashboardAttributeFilterAttributeFilter.from_dict(obj["attributeFilter"]) if obj.get("attributeFilter") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dashboard_attribute_filter_attribute_filter.py b/gooddata-api-client/gooddata_api_client/models/dashboard_attribute_filter_attribute_filter.py new file mode 100644 index 000000000..b1b5eeee8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dashboard_attribute_filter_attribute_filter.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.attribute_elements import AttributeElements +from gooddata_api_client.models.attribute_filter_by_date import AttributeFilterByDate +from gooddata_api_client.models.attribute_filter_parent import AttributeFilterParent +from gooddata_api_client.models.identifier_ref import IdentifierRef +from typing import Optional, Set +from typing_extensions import Self + +class DashboardAttributeFilterAttributeFilter(BaseModel): + """ + DashboardAttributeFilterAttributeFilter + """ # noqa: E501 + attribute_elements: AttributeElements = Field(alias="attributeElements") + display_form: IdentifierRef = Field(alias="displayForm") + filter_elements_by: Optional[List[AttributeFilterParent]] = Field(default=None, alias="filterElementsBy") + filter_elements_by_date: Optional[List[AttributeFilterByDate]] = Field(default=None, alias="filterElementsByDate") + local_identifier: Optional[StrictStr] = Field(default=None, alias="localIdentifier") + negative_selection: StrictBool = Field(alias="negativeSelection") + selection_mode: Optional[StrictStr] = Field(default=None, alias="selectionMode") + title: Optional[StrictStr] = None + validate_elements_by: Optional[List[IdentifierRef]] = Field(default=None, alias="validateElementsBy") + __properties: ClassVar[List[str]] = ["attributeElements", "displayForm", "filterElementsBy", "filterElementsByDate", "localIdentifier", "negativeSelection", "selectionMode", "title", "validateElementsBy"] + + @field_validator('selection_mode') + def selection_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['single', 'multi']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('single', 'multi')") + 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 DashboardAttributeFilterAttributeFilter 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 attribute_elements + if self.attribute_elements: + _dict['attributeElements'] = self.attribute_elements.to_dict() + # override the default output from pydantic by calling `to_dict()` of display_form + if self.display_form: + _dict['displayForm'] = self.display_form.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filter_elements_by (list) + _items = [] + if self.filter_elements_by: + for _item_filter_elements_by in self.filter_elements_by: + if _item_filter_elements_by: + _items.append(_item_filter_elements_by.to_dict()) + _dict['filterElementsBy'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in filter_elements_by_date (list) + _items = [] + if self.filter_elements_by_date: + for _item_filter_elements_by_date in self.filter_elements_by_date: + if _item_filter_elements_by_date: + _items.append(_item_filter_elements_by_date.to_dict()) + _dict['filterElementsByDate'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in validate_elements_by (list) + _items = [] + if self.validate_elements_by: + for _item_validate_elements_by in self.validate_elements_by: + if _item_validate_elements_by: + _items.append(_item_validate_elements_by.to_dict()) + _dict['validateElementsBy'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DashboardAttributeFilterAttributeFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributeElements": AttributeElements.from_dict(obj["attributeElements"]) if obj.get("attributeElements") is not None else None, + "displayForm": IdentifierRef.from_dict(obj["displayForm"]) if obj.get("displayForm") is not None else None, + "filterElementsBy": [AttributeFilterParent.from_dict(_item) for _item in obj["filterElementsBy"]] if obj.get("filterElementsBy") is not None else None, + "filterElementsByDate": [AttributeFilterByDate.from_dict(_item) for _item in obj["filterElementsByDate"]] if obj.get("filterElementsByDate") is not None else None, + "localIdentifier": obj.get("localIdentifier"), + "negativeSelection": obj.get("negativeSelection"), + "selectionMode": obj.get("selectionMode"), + "title": obj.get("title"), + "validateElementsBy": [IdentifierRef.from_dict(_item) for _item in obj["validateElementsBy"]] if obj.get("validateElementsBy") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dashboard_date_filter.py b/gooddata-api-client/gooddata_api_client/models/dashboard_date_filter.py new file mode 100644 index 000000000..b9fe4d3ea --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dashboard_date_filter.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.dashboard_date_filter_date_filter import DashboardDateFilterDateFilter +from typing import Optional, Set +from typing_extensions import Self + +class DashboardDateFilter(BaseModel): + """ + DashboardDateFilter + """ # noqa: E501 + date_filter: DashboardDateFilterDateFilter = Field(alias="dateFilter") + __properties: ClassVar[List[str]] = ["dateFilter"] + + 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 DashboardDateFilter 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 date_filter + if self.date_filter: + _dict['dateFilter'] = self.date_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DashboardDateFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dateFilter": DashboardDateFilterDateFilter.from_dict(obj["dateFilter"]) if obj.get("dateFilter") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dashboard_date_filter_date_filter.py b/gooddata-api-client/gooddata_api_client/models/dashboard_date_filter_date_filter.py new file mode 100644 index 000000000..01d2b2a50 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dashboard_date_filter_date_filter.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.aac_dashboard_filter_from import AacDashboardFilterFrom +from gooddata_api_client.models.identifier_ref import IdentifierRef +from gooddata_api_client.models.relative_bounded_date_filter import RelativeBoundedDateFilter +from typing import Optional, Set +from typing_extensions import Self + +class DashboardDateFilterDateFilter(BaseModel): + """ + DashboardDateFilterDateFilter + """ # noqa: E501 + attribute: Optional[IdentifierRef] = None + bounded_filter: Optional[RelativeBoundedDateFilter] = Field(default=None, alias="boundedFilter") + data_set: Optional[IdentifierRef] = Field(default=None, alias="dataSet") + empty_value_handling: Optional[StrictStr] = Field(default=None, alias="emptyValueHandling") + var_from: Optional[AacDashboardFilterFrom] = Field(default=None, alias="from") + granularity: StrictStr + local_identifier: Optional[StrictStr] = Field(default=None, alias="localIdentifier") + to: Optional[AacDashboardFilterFrom] = None + type: StrictStr + __properties: ClassVar[List[str]] = ["attribute", "boundedFilter", "dataSet", "emptyValueHandling", "from", "granularity", "localIdentifier", "to", "type"] + + @field_validator('empty_value_handling') + def empty_value_handling_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INCLUDE', 'EXCLUDE', 'ONLY']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INCLUDE', 'EXCLUDE', 'ONLY')") + return value + + @field_validator('granularity') + def granularity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ALL_TIME_GRANULARITY', 'GDC.time.year', 'GDC.time.week_us', 'GDC.time.week_in_year', 'GDC.time.week_in_quarter', 'GDC.time.week', 'GDC.time.euweek_in_year', 'GDC.time.euweek_in_quarter', 'GDC.time.quarter', 'GDC.time.quarter_in_year', 'GDC.time.month', 'GDC.time.month_in_quarter', 'GDC.time.month_in_year', 'GDC.time.day_in_year', 'GDC.time.day_in_quarter', 'GDC.time.day_in_month', 'GDC.time.day_in_week', 'GDC.time.day_in_euweek', 'GDC.time.date', 'GDC.time.hour', 'GDC.time.hour_in_day', 'GDC.time.minute', 'GDC.time.minute_in_hour', 'GDC.time.fiscal_month', 'GDC.time.fiscal_quarter', 'GDC.time.fiscal_year']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ALL_TIME_GRANULARITY', 'GDC.time.year', 'GDC.time.week_us', 'GDC.time.week_in_year', 'GDC.time.week_in_quarter', 'GDC.time.week', 'GDC.time.euweek_in_year', 'GDC.time.euweek_in_quarter', 'GDC.time.quarter', 'GDC.time.quarter_in_year', 'GDC.time.month', 'GDC.time.month_in_quarter', 'GDC.time.month_in_year', 'GDC.time.day_in_year', 'GDC.time.day_in_quarter', 'GDC.time.day_in_month', 'GDC.time.day_in_week', 'GDC.time.day_in_euweek', 'GDC.time.date', 'GDC.time.hour', 'GDC.time.hour_in_day', 'GDC.time.minute', 'GDC.time.minute_in_hour', 'GDC.time.fiscal_month', 'GDC.time.fiscal_quarter', 'GDC.time.fiscal_year')") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['relative', 'absolute']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('relative', 'absolute')") + 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 DashboardDateFilterDateFilter 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 attribute + if self.attribute: + _dict['attribute'] = self.attribute.to_dict() + # override the default output from pydantic by calling `to_dict()` of bounded_filter + if self.bounded_filter: + _dict['boundedFilter'] = self.bounded_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of data_set + if self.data_set: + _dict['dataSet'] = self.data_set.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_from + if self.var_from: + _dict['from'] = self.var_from.to_dict() + # override the default output from pydantic by calling `to_dict()` of to + if self.to: + _dict['to'] = self.to.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DashboardDateFilterDateFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attribute": IdentifierRef.from_dict(obj["attribute"]) if obj.get("attribute") is not None else None, + "boundedFilter": RelativeBoundedDateFilter.from_dict(obj["boundedFilter"]) if obj.get("boundedFilter") is not None else None, + "dataSet": IdentifierRef.from_dict(obj["dataSet"]) if obj.get("dataSet") is not None else None, + "emptyValueHandling": obj.get("emptyValueHandling"), + "from": AacDashboardFilterFrom.from_dict(obj["from"]) if obj.get("from") is not None else None, + "granularity": obj.get("granularity"), + "localIdentifier": obj.get("localIdentifier"), + "to": AacDashboardFilterFrom.from_dict(obj["to"]) if obj.get("to") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dashboard_export_settings.py b/gooddata-api-client/gooddata_api_client/models/dashboard_export_settings.py new file mode 100644 index 000000000..ea4a0d7ce --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dashboard_export_settings.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DashboardExportSettings(BaseModel): + """ + Additional settings. + """ # noqa: E501 + export_info: Optional[StrictBool] = Field(default=False, description="If true, the export will contain the information about the export – exported date, dashboard filters, etc.", alias="exportInfo") + merge_headers: Optional[StrictBool] = Field(default=False, description="Merge equal headers in neighbouring cells. Used for [XLSX] format only.", alias="mergeHeaders") + page_orientation: Optional[StrictStr] = Field(default='PORTRAIT', description="Set page orientation. (PDF)", alias="pageOrientation") + page_size: Optional[StrictStr] = Field(default='A4', description="Set page size. (PDF)", alias="pageSize") + __properties: ClassVar[List[str]] = ["exportInfo", "mergeHeaders", "pageOrientation", "pageSize"] + + @field_validator('page_orientation') + def page_orientation_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['PORTRAIT', 'LANDSCAPE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('PORTRAIT', 'LANDSCAPE')") + return value + + @field_validator('page_size') + def page_size_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['A3', 'A4', 'LETTER']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('A3', 'A4', 'LETTER')") + 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 DashboardExportSettings 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 DashboardExportSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "exportInfo": obj.get("exportInfo") if obj.get("exportInfo") is not None else False, + "mergeHeaders": obj.get("mergeHeaders") if obj.get("mergeHeaders") is not None else False, + "pageOrientation": obj.get("pageOrientation") if obj.get("pageOrientation") is not None else 'PORTRAIT', + "pageSize": obj.get("pageSize") if obj.get("pageSize") is not None else 'A4' + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dashboard_filter.py b/gooddata-api-client/gooddata_api_client/models/dashboard_filter.py new file mode 100644 index 000000000..5e389e32e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dashboard_filter.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.dashboard_attribute_filter import DashboardAttributeFilter +from gooddata_api_client.models.dashboard_date_filter import DashboardDateFilter +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DASHBOARDFILTER_ONE_OF_SCHEMAS = ["DashboardAttributeFilter", "DashboardDateFilter"] + +class DashboardFilter(BaseModel): + """ + DashboardFilter + """ + # data type: DashboardAttributeFilter + oneof_schema_1_validator: Optional[DashboardAttributeFilter] = None + # data type: DashboardDateFilter + oneof_schema_2_validator: Optional[DashboardDateFilter] = None + actual_instance: Optional[Union[DashboardAttributeFilter, DashboardDateFilter]] = None + one_of_schemas: Set[str] = { "DashboardAttributeFilter", "DashboardDateFilter" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = DashboardFilter.model_construct() + error_messages = [] + match = 0 + # validate data type: DashboardAttributeFilter + if not isinstance(v, DashboardAttributeFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `DashboardAttributeFilter`") + else: + match += 1 + # validate data type: DashboardDateFilter + if not isinstance(v, DashboardDateFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `DashboardDateFilter`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DashboardFilter with oneOf schemas: DashboardAttributeFilter, DashboardDateFilter. 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 + + # deserialize data into DashboardAttributeFilter + try: + if match == 0: + instance.actual_instance = DashboardAttributeFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DashboardDateFilter + try: + if match == 0: + instance.actual_instance = DashboardDateFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DashboardFilter with oneOf schemas: DashboardAttributeFilter, DashboardDateFilter. 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], DashboardAttributeFilter, DashboardDateFilter]]: + """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/gooddata-api-client/gooddata_api_client/models/dashboard_permissions.py b/gooddata-api-client/gooddata_api_client/models/dashboard_permissions.py new file mode 100644 index 000000000..16f83f498 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dashboard_permissions.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.rule_permission import RulePermission +from gooddata_api_client.models.user_group_permission import UserGroupPermission +from gooddata_api_client.models.user_permission import UserPermission +from typing import Optional, Set +from typing_extensions import Self + +class DashboardPermissions(BaseModel): + """ + DashboardPermissions + """ # noqa: E501 + rules: List[RulePermission] = Field(description="List of rules") + user_groups: List[UserGroupPermission] = Field(description="List of user groups", alias="userGroups") + users: List[UserPermission] = Field(description="List of users") + __properties: ClassVar[List[str]] = ["rules", "userGroups", "users"] + + 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 DashboardPermissions 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 each item in rules (list) + _items = [] + if self.rules: + for _item_rules in self.rules: + if _item_rules: + _items.append(_item_rules.to_dict()) + _dict['rules'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in user_groups (list) + _items = [] + if self.user_groups: + for _item_user_groups in self.user_groups: + if _item_user_groups: + _items.append(_item_user_groups.to_dict()) + _dict['userGroups'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DashboardPermissions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rules": [RulePermission.from_dict(_item) for _item in obj["rules"]] if obj.get("rules") is not None else None, + "userGroups": [UserGroupPermission.from_dict(_item) for _item in obj["userGroups"]] if obj.get("userGroups") is not None else None, + "users": [UserPermission.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dashboard_permissions_assignment.py b/gooddata-api-client/gooddata_api_client/models/dashboard_permissions_assignment.py new file mode 100644 index 000000000..6c68721b1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dashboard_permissions_assignment.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 DashboardPermissionsAssignment(BaseModel): + """ + Desired levels of permissions for an assignee. + """ # noqa: E501 + permissions: List[StrictStr] + __properties: ClassVar[List[str]] = ["permissions"] + + @field_validator('permissions') + def permissions_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['EDIT', 'SHARE', 'VIEW']): + raise ValueError("each list item must be one of ('EDIT', 'SHARE', 'VIEW')") + 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 DashboardPermissionsAssignment 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 DashboardPermissionsAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "permissions": obj.get("permissions") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dashboard_slides_template.py b/gooddata-api-client/gooddata_api_client/models/dashboard_slides_template.py new file mode 100644 index 000000000..c1715eb08 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dashboard_slides_template.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.content_slide_template import ContentSlideTemplate +from gooddata_api_client.models.cover_slide_template import CoverSlideTemplate +from gooddata_api_client.models.intro_slide_template import IntroSlideTemplate +from gooddata_api_client.models.section_slide_template import SectionSlideTemplate +from typing import Optional, Set +from typing_extensions import Self + +class DashboardSlidesTemplate(BaseModel): + """ + Template for dashboard slides export. Available variables: {{currentPageNumber}}, {{dashboardDateFilters}}, {{dashboardDescription}}, {{dashboardFilters}}, {{dashboardId}}, {{dashboardName}}, {{dashboardTags}}, {{dashboardUrl}}, {{exportedAt}}, {{exportedBy}}, {{logo}}, {{totalPages}}, {{workspaceId}}, {{workspaceName}} + """ # noqa: E501 + applied_on: Annotated[List[StrictStr], Field(min_length=1)] = Field(description="Export types this template applies to.", alias="appliedOn") + content_slide: Optional[ContentSlideTemplate] = Field(default=None, alias="contentSlide") + cover_slide: Optional[CoverSlideTemplate] = Field(default=None, alias="coverSlide") + intro_slide: Optional[IntroSlideTemplate] = Field(default=None, alias="introSlide") + section_slide: Optional[SectionSlideTemplate] = Field(default=None, alias="sectionSlide") + __properties: ClassVar[List[str]] = ["appliedOn", "contentSlide", "coverSlide", "introSlide", "sectionSlide"] + + @field_validator('applied_on') + def applied_on_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['PDF', 'PPTX']): + raise ValueError("each list item must be one of ('PDF', 'PPTX')") + 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 DashboardSlidesTemplate 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_slide + if self.content_slide: + _dict['contentSlide'] = self.content_slide.to_dict() + # override the default output from pydantic by calling `to_dict()` of cover_slide + if self.cover_slide: + _dict['coverSlide'] = self.cover_slide.to_dict() + # override the default output from pydantic by calling `to_dict()` of intro_slide + if self.intro_slide: + _dict['introSlide'] = self.intro_slide.to_dict() + # override the default output from pydantic by calling `to_dict()` of section_slide + if self.section_slide: + _dict['sectionSlide'] = self.section_slide.to_dict() + # set to None if content_slide (nullable) is None + # and model_fields_set contains the field + if self.content_slide is None and "content_slide" in self.model_fields_set: + _dict['contentSlide'] = None + + # set to None if cover_slide (nullable) is None + # and model_fields_set contains the field + if self.cover_slide is None and "cover_slide" in self.model_fields_set: + _dict['coverSlide'] = None + + # set to None if intro_slide (nullable) is None + # and model_fields_set contains the field + if self.intro_slide is None and "intro_slide" in self.model_fields_set: + _dict['introSlide'] = None + + # set to None if section_slide (nullable) is None + # and model_fields_set contains the field + if self.section_slide is None and "section_slide" in self.model_fields_set: + _dict['sectionSlide'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DashboardSlidesTemplate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "appliedOn": obj.get("appliedOn"), + "contentSlide": ContentSlideTemplate.from_dict(obj["contentSlide"]) if obj.get("contentSlide") is not None else None, + "coverSlide": CoverSlideTemplate.from_dict(obj["coverSlide"]) if obj.get("coverSlide") is not None else None, + "introSlide": IntroSlideTemplate.from_dict(obj["introSlide"]) if obj.get("introSlide") is not None else None, + "sectionSlide": SectionSlideTemplate.from_dict(obj["sectionSlide"]) if obj.get("sectionSlide") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dashboard_tabular_export_request.py b/gooddata-api-client/gooddata_api_client/models/dashboard_tabular_export_request.py new file mode 100644 index 000000000..635af8d3e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dashboard_tabular_export_request.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.dashboard_export_settings import DashboardExportSettings +from gooddata_api_client.models.dashboard_filter import DashboardFilter +from typing import Optional, Set +from typing_extensions import Self + +class DashboardTabularExportRequest(BaseModel): + """ + Export request object describing the export properties for dashboard tabular exports. + """ # noqa: E501 + dashboard_filters_override: Optional[List[DashboardFilter]] = Field(default=None, description="List of filters that will be used instead of the default dashboard filters.", alias="dashboardFiltersOverride") + dashboard_tabs_filters_overrides: Optional[Dict[str, List[DashboardFilter]]] = Field(default=None, description="Map of tab-specific filter overrides. Key is tabId, value is list of filters for that tab.", alias="dashboardTabsFiltersOverrides") + file_name: StrictStr = Field(description="Filename of downloaded file without extension.", alias="fileName") + format: StrictStr = Field(description="Requested tabular export type.") + settings: Optional[DashboardExportSettings] = None + widget_ids: Optional[Annotated[List[StrictStr], Field(max_length=1)]] = Field(default=None, description="List of widget identifiers to be exported. Note that only one widget is currently supported.", alias="widgetIds") + __properties: ClassVar[List[str]] = ["dashboardFiltersOverride", "dashboardTabsFiltersOverrides", "fileName", "format", "settings", "widgetIds"] + + @field_validator('format') + def format_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['XLSX', 'PDF']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('XLSX', 'PDF')") + 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 DashboardTabularExportRequest 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 each item in dashboard_filters_override (list) + _items = [] + if self.dashboard_filters_override: + for _item_dashboard_filters_override in self.dashboard_filters_override: + if _item_dashboard_filters_override: + _items.append(_item_dashboard_filters_override.to_dict()) + _dict['dashboardFiltersOverride'] = _items + # override the default output from pydantic by calling `to_dict()` of each value in dashboard_tabs_filters_overrides (dict of array) + _field_dict_of_array = {} + if self.dashboard_tabs_filters_overrides: + for _key_dashboard_tabs_filters_overrides in self.dashboard_tabs_filters_overrides: + if self.dashboard_tabs_filters_overrides[_key_dashboard_tabs_filters_overrides] is not None: + _field_dict_of_array[_key_dashboard_tabs_filters_overrides] = [ + _item.to_dict() for _item in self.dashboard_tabs_filters_overrides[_key_dashboard_tabs_filters_overrides] + ] + _dict['dashboardTabsFiltersOverrides'] = _field_dict_of_array + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DashboardTabularExportRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dashboardFiltersOverride": [DashboardFilter.from_dict(_item) for _item in obj["dashboardFiltersOverride"]] if obj.get("dashboardFiltersOverride") is not None else None, + "dashboardTabsFiltersOverrides": dict( + (_k, + [DashboardFilter.from_dict(_item) for _item in _v] + if _v is not None + else None + ) + for _k, _v in obj.get("dashboardTabsFiltersOverrides", {}).items() + ), + "fileName": obj.get("fileName"), + "format": obj.get("format"), + "settings": DashboardExportSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None, + "widgetIds": obj.get("widgetIds") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dashboard_tabular_export_request_v2.py b/gooddata-api-client/gooddata_api_client/models/dashboard_tabular_export_request_v2.py new file mode 100644 index 000000000..5b5ed08ea --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dashboard_tabular_export_request_v2.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.dashboard_export_settings import DashboardExportSettings +from gooddata_api_client.models.dashboard_filter import DashboardFilter +from typing import Optional, Set +from typing_extensions import Self + +class DashboardTabularExportRequestV2(BaseModel): + """ + Export request object describing the export properties for dashboard tabular exports (v2 with dashboardId). + """ # noqa: E501 + dashboard_filters_override: Optional[List[DashboardFilter]] = Field(default=None, description="List of filters that will be used instead of the default dashboard filters.", alias="dashboardFiltersOverride") + dashboard_id: StrictStr = Field(description="Dashboard identifier", alias="dashboardId") + dashboard_tabs_filters_overrides: Optional[Dict[str, List[DashboardFilter]]] = Field(default=None, description="Map of tab-specific filter overrides. Key is tabId, value is list of filters for that tab.", alias="dashboardTabsFiltersOverrides") + file_name: StrictStr = Field(description="Filename of downloaded file without extension.", alias="fileName") + format: StrictStr = Field(description="Requested tabular export type.") + settings: Optional[DashboardExportSettings] = None + widget_ids: Optional[Annotated[List[StrictStr], Field(max_length=1)]] = Field(default=None, description="List of widget identifiers to be exported. Note that only one widget is currently supported.", alias="widgetIds") + __properties: ClassVar[List[str]] = ["dashboardFiltersOverride", "dashboardId", "dashboardTabsFiltersOverrides", "fileName", "format", "settings", "widgetIds"] + + @field_validator('format') + def format_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['XLSX', 'PDF']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('XLSX', 'PDF')") + 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 DashboardTabularExportRequestV2 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 each item in dashboard_filters_override (list) + _items = [] + if self.dashboard_filters_override: + for _item_dashboard_filters_override in self.dashboard_filters_override: + if _item_dashboard_filters_override: + _items.append(_item_dashboard_filters_override.to_dict()) + _dict['dashboardFiltersOverride'] = _items + # override the default output from pydantic by calling `to_dict()` of each value in dashboard_tabs_filters_overrides (dict of array) + _field_dict_of_array = {} + if self.dashboard_tabs_filters_overrides: + for _key_dashboard_tabs_filters_overrides in self.dashboard_tabs_filters_overrides: + if self.dashboard_tabs_filters_overrides[_key_dashboard_tabs_filters_overrides] is not None: + _field_dict_of_array[_key_dashboard_tabs_filters_overrides] = [ + _item.to_dict() for _item in self.dashboard_tabs_filters_overrides[_key_dashboard_tabs_filters_overrides] + ] + _dict['dashboardTabsFiltersOverrides'] = _field_dict_of_array + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DashboardTabularExportRequestV2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dashboardFiltersOverride": [DashboardFilter.from_dict(_item) for _item in obj["dashboardFiltersOverride"]] if obj.get("dashboardFiltersOverride") is not None else None, + "dashboardId": obj.get("dashboardId"), + "dashboardTabsFiltersOverrides": dict( + (_k, + [DashboardFilter.from_dict(_item) for _item in _v] + if _v is not None + else None + ) + for _k, _v in obj.get("dashboardTabsFiltersOverrides", {}).items() + ), + "fileName": obj.get("fileName"), + "format": obj.get("format"), + "settings": DashboardExportSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None, + "widgetIds": obj.get("widgetIds") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/data_column_locator.py b/gooddata-api-client/gooddata_api_client/models/data_column_locator.py new file mode 100644 index 000000000..a8cc5ac32 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/data_column_locator.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class DataColumnLocator(BaseModel): + """ + Mapping from dimension items (either 'localIdentifier' from 'AttributeItem', or \"measureGroup\") to their respective values. This effectively specifies the path (location) of the data column used for sorting. Therefore values for all dimension items must be specified. + """ # noqa: E501 + properties: Dict[str, StrictStr] = Field(description="Mapping from dimension items (either 'localIdentifier' from 'AttributeItem', or \"measureGroup\") to their respective values. This effectively specifies the path (location) of the data column used for sorting. Therefore values for all dimension items must be specified.") + __properties: ClassVar[List[str]] = ["properties"] + + 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 DataColumnLocator 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 DataColumnLocator from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "properties": obj.get("properties") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/data_column_locators.py b/gooddata-api-client/gooddata_api_client/models/data_column_locators.py new file mode 100644 index 000000000..76d186737 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/data_column_locators.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.data_column_locator import DataColumnLocator +from typing import Optional, Set +from typing_extensions import Self + +class DataColumnLocators(BaseModel): + """ + Data column locators for the values. + """ # noqa: E501 + properties: Optional[Dict[str, DataColumnLocator]] = Field(default=None, description="Mapping from dimensions to data column locators.") + __properties: ClassVar[List[str]] = ["properties"] + + 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 DataColumnLocators 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 each value in properties (dict) + _field_dict = {} + if self.properties: + for _key_properties in self.properties: + if self.properties[_key_properties]: + _field_dict[_key_properties] = self.properties[_key_properties].to_dict() + _dict['properties'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DataColumnLocators from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "properties": dict( + (_k, DataColumnLocator.from_dict(_v)) + for _k, _v in obj["properties"].items() + ) + if obj.get("properties") is not None + else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/data_source_parameter.py b/gooddata-api-client/gooddata_api_client/models/data_source_parameter.py new file mode 100644 index 000000000..3d52af1ab --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/data_source_parameter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class DataSourceParameter(BaseModel): + """ + A parameter for testing data source connection + """ # noqa: E501 + name: StrictStr = Field(description="Parameter name.") + value: StrictStr = Field(description="Parameter value.") + __properties: ClassVar[List[str]] = ["name", "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 DataSourceParameter 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 DataSourceParameter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "value": obj.get("value") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/data_source_permission_assignment.py b/gooddata-api-client/gooddata_api_client/models/data_source_permission_assignment.py new file mode 100644 index 000000000..da10bab46 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/data_source_permission_assignment.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.assignee_identifier import AssigneeIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DataSourcePermissionAssignment(BaseModel): + """ + Data source permission assignments + """ # noqa: E501 + assignee_identifier: AssigneeIdentifier = Field(alias="assigneeIdentifier") + permissions: List[StrictStr] + __properties: ClassVar[List[str]] = ["assigneeIdentifier", "permissions"] + + @field_validator('permissions') + def permissions_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['MANAGE', 'USE']): + raise ValueError("each list item must be one of ('MANAGE', 'USE')") + 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 DataSourcePermissionAssignment 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 assignee_identifier + if self.assignee_identifier: + _dict['assigneeIdentifier'] = self.assignee_identifier.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DataSourcePermissionAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assigneeIdentifier": AssigneeIdentifier.from_dict(obj["assigneeIdentifier"]) if obj.get("assigneeIdentifier") is not None else None, + "permissions": obj.get("permissions") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/data_source_schemata.py b/gooddata-api-client/gooddata_api_client/models/data_source_schemata.py new file mode 100644 index 000000000..1f731d682 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/data_source_schemata.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class DataSourceSchemata(BaseModel): + """ + Result of getSchemata. Contains list of available DB schema names. + """ # noqa: E501 + schema_names: List[StrictStr] = Field(alias="schemaNames") + __properties: ClassVar[List[str]] = ["schemaNames"] + + 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 DataSourceSchemata 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 DataSourceSchemata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "schemaNames": obj.get("schemaNames") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/data_source_table_identifier.py b/gooddata-api-client/gooddata_api_client/models/data_source_table_identifier.py new file mode 100644 index 000000000..53145cc7e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/data_source_table_identifier.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 DataSourceTableIdentifier(BaseModel): + """ + An id of the table. Including ID of data source. + """ # noqa: E501 + data_source_id: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Data source ID.", alias="dataSourceId") + id: Annotated[str, Field(strict=True)] = Field(description="ID of table.") + path: Optional[List[StrictStr]] = Field(default=None, description="Path to table.") + type: StrictStr = Field(description="Data source entity type.") + __properties: ClassVar[List[str]] = ["dataSourceId", "id", "path", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dataSource']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dataSource')") + 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 DataSourceTableIdentifier 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 path (nullable) is None + # and model_fields_set contains the field + if self.path is None and "path" in self.model_fields_set: + _dict['path'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DataSourceTableIdentifier from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataSourceId": obj.get("dataSourceId"), + "id": obj.get("id"), + "path": obj.get("path"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/database_instance.py b/gooddata-api-client/gooddata_api_client/models/database_instance.py new file mode 100644 index 000000000..c56043ebe --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/database_instance.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class DatabaseInstance(BaseModel): + """ + A single AI Lake Database instance + """ # noqa: E501 + id: StrictStr = Field(description="Id of the AI Lake Database instance") + name: StrictStr = Field(description="Name of the AI Lake Database instance") + storage_ids: List[StrictStr] = Field(description="Set of ids of the storage instances this database instance should access.", alias="storageIds") + __properties: ClassVar[List[str]] = ["id", "name", "storageIds"] + + 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 DatabaseInstance 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 DatabaseInstance 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"), + "storageIds": obj.get("storageIds") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dataset_grain.py b/gooddata-api-client/gooddata_api_client/models/dataset_grain.py new file mode 100644 index 000000000..f3d29802a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dataset_grain.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 DatasetGrain(BaseModel): + """ + DatasetGrain + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attribute', 'date']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attribute', 'date')") + 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 DatasetGrain 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 DatasetGrain 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dataset_reference_identifier.py b/gooddata-api-client/gooddata_api_client/models/dataset_reference_identifier.py new file mode 100644 index 000000000..b3ab83ae0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dataset_reference_identifier.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 DatasetReferenceIdentifier(BaseModel): + """ + DatasetReferenceIdentifier + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dataset']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dataset')") + 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 DatasetReferenceIdentifier 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 DatasetReferenceIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dataset_workspace_data_filter_identifier.py b/gooddata-api-client/gooddata_api_client/models/dataset_workspace_data_filter_identifier.py new file mode 100644 index 000000000..c99f50586 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dataset_workspace_data_filter_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DatasetWorkspaceDataFilterIdentifier(BaseModel): + """ + Identifier of a workspace data filter. + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="Workspace Data Filters ID.") + type: StrictStr = Field(description="Filter type.") + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceDataFilter']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceDataFilter')") + 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 DatasetWorkspaceDataFilterIdentifier 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 DatasetWorkspaceDataFilterIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/date_absolute_filter.py b/gooddata-api-client/gooddata_api_client/models/date_absolute_filter.py new file mode 100644 index 000000000..64a6a31c5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/date_absolute_filter.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class DateAbsoluteFilter(BaseModel): + """ + DateAbsoluteFilter + """ # noqa: E501 + var_from: StrictStr = Field(alias="from") + to: StrictStr + using: StrictStr + __properties: ClassVar[List[str]] = ["from", "to", "using"] + + 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 DateAbsoluteFilter 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 DateAbsoluteFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "from": obj.get("from"), + "to": obj.get("to"), + "using": obj.get("using") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/date_filter.py b/gooddata-api-client/gooddata_api_client/models/date_filter.py new file mode 100644 index 000000000..12e8244ed --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/date_filter.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.absolute_date_filter import AbsoluteDateFilter +from gooddata_api_client.models.all_time_date_filter import AllTimeDateFilter +from gooddata_api_client.models.relative_date_filter import RelativeDateFilter +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DATEFILTER_ONE_OF_SCHEMAS = ["AbsoluteDateFilter", "AllTimeDateFilter", "RelativeDateFilter"] + +class DateFilter(BaseModel): + """ + Abstract filter definition type for dates. + """ + # data type: AbsoluteDateFilter + oneof_schema_1_validator: Optional[AbsoluteDateFilter] = None + # data type: RelativeDateFilter + oneof_schema_2_validator: Optional[RelativeDateFilter] = None + # data type: AllTimeDateFilter + oneof_schema_3_validator: Optional[AllTimeDateFilter] = None + actual_instance: Optional[Union[AbsoluteDateFilter, AllTimeDateFilter, RelativeDateFilter]] = None + one_of_schemas: Set[str] = { "AbsoluteDateFilter", "AllTimeDateFilter", "RelativeDateFilter" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = DateFilter.model_construct() + error_messages = [] + match = 0 + # validate data type: AbsoluteDateFilter + if not isinstance(v, AbsoluteDateFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `AbsoluteDateFilter`") + else: + match += 1 + # validate data type: RelativeDateFilter + if not isinstance(v, RelativeDateFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `RelativeDateFilter`") + else: + match += 1 + # validate data type: AllTimeDateFilter + if not isinstance(v, AllTimeDateFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `AllTimeDateFilter`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DateFilter with oneOf schemas: AbsoluteDateFilter, AllTimeDateFilter, RelativeDateFilter. 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 + + # deserialize data into AbsoluteDateFilter + try: + if match == 0: + instance.actual_instance = AbsoluteDateFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RelativeDateFilter + try: + if match == 0: + instance.actual_instance = RelativeDateFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AllTimeDateFilter + try: + if match == 0: + instance.actual_instance = AllTimeDateFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DateFilter with oneOf schemas: AbsoluteDateFilter, AllTimeDateFilter, RelativeDateFilter. 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], AbsoluteDateFilter, AllTimeDateFilter, RelativeDateFilter]]: + """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/gooddata-api-client/gooddata_api_client/models/date_relative_filter.py b/gooddata-api-client/gooddata_api_client/models/date_relative_filter.py new file mode 100644 index 000000000..2a2913d4e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/date_relative_filter.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class DateRelativeFilter(BaseModel): + """ + DateRelativeFilter + """ # noqa: E501 + var_from: StrictInt = Field(alias="from") + granularity: StrictStr + to: StrictInt + using: StrictStr + __properties: ClassVar[List[str]] = ["from", "granularity", "to", "using"] + + @field_validator('granularity') + def granularity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR')") + 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 DateRelativeFilter 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 DateRelativeFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "from": obj.get("from"), + "granularity": obj.get("granularity"), + "to": obj.get("to"), + "using": obj.get("using") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/date_value.py b/gooddata-api-client/gooddata_api_client/models/date_value.py new file mode 100644 index 000000000..8656a04dc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/date_value.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class DateValue(BaseModel): + """ + DateValue + """ # noqa: E501 + value: StrictStr + __properties: ClassVar[List[str]] = ["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 DateValue 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 DateValue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "value": obj.get("value") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_aggregated_fact.py b/gooddata-api-client/gooddata_api_client/models/declarative_aggregated_fact.py new file mode 100644 index 000000000..826e87249 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_aggregated_fact.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.declarative_source_fact_reference import DeclarativeSourceFactReference +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeAggregatedFact(BaseModel): + """ + A dataset fact. + """ # noqa: E501 + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Fact description.") + id: Annotated[str, Field(strict=True)] = Field(description="Fact ID.") + is_nullable: Optional[StrictBool] = Field(default=None, description="Flag indicating whether the associated source column allows null values.", alias="isNullable") + null_value: Optional[StrictStr] = Field(default=None, description="Value used in coalesce during joins instead of null.", alias="nullValue") + source_column: Annotated[str, Field(strict=True, max_length=255)] = Field(description="A name of the source column in the table.", alias="sourceColumn") + source_column_data_type: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="A type of the source column", alias="sourceColumnDataType") + source_fact_reference: DeclarativeSourceFactReference = Field(alias="sourceFactReference") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + __properties: ClassVar[List[str]] = ["description", "id", "isNullable", "nullValue", "sourceColumn", "sourceColumnDataType", "sourceFactReference", "tags"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('source_column_data_type') + def source_column_data_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 DeclarativeAggregatedFact 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 source_fact_reference + if self.source_fact_reference: + _dict['sourceFactReference'] = self.source_fact_reference.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeAggregatedFact from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "id": obj.get("id"), + "isNullable": obj.get("isNullable"), + "nullValue": obj.get("nullValue"), + "sourceColumn": obj.get("sourceColumn"), + "sourceColumnDataType": obj.get("sourceColumnDataType"), + "sourceFactReference": DeclarativeSourceFactReference.from_dict(obj["sourceFactReference"]) if obj.get("sourceFactReference") is not None else None, + "tags": obj.get("tags") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard.py b/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard.py new file mode 100644 index 000000000..5acd0d38c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard.py @@ -0,0 +1,214 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.declarative_analytical_dashboard_permissions_inner import DeclarativeAnalyticalDashboardPermissionsInner +from gooddata_api_client.models.declarative_user_identifier import DeclarativeUserIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeAnalyticalDashboard(BaseModel): + """ + DeclarativeAnalyticalDashboard + """ # noqa: E501 + certification: Optional[StrictStr] = Field(default=None, description="Certification status of the entity.") + certification_message: Optional[StrictStr] = Field(default=None, description="Optional message associated with the certification.", alias="certificationMessage") + certified_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time when the certification was set.", alias="certifiedAt") + certified_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="certifiedBy") + content: Optional[Dict[str, Any]] = Field(description="Free-form JSON object") + created_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + created_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="createdBy") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Analytical dashboard description.") + id: Annotated[str, Field(strict=True)] = Field(description="Analytical dashboard ID.") + modified_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + modified_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="modifiedBy") + permissions: Optional[List[DeclarativeAnalyticalDashboardPermissionsInner]] = Field(default=None, description="A list of permissions.") + summary: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="AI-generated summary of the dashboard content") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Analytical dashboard title.") + __properties: ClassVar[List[str]] = ["certification", "certificationMessage", "certifiedAt", "certifiedBy", "content", "createdAt", "createdBy", "description", "id", "modifiedAt", "modifiedBy", "permissions", "summary", "tags", "title"] + + @field_validator('certification') + def certification_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['CERTIFIED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('CERTIFIED')") + return value + + @field_validator('certified_at') + def certified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + 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 DeclarativeAnalyticalDashboard 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 certified_by + if self.certified_by: + _dict['certifiedBy'] = self.certified_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + # set to None if certification_message (nullable) is None + # and model_fields_set contains the field + if self.certification_message is None and "certification_message" in self.model_fields_set: + _dict['certificationMessage'] = None + + # set to None if certified_at (nullable) is None + # and model_fields_set contains the field + if self.certified_at is None and "certified_at" in self.model_fields_set: + _dict['certifiedAt'] = None + + # set to None if content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeAnalyticalDashboard from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "certification": obj.get("certification"), + "certificationMessage": obj.get("certificationMessage"), + "certifiedAt": obj.get("certifiedAt"), + "certifiedBy": DeclarativeUserIdentifier.from_dict(obj["certifiedBy"]) if obj.get("certifiedBy") is not None else None, + "content": obj.get("content"), + "createdAt": obj.get("createdAt"), + "createdBy": DeclarativeUserIdentifier.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "description": obj.get("description"), + "id": obj.get("id"), + "modifiedAt": obj.get("modifiedAt"), + "modifiedBy": DeclarativeUserIdentifier.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None, + "permissions": [DeclarativeAnalyticalDashboardPermissionsInner.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None, + "summary": obj.get("summary"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_extension.py b/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_extension.py new file mode 100644 index 000000000..f72296f59 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_extension.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from gooddata_api_client.models.declarative_analytical_dashboard_permissions_inner import DeclarativeAnalyticalDashboardPermissionsInner +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeAnalyticalDashboardExtension(BaseModel): + """ + DeclarativeAnalyticalDashboardExtension + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="Analytical dashboard ID.") + permissions: List[DeclarativeAnalyticalDashboardPermissionsInner] = Field(description="A list of permissions.") + __properties: ClassVar[List[str]] = ["id", "permissions"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeAnalyticalDashboardExtension 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 each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeAnalyticalDashboardExtension 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"), + "permissions": [DeclarativeAnalyticalDashboardPermissionsInner.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_identifier.py b/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_identifier.py new file mode 100644 index 000000000..20c544345 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeAnalyticalDashboardIdentifier(BaseModel): + """ + An analytical dashboard identifier. + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="Identifier of the analytical dashboard.") + type: StrictStr = Field(description="A type.") + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['analyticalDashboard']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('analyticalDashboard')") + 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 DeclarativeAnalyticalDashboardIdentifier 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 DeclarativeAnalyticalDashboardIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permission_assignment.py b/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permission_assignment.py new file mode 100644 index 000000000..df3d0b48d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permission_assignment.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeAnalyticalDashboardPermissionAssignment(BaseModel): + """ + Analytical dashboard permission. + """ # noqa: E501 + name: StrictStr = Field(description="Permission name.") + __properties: ClassVar[List[str]] = ["name"] + + @field_validator('name') + def name_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['EDIT', 'SHARE', 'VIEW']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('EDIT', 'SHARE', 'VIEW')") + 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 DeclarativeAnalyticalDashboardPermissionAssignment 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 DeclarativeAnalyticalDashboardPermissionAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permission_for_assignee.py b/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permission_for_assignee.py new file mode 100644 index 000000000..69ed80eb9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permission_for_assignee.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.assignee_identifier import AssigneeIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeAnalyticalDashboardPermissionForAssignee(BaseModel): + """ + Analytical dashboard permission for an assignee. + """ # noqa: E501 + name: StrictStr = Field(description="Permission name.") + assignee: AssigneeIdentifier + __properties: ClassVar[List[str]] = ["name", "assignee"] + + @field_validator('name') + def name_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['EDIT', 'SHARE', 'VIEW']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('EDIT', 'SHARE', 'VIEW')") + 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 DeclarativeAnalyticalDashboardPermissionForAssignee 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 assignee + if self.assignee: + _dict['assignee'] = self.assignee.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeAnalyticalDashboardPermissionForAssignee from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "assignee": AssigneeIdentifier.from_dict(obj["assignee"]) if obj.get("assignee") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permission_for_assignee_rule.py b/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permission_for_assignee_rule.py new file mode 100644 index 000000000..a5e32fd22 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permission_for_assignee_rule.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.assignee_rule import AssigneeRule +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeAnalyticalDashboardPermissionForAssigneeRule(BaseModel): + """ + Analytical dashboard permission for a collection of assignees identified by a rule. + """ # noqa: E501 + name: StrictStr = Field(description="Permission name.") + assignee_rule: AssigneeRule = Field(alias="assigneeRule") + __properties: ClassVar[List[str]] = ["name", "assigneeRule"] + + @field_validator('name') + def name_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['EDIT', 'SHARE', 'VIEW']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('EDIT', 'SHARE', 'VIEW')") + 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 DeclarativeAnalyticalDashboardPermissionForAssigneeRule 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 assignee_rule + if self.assignee_rule: + _dict['assigneeRule'] = self.assignee_rule.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeAnalyticalDashboardPermissionForAssigneeRule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "assigneeRule": AssigneeRule.from_dict(obj["assigneeRule"]) if obj.get("assigneeRule") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permissions_inner.py b/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permissions_inner.py new file mode 100644 index 000000000..659d428d1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_analytical_dashboard_permissions_inner.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.declarative_analytical_dashboard_permission_for_assignee import DeclarativeAnalyticalDashboardPermissionForAssignee +from gooddata_api_client.models.declarative_analytical_dashboard_permission_for_assignee_rule import DeclarativeAnalyticalDashboardPermissionForAssigneeRule +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DECLARATIVEANALYTICALDASHBOARDPERMISSIONSINNER_ONE_OF_SCHEMAS = ["DeclarativeAnalyticalDashboardPermissionForAssignee", "DeclarativeAnalyticalDashboardPermissionForAssigneeRule"] + +class DeclarativeAnalyticalDashboardPermissionsInner(BaseModel): + """ + DeclarativeAnalyticalDashboardPermissionsInner + """ + # data type: DeclarativeAnalyticalDashboardPermissionForAssignee + oneof_schema_1_validator: Optional[DeclarativeAnalyticalDashboardPermissionForAssignee] = None + # data type: DeclarativeAnalyticalDashboardPermissionForAssigneeRule + oneof_schema_2_validator: Optional[DeclarativeAnalyticalDashboardPermissionForAssigneeRule] = None + actual_instance: Optional[Union[DeclarativeAnalyticalDashboardPermissionForAssignee, DeclarativeAnalyticalDashboardPermissionForAssigneeRule]] = None + one_of_schemas: Set[str] = { "DeclarativeAnalyticalDashboardPermissionForAssignee", "DeclarativeAnalyticalDashboardPermissionForAssigneeRule" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = DeclarativeAnalyticalDashboardPermissionsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: DeclarativeAnalyticalDashboardPermissionForAssignee + if not isinstance(v, DeclarativeAnalyticalDashboardPermissionForAssignee): + error_messages.append(f"Error! Input type `{type(v)}` is not `DeclarativeAnalyticalDashboardPermissionForAssignee`") + else: + match += 1 + # validate data type: DeclarativeAnalyticalDashboardPermissionForAssigneeRule + if not isinstance(v, DeclarativeAnalyticalDashboardPermissionForAssigneeRule): + error_messages.append(f"Error! Input type `{type(v)}` is not `DeclarativeAnalyticalDashboardPermissionForAssigneeRule`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DeclarativeAnalyticalDashboardPermissionsInner with oneOf schemas: DeclarativeAnalyticalDashboardPermissionForAssignee, DeclarativeAnalyticalDashboardPermissionForAssigneeRule. 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 + + # deserialize data into DeclarativeAnalyticalDashboardPermissionForAssignee + try: + if match == 0: + instance.actual_instance = DeclarativeAnalyticalDashboardPermissionForAssignee.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DeclarativeAnalyticalDashboardPermissionForAssigneeRule + try: + if match == 0: + instance.actual_instance = DeclarativeAnalyticalDashboardPermissionForAssigneeRule.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DeclarativeAnalyticalDashboardPermissionsInner with oneOf schemas: DeclarativeAnalyticalDashboardPermissionForAssignee, DeclarativeAnalyticalDashboardPermissionForAssigneeRule. 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], DeclarativeAnalyticalDashboardPermissionForAssignee, DeclarativeAnalyticalDashboardPermissionForAssigneeRule]]: + """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/gooddata-api-client/gooddata_api_client/models/declarative_analytics.py b/gooddata-api-client/gooddata_api_client/models/declarative_analytics.py new file mode 100644 index 000000000..52cc9cae5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_analytics.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.declarative_analytics_layer import DeclarativeAnalyticsLayer +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeAnalytics(BaseModel): + """ + Entities describing users' view on data. + """ # noqa: E501 + analytics: Optional[DeclarativeAnalyticsLayer] = None + __properties: ClassVar[List[str]] = ["analytics"] + + 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 DeclarativeAnalytics 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 analytics + if self.analytics: + _dict['analytics'] = self.analytics.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeAnalytics from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analytics": DeclarativeAnalyticsLayer.from_dict(obj["analytics"]) if obj.get("analytics") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_analytics_layer.py b/gooddata-api-client/gooddata_api_client/models/declarative_analytics_layer.py new file mode 100644 index 000000000..1bbe5ced2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_analytics_layer.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.declarative_analytical_dashboard import DeclarativeAnalyticalDashboard +from gooddata_api_client.models.declarative_analytical_dashboard_extension import DeclarativeAnalyticalDashboardExtension +from gooddata_api_client.models.declarative_attribute_hierarchy import DeclarativeAttributeHierarchy +from gooddata_api_client.models.declarative_dashboard_plugin import DeclarativeDashboardPlugin +from gooddata_api_client.models.declarative_export_definition import DeclarativeExportDefinition +from gooddata_api_client.models.declarative_filter_context import DeclarativeFilterContext +from gooddata_api_client.models.declarative_memory_item import DeclarativeMemoryItem +from gooddata_api_client.models.declarative_metric import DeclarativeMetric +from gooddata_api_client.models.declarative_visualization_object import DeclarativeVisualizationObject +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeAnalyticsLayer(BaseModel): + """ + DeclarativeAnalyticsLayer + """ # noqa: E501 + analytical_dashboard_extensions: Optional[List[DeclarativeAnalyticalDashboardExtension]] = Field(default=None, description="A list of dashboard permissions assigned to a related dashboard.", alias="analyticalDashboardExtensions") + analytical_dashboards: Optional[List[DeclarativeAnalyticalDashboard]] = Field(default=None, description="A list of analytical dashboards available in the model.", alias="analyticalDashboards") + attribute_hierarchies: Optional[List[DeclarativeAttributeHierarchy]] = Field(default=None, description="A list of attribute hierarchies.", alias="attributeHierarchies") + dashboard_plugins: Optional[List[DeclarativeDashboardPlugin]] = Field(default=None, description="A list of dashboard plugins available in the model.", alias="dashboardPlugins") + export_definitions: Optional[List[DeclarativeExportDefinition]] = Field(default=None, description="A list of export definitions.", alias="exportDefinitions") + filter_contexts: Optional[List[DeclarativeFilterContext]] = Field(default=None, description="A list of filter contexts available in the model.", alias="filterContexts") + memory_items: Optional[List[DeclarativeMemoryItem]] = Field(default=None, description="A list of AI memory items available in the workspace.", alias="memoryItems") + metrics: Optional[List[DeclarativeMetric]] = Field(default=None, description="A list of metrics available in the model.") + visualization_objects: Optional[List[DeclarativeVisualizationObject]] = Field(default=None, description="A list of visualization objects available in the model.", alias="visualizationObjects") + __properties: ClassVar[List[str]] = ["analyticalDashboardExtensions", "analyticalDashboards", "attributeHierarchies", "dashboardPlugins", "exportDefinitions", "filterContexts", "memoryItems", "metrics", "visualizationObjects"] + + 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 DeclarativeAnalyticsLayer 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 each item in analytical_dashboard_extensions (list) + _items = [] + if self.analytical_dashboard_extensions: + for _item_analytical_dashboard_extensions in self.analytical_dashboard_extensions: + if _item_analytical_dashboard_extensions: + _items.append(_item_analytical_dashboard_extensions.to_dict()) + _dict['analyticalDashboardExtensions'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in analytical_dashboards (list) + _items = [] + if self.analytical_dashboards: + for _item_analytical_dashboards in self.analytical_dashboards: + if _item_analytical_dashboards: + _items.append(_item_analytical_dashboards.to_dict()) + _dict['analyticalDashboards'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attribute_hierarchies (list) + _items = [] + if self.attribute_hierarchies: + for _item_attribute_hierarchies in self.attribute_hierarchies: + if _item_attribute_hierarchies: + _items.append(_item_attribute_hierarchies.to_dict()) + _dict['attributeHierarchies'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in dashboard_plugins (list) + _items = [] + if self.dashboard_plugins: + for _item_dashboard_plugins in self.dashboard_plugins: + if _item_dashboard_plugins: + _items.append(_item_dashboard_plugins.to_dict()) + _dict['dashboardPlugins'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in export_definitions (list) + _items = [] + if self.export_definitions: + for _item_export_definitions in self.export_definitions: + if _item_export_definitions: + _items.append(_item_export_definitions.to_dict()) + _dict['exportDefinitions'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in filter_contexts (list) + _items = [] + if self.filter_contexts: + for _item_filter_contexts in self.filter_contexts: + if _item_filter_contexts: + _items.append(_item_filter_contexts.to_dict()) + _dict['filterContexts'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in memory_items (list) + _items = [] + if self.memory_items: + for _item_memory_items in self.memory_items: + if _item_memory_items: + _items.append(_item_memory_items.to_dict()) + _dict['memoryItems'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in metrics (list) + _items = [] + if self.metrics: + for _item_metrics in self.metrics: + if _item_metrics: + _items.append(_item_metrics.to_dict()) + _dict['metrics'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in visualization_objects (list) + _items = [] + if self.visualization_objects: + for _item_visualization_objects in self.visualization_objects: + if _item_visualization_objects: + _items.append(_item_visualization_objects.to_dict()) + _dict['visualizationObjects'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeAnalyticsLayer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyticalDashboardExtensions": [DeclarativeAnalyticalDashboardExtension.from_dict(_item) for _item in obj["analyticalDashboardExtensions"]] if obj.get("analyticalDashboardExtensions") is not None else None, + "analyticalDashboards": [DeclarativeAnalyticalDashboard.from_dict(_item) for _item in obj["analyticalDashboards"]] if obj.get("analyticalDashboards") is not None else None, + "attributeHierarchies": [DeclarativeAttributeHierarchy.from_dict(_item) for _item in obj["attributeHierarchies"]] if obj.get("attributeHierarchies") is not None else None, + "dashboardPlugins": [DeclarativeDashboardPlugin.from_dict(_item) for _item in obj["dashboardPlugins"]] if obj.get("dashboardPlugins") is not None else None, + "exportDefinitions": [DeclarativeExportDefinition.from_dict(_item) for _item in obj["exportDefinitions"]] if obj.get("exportDefinitions") is not None else None, + "filterContexts": [DeclarativeFilterContext.from_dict(_item) for _item in obj["filterContexts"]] if obj.get("filterContexts") is not None else None, + "memoryItems": [DeclarativeMemoryItem.from_dict(_item) for _item in obj["memoryItems"]] if obj.get("memoryItems") is not None else None, + "metrics": [DeclarativeMetric.from_dict(_item) for _item in obj["metrics"]] if obj.get("metrics") is not None else None, + "visualizationObjects": [DeclarativeVisualizationObject.from_dict(_item) for _item in obj["visualizationObjects"]] if obj.get("visualizationObjects") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_attribute.py b/gooddata-api-client/gooddata_api_client/models/declarative_attribute.py new file mode 100644 index 000000000..908621d64 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_attribute.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.declarative_label import DeclarativeLabel +from gooddata_api_client.models.label_identifier import LabelIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeAttribute(BaseModel): + """ + A dataset attribute. + """ # noqa: E501 + default_view: Optional[LabelIdentifier] = Field(default=None, alias="defaultView") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Attribute description.") + id: Annotated[str, Field(strict=True)] = Field(description="Attribute ID.") + is_hidden: Optional[StrictBool] = Field(default=None, description="If true, this attribute is hidden from AI search results.", alias="isHidden") + is_nullable: Optional[StrictBool] = Field(default=None, description="Flag indicating whether the associated source column allows null values.", alias="isNullable") + labels: List[DeclarativeLabel] = Field(description="An array of attribute labels.") + locale: Optional[StrictStr] = Field(default=None, description="Default locale for primary label.") + null_value: Optional[StrictStr] = Field(default=None, description="Value used in coalesce during joins instead of null.", alias="nullValue") + sort_column: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Attribute sort column.", alias="sortColumn") + sort_direction: Optional[StrictStr] = Field(default=None, description="Attribute sort direction.", alias="sortDirection") + source_column: Annotated[str, Field(strict=True, max_length=255)] = Field(description="A name of the source column that is the primary label", alias="sourceColumn") + source_column_data_type: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="A type of the source column", alias="sourceColumnDataType") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Attribute title.") + __properties: ClassVar[List[str]] = ["defaultView", "description", "id", "isHidden", "isNullable", "labels", "locale", "nullValue", "sortColumn", "sortDirection", "sourceColumn", "sourceColumnDataType", "tags", "title"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('sort_direction') + def sort_direction_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ASC', 'DESC']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ASC', 'DESC')") + return value + + @field_validator('source_column_data_type') + def source_column_data_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 DeclarativeAttribute 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 default_view + if self.default_view: + _dict['defaultView'] = self.default_view.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item_labels in self.labels: + if _item_labels: + _items.append(_item_labels.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeAttribute from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "defaultView": LabelIdentifier.from_dict(obj["defaultView"]) if obj.get("defaultView") is not None else None, + "description": obj.get("description"), + "id": obj.get("id"), + "isHidden": obj.get("isHidden"), + "isNullable": obj.get("isNullable"), + "labels": [DeclarativeLabel.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "locale": obj.get("locale"), + "nullValue": obj.get("nullValue"), + "sortColumn": obj.get("sortColumn"), + "sortDirection": obj.get("sortDirection"), + "sourceColumn": obj.get("sourceColumn"), + "sourceColumnDataType": obj.get("sourceColumnDataType"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_attribute_hierarchy.py b/gooddata-api-client/gooddata_api_client/models/declarative_attribute_hierarchy.py new file mode 100644 index 000000000..016ca7772 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_attribute_hierarchy.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.declarative_user_identifier import DeclarativeUserIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeAttributeHierarchy(BaseModel): + """ + DeclarativeAttributeHierarchy + """ # noqa: E501 + content: Optional[Dict[str, Any]] = Field(description="Free-form JSON object") + created_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + created_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="createdBy") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Attribute hierarchy object description.") + id: Annotated[str, Field(strict=True)] = Field(description="Attribute hierarchy object ID.") + modified_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + modified_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="modifiedBy") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Attribute hierarchy object title.") + __properties: ClassVar[List[str]] = ["content", "createdAt", "createdBy", "description", "id", "modifiedAt", "modifiedBy", "tags", "title"] + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + 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 DeclarativeAttributeHierarchy 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 created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + # set to None if content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeAttributeHierarchy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "createdAt": obj.get("createdAt"), + "createdBy": DeclarativeUserIdentifier.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "description": obj.get("description"), + "id": obj.get("id"), + "modifiedAt": obj.get("modifiedAt"), + "modifiedBy": DeclarativeUserIdentifier.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None, + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_automation.py b/gooddata-api-client/gooddata_api_client/models/declarative_automation.py new file mode 100644 index 000000000..1dec515bc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_automation.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.automation_alert import AutomationAlert +from gooddata_api_client.models.automation_dashboard_tabular_export import AutomationDashboardTabularExport +from gooddata_api_client.models.automation_external_recipient import AutomationExternalRecipient +from gooddata_api_client.models.automation_image_export import AutomationImageExport +from gooddata_api_client.models.automation_metadata import AutomationMetadata +from gooddata_api_client.models.automation_raw_export import AutomationRawExport +from gooddata_api_client.models.automation_schedule import AutomationSchedule +from gooddata_api_client.models.automation_slides_export import AutomationSlidesExport +from gooddata_api_client.models.automation_tabular_export import AutomationTabularExport +from gooddata_api_client.models.automation_visual_export import AutomationVisualExport +from gooddata_api_client.models.declarative_analytical_dashboard_identifier import DeclarativeAnalyticalDashboardIdentifier +from gooddata_api_client.models.declarative_export_definition_identifier import DeclarativeExportDefinitionIdentifier +from gooddata_api_client.models.declarative_notification_channel_identifier import DeclarativeNotificationChannelIdentifier +from gooddata_api_client.models.declarative_user_identifier import DeclarativeUserIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeAutomation(BaseModel): + """ + DeclarativeAutomation + """ # noqa: E501 + alert: Optional[AutomationAlert] = None + analytical_dashboard: Optional[DeclarativeAnalyticalDashboardIdentifier] = Field(default=None, alias="analyticalDashboard") + created_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + created_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="createdBy") + dashboard_tabular_exports: Optional[List[AutomationDashboardTabularExport]] = Field(default=None, alias="dashboardTabularExports") + description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + details: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=10000)]]] = Field(default=None, description="TODO") + evaluation_mode: Optional[StrictStr] = Field(default='PER_RECIPIENT', description="Specify automation evaluation mode.", alias="evaluationMode") + export_definitions: Optional[List[DeclarativeExportDefinitionIdentifier]] = Field(default=None, alias="exportDefinitions") + external_recipients: Optional[List[AutomationExternalRecipient]] = Field(default=None, description="External recipients of the automation action results.", alias="externalRecipients") + id: Annotated[str, Field(strict=True)] + image_exports: Optional[List[AutomationImageExport]] = Field(default=None, alias="imageExports") + metadata: Optional[AutomationMetadata] = None + modified_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + modified_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="modifiedBy") + notification_channel: Optional[DeclarativeNotificationChannelIdentifier] = Field(default=None, alias="notificationChannel") + raw_exports: Optional[List[AutomationRawExport]] = Field(default=None, alias="rawExports") + recipients: Optional[List[DeclarativeUserIdentifier]] = None + schedule: Optional[AutomationSchedule] = None + slides_exports: Optional[List[AutomationSlidesExport]] = Field(default=None, alias="slidesExports") + state: Optional[StrictStr] = Field(default='ACTIVE', description="Current state of the automation.") + tabular_exports: Optional[List[AutomationTabularExport]] = Field(default=None, alias="tabularExports") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + visual_exports: Optional[List[AutomationVisualExport]] = Field(default=None, alias="visualExports") + __properties: ClassVar[List[str]] = ["alert", "analyticalDashboard", "createdAt", "createdBy", "dashboardTabularExports", "description", "details", "evaluationMode", "exportDefinitions", "externalRecipients", "id", "imageExports", "metadata", "modifiedAt", "modifiedBy", "notificationChannel", "rawExports", "recipients", "schedule", "slidesExports", "state", "tabularExports", "tags", "title", "visualExports"] + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('evaluation_mode') + def evaluation_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['SHARED', 'PER_RECIPIENT']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SHARED', 'PER_RECIPIENT')") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ACTIVE', 'PAUSED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ACTIVE', 'PAUSED')") + 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 DeclarativeAutomation 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 alert + if self.alert: + _dict['alert'] = self.alert.to_dict() + # override the default output from pydantic by calling `to_dict()` of analytical_dashboard + if self.analytical_dashboard: + _dict['analyticalDashboard'] = self.analytical_dashboard.to_dict() + # override the default output from pydantic by calling `to_dict()` of created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in dashboard_tabular_exports (list) + _items = [] + if self.dashboard_tabular_exports: + for _item_dashboard_tabular_exports in self.dashboard_tabular_exports: + if _item_dashboard_tabular_exports: + _items.append(_item_dashboard_tabular_exports.to_dict()) + _dict['dashboardTabularExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in export_definitions (list) + _items = [] + if self.export_definitions: + for _item_export_definitions in self.export_definitions: + if _item_export_definitions: + _items.append(_item_export_definitions.to_dict()) + _dict['exportDefinitions'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in external_recipients (list) + _items = [] + if self.external_recipients: + for _item_external_recipients in self.external_recipients: + if _item_external_recipients: + _items.append(_item_external_recipients.to_dict()) + _dict['externalRecipients'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in image_exports (list) + _items = [] + if self.image_exports: + for _item_image_exports in self.image_exports: + if _item_image_exports: + _items.append(_item_image_exports.to_dict()) + _dict['imageExports'] = _items + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of notification_channel + if self.notification_channel: + _dict['notificationChannel'] = self.notification_channel.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in raw_exports (list) + _items = [] + if self.raw_exports: + for _item_raw_exports in self.raw_exports: + if _item_raw_exports: + _items.append(_item_raw_exports.to_dict()) + _dict['rawExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in recipients (list) + _items = [] + if self.recipients: + for _item_recipients in self.recipients: + if _item_recipients: + _items.append(_item_recipients.to_dict()) + _dict['recipients'] = _items + # override the default output from pydantic by calling `to_dict()` of schedule + if self.schedule: + _dict['schedule'] = self.schedule.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in slides_exports (list) + _items = [] + if self.slides_exports: + for _item_slides_exports in self.slides_exports: + if _item_slides_exports: + _items.append(_item_slides_exports.to_dict()) + _dict['slidesExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in tabular_exports (list) + _items = [] + if self.tabular_exports: + for _item_tabular_exports in self.tabular_exports: + if _item_tabular_exports: + _items.append(_item_tabular_exports.to_dict()) + _dict['tabularExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in visual_exports (list) + _items = [] + if self.visual_exports: + for _item_visual_exports in self.visual_exports: + if _item_visual_exports: + _items.append(_item_visual_exports.to_dict()) + _dict['visualExports'] = _items + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeAutomation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alert": AutomationAlert.from_dict(obj["alert"]) if obj.get("alert") is not None else None, + "analyticalDashboard": DeclarativeAnalyticalDashboardIdentifier.from_dict(obj["analyticalDashboard"]) if obj.get("analyticalDashboard") is not None else None, + "createdAt": obj.get("createdAt"), + "createdBy": DeclarativeUserIdentifier.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "dashboardTabularExports": [AutomationDashboardTabularExport.from_dict(_item) for _item in obj["dashboardTabularExports"]] if obj.get("dashboardTabularExports") is not None else None, + "description": obj.get("description"), + "details": obj.get("details"), + "evaluationMode": obj.get("evaluationMode") if obj.get("evaluationMode") is not None else 'PER_RECIPIENT', + "exportDefinitions": [DeclarativeExportDefinitionIdentifier.from_dict(_item) for _item in obj["exportDefinitions"]] if obj.get("exportDefinitions") is not None else None, + "externalRecipients": [AutomationExternalRecipient.from_dict(_item) for _item in obj["externalRecipients"]] if obj.get("externalRecipients") is not None else None, + "id": obj.get("id"), + "imageExports": [AutomationImageExport.from_dict(_item) for _item in obj["imageExports"]] if obj.get("imageExports") is not None else None, + "metadata": AutomationMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "modifiedAt": obj.get("modifiedAt"), + "modifiedBy": DeclarativeUserIdentifier.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None, + "notificationChannel": DeclarativeNotificationChannelIdentifier.from_dict(obj["notificationChannel"]) if obj.get("notificationChannel") is not None else None, + "rawExports": [AutomationRawExport.from_dict(_item) for _item in obj["rawExports"]] if obj.get("rawExports") is not None else None, + "recipients": [DeclarativeUserIdentifier.from_dict(_item) for _item in obj["recipients"]] if obj.get("recipients") is not None else None, + "schedule": AutomationSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None, + "slidesExports": [AutomationSlidesExport.from_dict(_item) for _item in obj["slidesExports"]] if obj.get("slidesExports") is not None else None, + "state": obj.get("state") if obj.get("state") is not None else 'ACTIVE', + "tabularExports": [AutomationTabularExport.from_dict(_item) for _item in obj["tabularExports"]] if obj.get("tabularExports") is not None else None, + "tags": obj.get("tags"), + "title": obj.get("title"), + "visualExports": [AutomationVisualExport.from_dict(_item) for _item in obj["visualExports"]] if obj.get("visualExports") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_color_palette.py b/gooddata-api-client/gooddata_api_client/models/declarative_color_palette.py new file mode 100644 index 000000000..8f3ae0bb2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_color_palette.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeColorPalette(BaseModel): + """ + Color palette and its properties. + """ # noqa: E501 + content: Optional[Dict[str, Any]] = Field(description="Free-form JSON object") + id: StrictStr + name: Annotated[str, Field(strict=True, max_length=255)] + __properties: ClassVar[List[str]] = ["content", "id", "name"] + + 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 DeclarativeColorPalette 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 content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeColorPalette from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "id": obj.get("id"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_column.py b/gooddata-api-client/gooddata_api_client/models/declarative_column.py new file mode 100644 index 000000000..a564b60e6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_column.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, 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 DeclarativeColumn(BaseModel): + """ + A table column. + """ # noqa: E501 + data_type: StrictStr = Field(description="Column type", alias="dataType") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Column description/comment from database") + is_nullable: Optional[StrictBool] = Field(default=None, description="Column is nullable", alias="isNullable") + is_primary_key: Optional[StrictBool] = Field(default=None, description="Is column part of primary key?", alias="isPrimaryKey") + name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Column name") + referenced_table_column: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Referenced table (Foreign key)", alias="referencedTableColumn") + referenced_table_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Referenced table (Foreign key)", alias="referencedTableId") + __properties: ClassVar[List[str]] = ["dataType", "description", "isNullable", "isPrimaryKey", "name", "referencedTableColumn", "referencedTableId"] + + @field_validator('data_type') + def data_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 DeclarativeColumn 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 DeclarativeColumn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataType": obj.get("dataType"), + "description": obj.get("description"), + "isNullable": obj.get("isNullable"), + "isPrimaryKey": obj.get("isPrimaryKey"), + "name": obj.get("name"), + "referencedTableColumn": obj.get("referencedTableColumn"), + "referencedTableId": obj.get("referencedTableId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_csp_directive.py b/gooddata-api-client/gooddata_api_client/models/declarative_csp_directive.py new file mode 100644 index 000000000..a75f635a8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_csp_directive.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeCspDirective(BaseModel): + """ + DeclarativeCspDirective + """ # noqa: E501 + directive: Annotated[str, Field(strict=True, max_length=255)] + sources: List[StrictStr] + __properties: ClassVar[List[str]] = ["directive", "sources"] + + 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 DeclarativeCspDirective 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 DeclarativeCspDirective from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "directive": obj.get("directive"), + "sources": obj.get("sources") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_custom_application_setting.py b/gooddata-api-client/gooddata_api_client/models/declarative_custom_application_setting.py new file mode 100644 index 000000000..204fbe9ed --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_custom_application_setting.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, 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 DeclarativeCustomApplicationSetting(BaseModel): + """ + Custom application setting and its value. + """ # noqa: E501 + application_name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The application id", alias="applicationName") + content: Optional[Dict[str, Any]] = Field(description="Free-form JSON content. Maximum supported length is 250000 characters.") + id: Annotated[str, Field(strict=True)] = Field(description="Custom Application Setting ID.") + __properties: ClassVar[List[str]] = ["applicationName", "content", "id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeCustomApplicationSetting 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 content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeCustomApplicationSetting from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applicationName": obj.get("applicationName"), + "content": obj.get("content"), + "id": obj.get("id") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_custom_geo_collection.py b/gooddata-api-client/gooddata_api_client/models/declarative_custom_geo_collection.py new file mode 100644 index 000000000..b7ad34449 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_custom_geo_collection.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, 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 DeclarativeCustomGeoCollection(BaseModel): + """ + A declarative form of custom geo collection. + """ # noqa: E501 + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Description of the custom geo collection.") + id: Annotated[str, Field(strict=True)] = Field(description="Custom geo collection ID.") + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Name of the custom geo collection.") + __properties: ClassVar[List[str]] = ["description", "id", "name"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeCustomGeoCollection 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 DeclarativeCustomGeoCollection from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "id": obj.get("id"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_custom_geo_collections.py b/gooddata-api-client/gooddata_api_client/models/declarative_custom_geo_collections.py new file mode 100644 index 000000000..14fddf52d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_custom_geo_collections.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.declarative_custom_geo_collection import DeclarativeCustomGeoCollection +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeCustomGeoCollections(BaseModel): + """ + Custom geo collections. + """ # noqa: E501 + custom_geo_collections: List[DeclarativeCustomGeoCollection] = Field(alias="customGeoCollections") + __properties: ClassVar[List[str]] = ["customGeoCollections"] + + 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 DeclarativeCustomGeoCollections 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 each item in custom_geo_collections (list) + _items = [] + if self.custom_geo_collections: + for _item_custom_geo_collections in self.custom_geo_collections: + if _item_custom_geo_collections: + _items.append(_item_custom_geo_collections.to_dict()) + _dict['customGeoCollections'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeCustomGeoCollections from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customGeoCollections": [DeclarativeCustomGeoCollection.from_dict(_item) for _item in obj["customGeoCollections"]] if obj.get("customGeoCollections") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_dashboard_plugin.py b/gooddata-api-client/gooddata_api_client/models/declarative_dashboard_plugin.py new file mode 100644 index 000000000..191e92078 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_dashboard_plugin.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.declarative_user_identifier import DeclarativeUserIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeDashboardPlugin(BaseModel): + """ + DeclarativeDashboardPlugin + """ # noqa: E501 + content: Optional[Dict[str, Any]] = Field(description="Free-form JSON object") + created_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + created_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="createdBy") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Dashboard plugin description.") + id: Annotated[str, Field(strict=True)] = Field(description="Dashboard plugin object ID.") + modified_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + modified_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="modifiedBy") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Dashboard plugin object title.") + __properties: ClassVar[List[str]] = ["content", "createdAt", "createdBy", "description", "id", "modifiedAt", "modifiedBy", "tags", "title"] + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + 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 DeclarativeDashboardPlugin 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 created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + # set to None if content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeDashboardPlugin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "createdAt": obj.get("createdAt"), + "createdBy": DeclarativeUserIdentifier.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "description": obj.get("description"), + "id": obj.get("id"), + "modifiedAt": obj.get("modifiedAt"), + "modifiedBy": DeclarativeUserIdentifier.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None, + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_data_source.py b/gooddata-api-client/gooddata_api_client/models/declarative_data_source.py new file mode 100644 index 000000000..689dff159 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_data_source.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.declarative_data_source_permission import DeclarativeDataSourcePermission +from gooddata_api_client.models.parameter import Parameter +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeDataSource(BaseModel): + """ + A data source and its properties. + """ # noqa: E501 + alternative_data_source_id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Alternative data source ID. It is a weak reference meaning data source does not have to exist. All the entities (e.g. tables) from the data source must be available also in the alternative data source. It must be present in the same organization as the data source.", alias="alternativeDataSourceId") + authentication_type: Optional[StrictStr] = Field(default=None, description="Type of authentication used to connect to the database.", alias="authenticationType") + cache_strategy: Optional[StrictStr] = Field(default=None, description="Determines how the results coming from a particular datasource should be cached. - ALWAYS: The results from the datasource should be cached normally (the default). - NEVER: The results from the datasource should never be cached.", alias="cacheStrategy") + client_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Id of client with permission to connect to the data source.", alias="clientId") + client_secret: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The client secret to use to connect to the database providing the data for the data source.", alias="clientSecret") + decoded_parameters: Optional[List[Parameter]] = Field(default=None, alias="decodedParameters") + id: Annotated[str, Field(strict=True)] = Field(description="Data source ID.") + name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Name of the data source.") + parameters: Optional[List[Parameter]] = None + password: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Password for the data-source user, property is never returned back.") + permissions: Optional[List[DeclarativeDataSourcePermission]] = None + private_key: Optional[Annotated[str, Field(strict=True, max_length=15000)]] = Field(default=None, description="The private key to use to connect to the database providing the data for the data source.", alias="privateKey") + private_key_passphrase: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The passphrase used to encrypt the private key.", alias="privateKeyPassphrase") + var_schema: Annotated[str, Field(strict=True, max_length=255)] = Field(description="A scheme/database with the data.", alias="schema") + token: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Token as an alternative to username and password.") + type: StrictStr = Field(description="Type of database.") + url: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="An connection string relevant to type of database.") + username: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="User with permission connect the data source/database.") + __properties: ClassVar[List[str]] = ["alternativeDataSourceId", "authenticationType", "cacheStrategy", "clientId", "clientSecret", "decodedParameters", "id", "name", "parameters", "password", "permissions", "privateKey", "privateKeyPassphrase", "schema", "token", "type", "url", "username"] + + @field_validator('alternative_data_source_id') + def alternative_data_source_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('authentication_type') + def authentication_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['USERNAME_PASSWORD', 'TOKEN', 'KEY_PAIR', 'CLIENT_SECRET', 'ACCESS_TOKEN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('USERNAME_PASSWORD', 'TOKEN', 'KEY_PAIR', 'CLIENT_SECRET', 'ACCESS_TOKEN')") + return value + + @field_validator('cache_strategy') + def cache_strategy_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ALWAYS', 'NEVER']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ALWAYS', 'NEVER')") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['POSTGRESQL', 'REDSHIFT', 'VERTICA', 'SNOWFLAKE', 'ADS', 'BIGQUERY', 'MSSQL', 'PRESTO', 'DREMIO', 'DRILL', 'GREENPLUM', 'AZURESQL', 'SYNAPSESQL', 'DATABRICKS', 'GDSTORAGE', 'CLICKHOUSE', 'MYSQL', 'MARIADB', 'ORACLE', 'PINOT', 'SINGLESTORE', 'MOTHERDUCK', 'FLEXCONNECT', 'STARROCKS', 'ATHENA', 'MONGODB', 'CRATEDB', 'AILAKEHOUSE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('POSTGRESQL', 'REDSHIFT', 'VERTICA', 'SNOWFLAKE', 'ADS', 'BIGQUERY', 'MSSQL', 'PRESTO', 'DREMIO', 'DRILL', 'GREENPLUM', 'AZURESQL', 'SYNAPSESQL', 'DATABRICKS', 'GDSTORAGE', 'CLICKHOUSE', 'MYSQL', 'MARIADB', 'ORACLE', 'PINOT', 'SINGLESTORE', 'MOTHERDUCK', 'FLEXCONNECT', 'STARROCKS', 'ATHENA', 'MONGODB', 'CRATEDB', 'AILAKEHOUSE')") + 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 DeclarativeDataSource 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 each item in decoded_parameters (list) + _items = [] + if self.decoded_parameters: + for _item_decoded_parameters in self.decoded_parameters: + if _item_decoded_parameters: + _items.append(_item_decoded_parameters.to_dict()) + _dict['decodedParameters'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in parameters (list) + _items = [] + if self.parameters: + for _item_parameters in self.parameters: + if _item_parameters: + _items.append(_item_parameters.to_dict()) + _dict['parameters'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + # set to None if alternative_data_source_id (nullable) is None + # and model_fields_set contains the field + if self.alternative_data_source_id is None and "alternative_data_source_id" in self.model_fields_set: + _dict['alternativeDataSourceId'] = None + + # set to None if authentication_type (nullable) is None + # and model_fields_set contains the field + if self.authentication_type is None and "authentication_type" in self.model_fields_set: + _dict['authenticationType'] = None + + # set to None if private_key (nullable) is None + # and model_fields_set contains the field + if self.private_key is None and "private_key" in self.model_fields_set: + _dict['privateKey'] = None + + # set to None if private_key_passphrase (nullable) is None + # and model_fields_set contains the field + if self.private_key_passphrase is None and "private_key_passphrase" in self.model_fields_set: + _dict['privateKeyPassphrase'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeDataSource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alternativeDataSourceId": obj.get("alternativeDataSourceId"), + "authenticationType": obj.get("authenticationType"), + "cacheStrategy": obj.get("cacheStrategy"), + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret"), + "decodedParameters": [Parameter.from_dict(_item) for _item in obj["decodedParameters"]] if obj.get("decodedParameters") is not None else None, + "id": obj.get("id"), + "name": obj.get("name"), + "parameters": [Parameter.from_dict(_item) for _item in obj["parameters"]] if obj.get("parameters") is not None else None, + "password": obj.get("password"), + "permissions": [DeclarativeDataSourcePermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None, + "privateKey": obj.get("privateKey"), + "privateKeyPassphrase": obj.get("privateKeyPassphrase"), + "schema": obj.get("schema"), + "token": obj.get("token"), + "type": obj.get("type"), + "url": obj.get("url"), + "username": obj.get("username") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_data_source_permission.py b/gooddata-api-client/gooddata_api_client/models/declarative_data_source_permission.py new file mode 100644 index 000000000..ba9458fdc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_data_source_permission.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.assignee_identifier import AssigneeIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeDataSourcePermission(BaseModel): + """ + DeclarativeDataSourcePermission + """ # noqa: E501 + assignee: AssigneeIdentifier + name: StrictStr = Field(description="Permission name.") + __properties: ClassVar[List[str]] = ["assignee", "name"] + + @field_validator('name') + def name_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['MANAGE', 'USE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MANAGE', 'USE')") + 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 DeclarativeDataSourcePermission 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 assignee + if self.assignee: + _dict['assignee'] = self.assignee.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeDataSourcePermission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assignee": AssigneeIdentifier.from_dict(obj["assignee"]) if obj.get("assignee") is not None else None, + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_data_source_permissions.py b/gooddata-api-client/gooddata_api_client/models/declarative_data_source_permissions.py new file mode 100644 index 000000000..757fb626f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_data_source_permissions.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.declarative_data_source_permission import DeclarativeDataSourcePermission +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeDataSourcePermissions(BaseModel): + """ + Data source permissions. + """ # noqa: E501 + permissions: Optional[List[DeclarativeDataSourcePermission]] = None + __properties: ClassVar[List[str]] = ["permissions"] + + 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 DeclarativeDataSourcePermissions 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 each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeDataSourcePermissions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "permissions": [DeclarativeDataSourcePermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_data_sources.py b/gooddata-api-client/gooddata_api_client/models/declarative_data_sources.py new file mode 100644 index 000000000..d3a147bba --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_data_sources.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.declarative_data_source import DeclarativeDataSource +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeDataSources(BaseModel): + """ + A data source and its properties. + """ # noqa: E501 + data_sources: List[DeclarativeDataSource] = Field(alias="dataSources") + __properties: ClassVar[List[str]] = ["dataSources"] + + 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 DeclarativeDataSources 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 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeDataSources from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataSources": [DeclarativeDataSource.from_dict(_item) for _item in obj["dataSources"]] if obj.get("dataSources") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_dataset.py b/gooddata-api-client/gooddata_api_client/models/declarative_dataset.py new file mode 100644 index 000000000..254d6bb3b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_dataset.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.data_source_table_identifier import DataSourceTableIdentifier +from gooddata_api_client.models.declarative_aggregated_fact import DeclarativeAggregatedFact +from gooddata_api_client.models.declarative_attribute import DeclarativeAttribute +from gooddata_api_client.models.declarative_dataset_sql import DeclarativeDatasetSql +from gooddata_api_client.models.declarative_fact import DeclarativeFact +from gooddata_api_client.models.declarative_reference import DeclarativeReference +from gooddata_api_client.models.declarative_workspace_data_filter_column import DeclarativeWorkspaceDataFilterColumn +from gooddata_api_client.models.declarative_workspace_data_filter_references import DeclarativeWorkspaceDataFilterReferences +from gooddata_api_client.models.grain_identifier import GrainIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeDataset(BaseModel): + """ + A dataset defined by its properties. + """ # noqa: E501 + aggregated_facts: Optional[List[DeclarativeAggregatedFact]] = Field(default=None, description="An array of aggregated facts.", alias="aggregatedFacts") + attributes: Optional[List[DeclarativeAttribute]] = Field(default=None, description="An array of attributes.") + data_source_table_id: Optional[DataSourceTableIdentifier] = Field(default=None, alias="dataSourceTableId") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="A dataset description.") + facts: Optional[List[DeclarativeFact]] = Field(default=None, description="An array of facts.") + grain: List[GrainIdentifier] = Field(description="An array of grain identifiers.") + id: Annotated[str, Field(strict=True)] = Field(description="The Dataset ID. This ID is further used to refer to this instance of dataset.") + precedence: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Precedence used in aggregate awareness.") + references: List[DeclarativeReference] = Field(description="An array of references.") + sql: Optional[DeclarativeDatasetSql] = None + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="A dataset title.") + workspace_data_filter_columns: Optional[List[DeclarativeWorkspaceDataFilterColumn]] = Field(default=None, description="An array of columns which are available for match to implicit workspace data filters.", alias="workspaceDataFilterColumns") + workspace_data_filter_references: Optional[List[DeclarativeWorkspaceDataFilterReferences]] = Field(default=None, description="An array of explicit workspace data filters.", alias="workspaceDataFilterReferences") + __properties: ClassVar[List[str]] = ["aggregatedFacts", "attributes", "dataSourceTableId", "description", "facts", "grain", "id", "precedence", "references", "sql", "tags", "title", "workspaceDataFilterColumns", "workspaceDataFilterReferences"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeDataset 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 each item in aggregated_facts (list) + _items = [] + if self.aggregated_facts: + for _item_aggregated_facts in self.aggregated_facts: + if _item_aggregated_facts: + _items.append(_item_aggregated_facts.to_dict()) + _dict['aggregatedFacts'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attributes (list) + _items = [] + if self.attributes: + for _item_attributes in self.attributes: + if _item_attributes: + _items.append(_item_attributes.to_dict()) + _dict['attributes'] = _items + # override the default output from pydantic by calling `to_dict()` of data_source_table_id + if self.data_source_table_id: + _dict['dataSourceTableId'] = self.data_source_table_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in facts (list) + _items = [] + if self.facts: + for _item_facts in self.facts: + if _item_facts: + _items.append(_item_facts.to_dict()) + _dict['facts'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in grain (list) + _items = [] + if self.grain: + for _item_grain in self.grain: + if _item_grain: + _items.append(_item_grain.to_dict()) + _dict['grain'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in references (list) + _items = [] + if self.references: + for _item_references in self.references: + if _item_references: + _items.append(_item_references.to_dict()) + _dict['references'] = _items + # override the default output from pydantic by calling `to_dict()` of sql + if self.sql: + _dict['sql'] = self.sql.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in workspace_data_filter_columns (list) + _items = [] + if self.workspace_data_filter_columns: + for _item_workspace_data_filter_columns in self.workspace_data_filter_columns: + if _item_workspace_data_filter_columns: + _items.append(_item_workspace_data_filter_columns.to_dict()) + _dict['workspaceDataFilterColumns'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in workspace_data_filter_references (list) + _items = [] + if self.workspace_data_filter_references: + for _item_workspace_data_filter_references in self.workspace_data_filter_references: + if _item_workspace_data_filter_references: + _items.append(_item_workspace_data_filter_references.to_dict()) + _dict['workspaceDataFilterReferences'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeDataset from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aggregatedFacts": [DeclarativeAggregatedFact.from_dict(_item) for _item in obj["aggregatedFacts"]] if obj.get("aggregatedFacts") is not None else None, + "attributes": [DeclarativeAttribute.from_dict(_item) for _item in obj["attributes"]] if obj.get("attributes") is not None else None, + "dataSourceTableId": DataSourceTableIdentifier.from_dict(obj["dataSourceTableId"]) if obj.get("dataSourceTableId") is not None else None, + "description": obj.get("description"), + "facts": [DeclarativeFact.from_dict(_item) for _item in obj["facts"]] if obj.get("facts") is not None else None, + "grain": [GrainIdentifier.from_dict(_item) for _item in obj["grain"]] if obj.get("grain") is not None else None, + "id": obj.get("id"), + "precedence": obj.get("precedence"), + "references": [DeclarativeReference.from_dict(_item) for _item in obj["references"]] if obj.get("references") is not None else None, + "sql": DeclarativeDatasetSql.from_dict(obj["sql"]) if obj.get("sql") is not None else None, + "tags": obj.get("tags"), + "title": obj.get("title"), + "workspaceDataFilterColumns": [DeclarativeWorkspaceDataFilterColumn.from_dict(_item) for _item in obj["workspaceDataFilterColumns"]] if obj.get("workspaceDataFilterColumns") is not None else None, + "workspaceDataFilterReferences": [DeclarativeWorkspaceDataFilterReferences.from_dict(_item) for _item in obj["workspaceDataFilterReferences"]] if obj.get("workspaceDataFilterReferences") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_dataset_extension.py b/gooddata-api-client/gooddata_api_client/models/declarative_dataset_extension.py new file mode 100644 index 000000000..62121aede --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_dataset_extension.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.declarative_workspace_data_filter_references import DeclarativeWorkspaceDataFilterReferences +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeDatasetExtension(BaseModel): + """ + A dataset extension properties. + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="The Dataset ID. This ID is further used to refer to this instance of dataset.") + workspace_data_filter_references: Optional[List[DeclarativeWorkspaceDataFilterReferences]] = Field(default=None, description="An array of explicit workspace data filters.", alias="workspaceDataFilterReferences") + __properties: ClassVar[List[str]] = ["id", "workspaceDataFilterReferences"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeDatasetExtension 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 each item in workspace_data_filter_references (list) + _items = [] + if self.workspace_data_filter_references: + for _item_workspace_data_filter_references in self.workspace_data_filter_references: + if _item_workspace_data_filter_references: + _items.append(_item_workspace_data_filter_references.to_dict()) + _dict['workspaceDataFilterReferences'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeDatasetExtension 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"), + "workspaceDataFilterReferences": [DeclarativeWorkspaceDataFilterReferences.from_dict(_item) for _item in obj["workspaceDataFilterReferences"]] if obj.get("workspaceDataFilterReferences") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_dataset_sql.py b/gooddata-api-client/gooddata_api_client/models/declarative_dataset_sql.py new file mode 100644 index 000000000..baf9c0df9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_dataset_sql.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeDatasetSql(BaseModel): + """ + SQL defining this dataset. + """ # noqa: E501 + data_source_id: StrictStr = Field(description="Data source ID.", alias="dataSourceId") + statement: StrictStr = Field(description="SQL statement.") + __properties: ClassVar[List[str]] = ["dataSourceId", "statement"] + + 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 DeclarativeDatasetSql 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 DeclarativeDatasetSql from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataSourceId": obj.get("dataSourceId"), + "statement": obj.get("statement") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_date_dataset.py b/gooddata-api-client/gooddata_api_client/models/declarative_date_dataset.py new file mode 100644 index 000000000..3dcba9536 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_date_dataset.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.granularities_formatting import GranularitiesFormatting +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeDateDataset(BaseModel): + """ + A date dataset. + """ # noqa: E501 + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Date dataset description.") + granularities: List[StrictStr] = Field(description="An array of date granularities. All listed granularities will be available for date dataset.") + granularities_formatting: GranularitiesFormatting = Field(alias="granularitiesFormatting") + id: Annotated[str, Field(strict=True)] = Field(description="Date dataset ID.") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Date dataset title.") + __properties: ClassVar[List[str]] = ["description", "granularities", "granularitiesFormatting", "id", "tags", "title"] + + @field_validator('granularities') + def granularities_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR']): + raise ValueError("each list item must be one of ('MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR')") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeDateDataset 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 granularities_formatting + if self.granularities_formatting: + _dict['granularitiesFormatting'] = self.granularities_formatting.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeDateDataset from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "granularities": obj.get("granularities"), + "granularitiesFormatting": GranularitiesFormatting.from_dict(obj["granularitiesFormatting"]) if obj.get("granularitiesFormatting") is not None else None, + "id": obj.get("id"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_export_definition.py b/gooddata-api-client/gooddata_api_client/models/declarative_export_definition.py new file mode 100644 index 000000000..0dcfa2ce9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_export_definition.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.declarative_export_definition_request_payload import DeclarativeExportDefinitionRequestPayload +from gooddata_api_client.models.declarative_user_identifier import DeclarativeUserIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeExportDefinition(BaseModel): + """ + DeclarativeExportDefinition + """ # noqa: E501 + created_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + created_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="createdBy") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Export definition object description.") + id: Annotated[str, Field(strict=True)] = Field(description="Export definition id.") + modified_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + modified_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="modifiedBy") + request_payload: Optional[DeclarativeExportDefinitionRequestPayload] = Field(default=None, alias="requestPayload") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Export definition object title.") + __properties: ClassVar[List[str]] = ["createdAt", "createdBy", "description", "id", "modifiedAt", "modifiedBy", "requestPayload", "tags", "title"] + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + 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 DeclarativeExportDefinition 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 created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of request_payload + if self.request_payload: + _dict['requestPayload'] = self.request_payload.to_dict() + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeExportDefinition 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": DeclarativeUserIdentifier.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "description": obj.get("description"), + "id": obj.get("id"), + "modifiedAt": obj.get("modifiedAt"), + "modifiedBy": DeclarativeUserIdentifier.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None, + "requestPayload": DeclarativeExportDefinitionRequestPayload.from_dict(obj["requestPayload"]) if obj.get("requestPayload") is not None else None, + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_export_definition_identifier.py b/gooddata-api-client/gooddata_api_client/models/declarative_export_definition_identifier.py new file mode 100644 index 000000000..85ce86b17 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_export_definition_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeExportDefinitionIdentifier(BaseModel): + """ + An export definition identifier. + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="Export definition identifier.") + type: StrictStr = Field(description="A type.") + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['exportDefinition']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('exportDefinition')") + 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 DeclarativeExportDefinitionIdentifier 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 DeclarativeExportDefinitionIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_export_definition_request_payload.py b/gooddata-api-client/gooddata_api_client/models/declarative_export_definition_request_payload.py new file mode 100644 index 000000000..cd37d0941 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_export_definition_request_payload.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.tabular_export_request import TabularExportRequest +from gooddata_api_client.models.visual_export_request import VisualExportRequest +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DECLARATIVEEXPORTDEFINITIONREQUESTPAYLOAD_ONE_OF_SCHEMAS = ["TabularExportRequest", "VisualExportRequest"] + +class DeclarativeExportDefinitionRequestPayload(BaseModel): + """ + DeclarativeExportDefinitionRequestPayload + """ + # data type: TabularExportRequest + oneof_schema_1_validator: Optional[TabularExportRequest] = None + # data type: VisualExportRequest + oneof_schema_2_validator: Optional[VisualExportRequest] = None + actual_instance: Optional[Union[TabularExportRequest, VisualExportRequest]] = None + one_of_schemas: Set[str] = { "TabularExportRequest", "VisualExportRequest" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = DeclarativeExportDefinitionRequestPayload.model_construct() + error_messages = [] + match = 0 + # validate data type: TabularExportRequest + if not isinstance(v, TabularExportRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `TabularExportRequest`") + else: + match += 1 + # validate data type: VisualExportRequest + if not isinstance(v, VisualExportRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `VisualExportRequest`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DeclarativeExportDefinitionRequestPayload with oneOf schemas: TabularExportRequest, VisualExportRequest. 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 + + # deserialize data into TabularExportRequest + try: + if match == 0: + instance.actual_instance = TabularExportRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into VisualExportRequest + try: + if match == 0: + instance.actual_instance = VisualExportRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DeclarativeExportDefinitionRequestPayload with oneOf schemas: TabularExportRequest, VisualExportRequest. 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], TabularExportRequest, VisualExportRequest]]: + """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/gooddata-api-client/gooddata_api_client/models/declarative_export_template.py b/gooddata-api-client/gooddata_api_client/models/declarative_export_template.py new file mode 100644 index 000000000..4f429f30e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_export_template.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.dashboard_slides_template import DashboardSlidesTemplate +from gooddata_api_client.models.widget_slides_template import WidgetSlidesTemplate +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeExportTemplate(BaseModel): + """ + A declarative form of a particular export template. + """ # noqa: E501 + dashboard_slides_template: Optional[DashboardSlidesTemplate] = Field(default=None, alias="dashboardSlidesTemplate") + id: Annotated[str, Field(strict=True)] = Field(description="Identifier of an export template") + name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Name of an export template.") + widget_slides_template: Optional[WidgetSlidesTemplate] = Field(default=None, alias="widgetSlidesTemplate") + __properties: ClassVar[List[str]] = ["dashboardSlidesTemplate", "id", "name", "widgetSlidesTemplate"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeExportTemplate 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 dashboard_slides_template + if self.dashboard_slides_template: + _dict['dashboardSlidesTemplate'] = self.dashboard_slides_template.to_dict() + # override the default output from pydantic by calling `to_dict()` of widget_slides_template + if self.widget_slides_template: + _dict['widgetSlidesTemplate'] = self.widget_slides_template.to_dict() + # set to None if dashboard_slides_template (nullable) is None + # and model_fields_set contains the field + if self.dashboard_slides_template is None and "dashboard_slides_template" in self.model_fields_set: + _dict['dashboardSlidesTemplate'] = None + + # set to None if widget_slides_template (nullable) is None + # and model_fields_set contains the field + if self.widget_slides_template is None and "widget_slides_template" in self.model_fields_set: + _dict['widgetSlidesTemplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeExportTemplate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dashboardSlidesTemplate": DashboardSlidesTemplate.from_dict(obj["dashboardSlidesTemplate"]) if obj.get("dashboardSlidesTemplate") is not None else None, + "id": obj.get("id"), + "name": obj.get("name"), + "widgetSlidesTemplate": WidgetSlidesTemplate.from_dict(obj["widgetSlidesTemplate"]) if obj.get("widgetSlidesTemplate") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_export_templates.py b/gooddata-api-client/gooddata_api_client/models/declarative_export_templates.py new file mode 100644 index 000000000..45b8b4213 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_export_templates.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.declarative_export_template import DeclarativeExportTemplate +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeExportTemplates(BaseModel): + """ + Export templates. + """ # noqa: E501 + export_templates: List[DeclarativeExportTemplate] = Field(alias="exportTemplates") + __properties: ClassVar[List[str]] = ["exportTemplates"] + + 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 DeclarativeExportTemplates 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 each item in export_templates (list) + _items = [] + if self.export_templates: + for _item_export_templates in self.export_templates: + if _item_export_templates: + _items.append(_item_export_templates.to_dict()) + _dict['exportTemplates'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeExportTemplates from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "exportTemplates": [DeclarativeExportTemplate.from_dict(_item) for _item in obj["exportTemplates"]] if obj.get("exportTemplates") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_fact.py b/gooddata-api-client/gooddata_api_client/models/declarative_fact.py new file mode 100644 index 000000000..64ab13fe1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_fact.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, 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 DeclarativeFact(BaseModel): + """ + A dataset fact. + """ # noqa: E501 + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Fact description.") + id: Annotated[str, Field(strict=True)] = Field(description="Fact ID.") + is_hidden: Optional[StrictBool] = Field(default=None, description="If true, this fact is hidden from AI search results.", alias="isHidden") + is_nullable: Optional[StrictBool] = Field(default=None, description="Flag indicating whether the associated source column allows null values.", alias="isNullable") + null_value: Optional[StrictStr] = Field(default=None, description="Value used in coalesce during joins instead of null.", alias="nullValue") + source_column: Annotated[str, Field(strict=True, max_length=255)] = Field(description="A name of the source column in the table.", alias="sourceColumn") + source_column_data_type: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="A type of the source column", alias="sourceColumnDataType") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Fact title.") + __properties: ClassVar[List[str]] = ["description", "id", "isHidden", "isNullable", "nullValue", "sourceColumn", "sourceColumnDataType", "tags", "title"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('source_column_data_type') + def source_column_data_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 DeclarativeFact 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 DeclarativeFact from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "id": obj.get("id"), + "isHidden": obj.get("isHidden"), + "isNullable": obj.get("isNullable"), + "nullValue": obj.get("nullValue"), + "sourceColumn": obj.get("sourceColumn"), + "sourceColumnDataType": obj.get("sourceColumnDataType"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_filter_context.py b/gooddata-api-client/gooddata_api_client/models/declarative_filter_context.py new file mode 100644 index 000000000..bfffe1623 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_filter_context.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 DeclarativeFilterContext(BaseModel): + """ + DeclarativeFilterContext + """ # noqa: E501 + content: Optional[Dict[str, Any]] = Field(description="Free-form JSON object") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Filter Context description.") + id: Annotated[str, Field(strict=True)] = Field(description="Filter Context ID.") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Filter Context title.") + __properties: ClassVar[List[str]] = ["content", "description", "id", "tags", "title"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeFilterContext 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 content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeFilterContext from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "description": obj.get("description"), + "id": obj.get("id"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_filter_view.py b/gooddata-api-client/gooddata_api_client/models/declarative_filter_view.py new file mode 100644 index 000000000..3d8470927 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_filter_view.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.declarative_analytical_dashboard_identifier import DeclarativeAnalyticalDashboardIdentifier +from gooddata_api_client.models.declarative_user_identifier import DeclarativeUserIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeFilterView(BaseModel): + """ + DeclarativeFilterView + """ # noqa: E501 + analytical_dashboard: Optional[DeclarativeAnalyticalDashboardIdentifier] = Field(default=None, alias="analyticalDashboard") + content: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + id: Annotated[str, Field(strict=True)] = Field(description="FilterView object ID.") + is_default: Optional[StrictBool] = Field(default=None, description="Indicator whether the filter view should by applied by default.", alias="isDefault") + tags: Optional[List[StrictStr]] = None + title: Annotated[str, Field(strict=True, max_length=255)] + user: Optional[DeclarativeUserIdentifier] = None + __properties: ClassVar[List[str]] = ["analyticalDashboard", "content", "description", "id", "isDefault", "tags", "title", "user"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeFilterView 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 analytical_dashboard + if self.analytical_dashboard: + _dict['analyticalDashboard'] = self.analytical_dashboard.to_dict() + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeFilterView from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyticalDashboard": DeclarativeAnalyticalDashboardIdentifier.from_dict(obj["analyticalDashboard"]) if obj.get("analyticalDashboard") is not None else None, + "content": obj.get("content"), + "description": obj.get("description"), + "id": obj.get("id"), + "isDefault": obj.get("isDefault"), + "tags": obj.get("tags"), + "title": obj.get("title"), + "user": DeclarativeUserIdentifier.from_dict(obj["user"]) if obj.get("user") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_identity_provider.py b/gooddata-api-client/gooddata_api_client/models/declarative_identity_provider.py new file mode 100644 index 000000000..68ee7ede1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_identity_provider.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 DeclarativeIdentityProvider(BaseModel): + """ + Notification channels. + """ # noqa: E501 + custom_claim_mapping: Optional[Dict[str, StrictStr]] = Field(default=None, description="Map of custom claim overrides. To be used when your Idp does not provide default claims (sub, email, name, given_name, family_name, urn.gooddata.user_groups [optional]). Define the key pair for the claim you wish to override, where the key is the default name of the attribute and the value is your custom name for the given attribute.", alias="customClaimMapping") + id: Annotated[str, Field(strict=True)] = Field(description="FilterView object ID.") + identifiers: Optional[List[StrictStr]] = Field(default=None, description="List of identifiers for this IdP, where an identifier is a domain name. Users with email addresses belonging to these domains will be authenticated by this IdP.") + idp_type: Optional[StrictStr] = Field(default=None, description="Type of IdP for management purposes. MANAGED_IDP represents a GoodData managed IdP used in single OIDC setup, which is protected from altering/deletion. FIM_IDP represents a GoodData managed IdP used in federated identity management setup, which is protected from altering/deletion. CUSTOM_IDP represents customer's own IdP, protected from deletion if currently used by org for authentication, deletable otherwise.", alias="idpType") + oauth_client_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The OAuth client id of your OIDC provider. This field is mandatory for OIDC IdP.", alias="oauthClientId") + oauth_client_secret: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The OAuth client secret of your OIDC provider. This field is mandatory for OIDC IdP.", alias="oauthClientSecret") + oauth_custom_auth_attributes: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=10000)]]] = Field(default=None, description="Map of additional authentication attributes that should be added to the OAuth2 authentication requests, where the key is the name of the attribute and the value is the value of the attribute.", alias="oauthCustomAuthAttributes") + oauth_custom_scopes: Optional[List[Annotated[str, Field(strict=True, max_length=255)]]] = Field(default=None, description="List of additional OAuth scopes which may be required by other providers (e.g. Snowflake)", alias="oauthCustomScopes") + oauth_issuer_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Any string identifying the OIDC provider. This value is used as suffix for OAuth2 callback (redirect) URL. If not defined, the standard callback URL is used. This value is valid only for external OIDC providers, not for the internal DEX provider.", alias="oauthIssuerId") + oauth_issuer_location: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The location of your OIDC provider. This field is mandatory for OIDC IdP.", alias="oauthIssuerLocation") + oauth_subject_id_claim: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Any string identifying the claim in ID token, that should be used for user identification. The default value is 'sub'.", alias="oauthSubjectIdClaim") + saml_metadata: Optional[Annotated[str, Field(strict=True, max_length=15000)]] = Field(default=None, description="Base64 encoded xml document with SAML metadata. This document is issued by your SAML provider. It includes the issuer's name, expiration information, and keys that can be used to validate the response from the identity provider. This field is mandatory for SAML IdP.", alias="samlMetadata") + __properties: ClassVar[List[str]] = ["customClaimMapping", "id", "identifiers", "idpType", "oauthClientId", "oauthClientSecret", "oauthCustomAuthAttributes", "oauthCustomScopes", "oauthIssuerId", "oauthIssuerLocation", "oauthSubjectIdClaim", "samlMetadata"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('idp_type') + def idp_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['MANAGED_IDP', 'FIM_IDP', 'DEX_IDP', 'CUSTOM_IDP']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MANAGED_IDP', 'FIM_IDP', 'DEX_IDP', 'CUSTOM_IDP')") + 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 DeclarativeIdentityProvider 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 oauth_custom_scopes (nullable) is None + # and model_fields_set contains the field + if self.oauth_custom_scopes is None and "oauth_custom_scopes" in self.model_fields_set: + _dict['oauthCustomScopes'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeIdentityProvider from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customClaimMapping": obj.get("customClaimMapping"), + "id": obj.get("id"), + "identifiers": obj.get("identifiers"), + "idpType": obj.get("idpType"), + "oauthClientId": obj.get("oauthClientId"), + "oauthClientSecret": obj.get("oauthClientSecret"), + "oauthCustomAuthAttributes": obj.get("oauthCustomAuthAttributes"), + "oauthCustomScopes": obj.get("oauthCustomScopes"), + "oauthIssuerId": obj.get("oauthIssuerId"), + "oauthIssuerLocation": obj.get("oauthIssuerLocation"), + "oauthSubjectIdClaim": obj.get("oauthSubjectIdClaim"), + "samlMetadata": obj.get("samlMetadata") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_identity_provider_identifier.py b/gooddata-api-client/gooddata_api_client/models/declarative_identity_provider_identifier.py new file mode 100644 index 000000000..864988d8a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_identity_provider_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeIdentityProviderIdentifier(BaseModel): + """ + An Identity Provider identifier. + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="Identifier of the identity provider.") + type: StrictStr = Field(description="A type.") + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['identityProvider']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('identityProvider')") + 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 DeclarativeIdentityProviderIdentifier 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 DeclarativeIdentityProviderIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_jwk.py b/gooddata-api-client/gooddata_api_client/models/declarative_jwk.py new file mode 100644 index 000000000..868f48df0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_jwk.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from gooddata_api_client.models.declarative_jwk_specification import DeclarativeJwkSpecification +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeJwk(BaseModel): + """ + A declarative form of the JWK. + """ # noqa: E501 + content: DeclarativeJwkSpecification + id: Annotated[str, Field(strict=True)] = Field(description="JWK object ID.") + __properties: ClassVar[List[str]] = ["content", "id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeJwk 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeJwk from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": DeclarativeJwkSpecification.from_dict(obj["content"]) if obj.get("content") is not None else None, + "id": obj.get("id") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_jwk_specification.py b/gooddata-api-client/gooddata_api_client/models/declarative_jwk_specification.py new file mode 100644 index 000000000..14ace5d30 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_jwk_specification.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.declarative_rsa_specification import DeclarativeRsaSpecification +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DECLARATIVEJWKSPECIFICATION_ONE_OF_SCHEMAS = ["DeclarativeRsaSpecification"] + +class DeclarativeJwkSpecification(BaseModel): + """ + Declarative specification of the cryptographic key. + """ + # data type: DeclarativeRsaSpecification + oneof_schema_1_validator: Optional[DeclarativeRsaSpecification] = None + actual_instance: Optional[Union[DeclarativeRsaSpecification]] = None + one_of_schemas: Set[str] = { "DeclarativeRsaSpecification" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = DeclarativeJwkSpecification.model_construct() + error_messages = [] + match = 0 + # validate data type: DeclarativeRsaSpecification + if not isinstance(v, DeclarativeRsaSpecification): + error_messages.append(f"Error! Input type `{type(v)}` is not `DeclarativeRsaSpecification`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DeclarativeJwkSpecification with oneOf schemas: DeclarativeRsaSpecification. 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 + + # deserialize data into DeclarativeRsaSpecification + try: + if match == 0: + instance.actual_instance = DeclarativeRsaSpecification.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DeclarativeJwkSpecification with oneOf schemas: DeclarativeRsaSpecification. 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], DeclarativeRsaSpecification]]: + """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/gooddata-api-client/gooddata_api_client/models/declarative_label.py b/gooddata-api-client/gooddata_api_client/models/declarative_label.py new file mode 100644 index 000000000..69b7b8a4f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_label.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.declarative_label_translation import DeclarativeLabelTranslation +from gooddata_api_client.models.geo_area_config import GeoAreaConfig +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeLabel(BaseModel): + """ + A attribute label. + """ # noqa: E501 + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Label description.") + geo_area_config: Optional[GeoAreaConfig] = Field(default=None, alias="geoAreaConfig") + id: Annotated[str, Field(strict=True)] = Field(description="Label ID.") + is_hidden: Optional[StrictBool] = Field(default=None, description="Determines if the label is hidden from AI features.", alias="isHidden") + is_nullable: Optional[StrictBool] = Field(default=None, description="Flag indicating whether the associated source column allows null values.", alias="isNullable") + locale: Optional[StrictStr] = Field(default=None, description="Default label locale.") + null_value: Optional[StrictStr] = Field(default=None, description="Value used in coalesce during joins instead of null.", alias="nullValue") + source_column: Annotated[str, Field(strict=True, max_length=255)] = Field(description="A name of the source column in the table.", alias="sourceColumn") + source_column_data_type: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="A type of the source column", alias="sourceColumnDataType") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Label title.") + translations: Optional[List[DeclarativeLabelTranslation]] = Field(default=None, description="Other translations.") + value_type: Optional[StrictStr] = Field(default=None, description="Specific type of label", alias="valueType") + __properties: ClassVar[List[str]] = ["description", "geoAreaConfig", "id", "isHidden", "isNullable", "locale", "nullValue", "sourceColumn", "sourceColumnDataType", "tags", "title", "translations", "valueType"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('source_column_data_type') + def source_column_data_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + return value + + @field_validator('value_type') + def value_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['TEXT', 'HYPERLINK', 'GEO', 'GEO_LONGITUDE', 'GEO_LATITUDE', 'GEO_AREA', 'IMAGE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('TEXT', 'HYPERLINK', 'GEO', 'GEO_LONGITUDE', 'GEO_LATITUDE', 'GEO_AREA', 'IMAGE')") + 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 DeclarativeLabel 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 geo_area_config + if self.geo_area_config: + _dict['geoAreaConfig'] = self.geo_area_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in translations (list) + _items = [] + if self.translations: + for _item_translations in self.translations: + if _item_translations: + _items.append(_item_translations.to_dict()) + _dict['translations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeLabel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "geoAreaConfig": GeoAreaConfig.from_dict(obj["geoAreaConfig"]) if obj.get("geoAreaConfig") is not None else None, + "id": obj.get("id"), + "isHidden": obj.get("isHidden"), + "isNullable": obj.get("isNullable"), + "locale": obj.get("locale"), + "nullValue": obj.get("nullValue"), + "sourceColumn": obj.get("sourceColumn"), + "sourceColumnDataType": obj.get("sourceColumnDataType"), + "tags": obj.get("tags"), + "title": obj.get("title"), + "translations": [DeclarativeLabelTranslation.from_dict(_item) for _item in obj["translations"]] if obj.get("translations") is not None else None, + "valueType": obj.get("valueType") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_label_translation.py b/gooddata-api-client/gooddata_api_client/models/declarative_label_translation.py new file mode 100644 index 000000000..840b7aceb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_label_translation.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeLabelTranslation(BaseModel): + """ + A label translation. + """ # noqa: E501 + locale: StrictStr = Field(description="Translation locale.") + source_column: StrictStr = Field(description="Translation source column.", alias="sourceColumn") + __properties: ClassVar[List[str]] = ["locale", "sourceColumn"] + + 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 DeclarativeLabelTranslation 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 DeclarativeLabelTranslation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "locale": obj.get("locale"), + "sourceColumn": obj.get("sourceColumn") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_ldm.py b/gooddata-api-client/gooddata_api_client/models/declarative_ldm.py new file mode 100644 index 000000000..309d8a323 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_ldm.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.declarative_dataset import DeclarativeDataset +from gooddata_api_client.models.declarative_dataset_extension import DeclarativeDatasetExtension +from gooddata_api_client.models.declarative_date_dataset import DeclarativeDateDataset +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeLdm(BaseModel): + """ + A logical data model (LDM) representation. + """ # noqa: E501 + dataset_extensions: Optional[List[DeclarativeDatasetExtension]] = Field(default=None, description="An array containing extensions for datasets defined in parent workspaces.", alias="datasetExtensions") + datasets: Optional[List[DeclarativeDataset]] = Field(default=None, description="An array containing datasets.") + date_instances: Optional[List[DeclarativeDateDataset]] = Field(default=None, description="An array containing date-related datasets.", alias="dateInstances") + __properties: ClassVar[List[str]] = ["datasetExtensions", "datasets", "dateInstances"] + + 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 DeclarativeLdm 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 each item in dataset_extensions (list) + _items = [] + if self.dataset_extensions: + for _item_dataset_extensions in self.dataset_extensions: + if _item_dataset_extensions: + _items.append(_item_dataset_extensions.to_dict()) + _dict['datasetExtensions'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in datasets (list) + _items = [] + if self.datasets: + for _item_datasets in self.datasets: + if _item_datasets: + _items.append(_item_datasets.to_dict()) + _dict['datasets'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in date_instances (list) + _items = [] + if self.date_instances: + for _item_date_instances in self.date_instances: + if _item_date_instances: + _items.append(_item_date_instances.to_dict()) + _dict['dateInstances'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeLdm from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "datasetExtensions": [DeclarativeDatasetExtension.from_dict(_item) for _item in obj["datasetExtensions"]] if obj.get("datasetExtensions") is not None else None, + "datasets": [DeclarativeDataset.from_dict(_item) for _item in obj["datasets"]] if obj.get("datasets") is not None else None, + "dateInstances": [DeclarativeDateDataset.from_dict(_item) for _item in obj["dateInstances"]] if obj.get("dateInstances") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_memory_item.py b/gooddata-api-client/gooddata_api_client/models/declarative_memory_item.py new file mode 100644 index 000000000..eb237c69e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_memory_item.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.declarative_user_identifier import DeclarativeUserIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeMemoryItem(BaseModel): + """ + DeclarativeMemoryItem + """ # noqa: E501 + created_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + created_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="createdBy") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Memory item description.") + id: Annotated[str, Field(strict=True)] = Field(description="Memory item ID.") + instruction: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The text that will be injected into the system prompt.") + is_disabled: Optional[StrictBool] = Field(default=None, description="Whether memory item is disabled.", alias="isDisabled") + keywords: Optional[List[StrictStr]] = Field(default=None, description="Set of unique strings used for semantic similarity filtering.") + modified_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + modified_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="modifiedBy") + strategy: StrictStr = Field(description="Strategy defining when the memory item should be applied") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Memory item title.") + __properties: ClassVar[List[str]] = ["createdAt", "createdBy", "description", "id", "instruction", "isDisabled", "keywords", "modifiedAt", "modifiedBy", "strategy", "tags", "title"] + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('strategy') + def strategy_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ALWAYS', 'AUTO']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ALWAYS', 'AUTO')") + 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 DeclarativeMemoryItem 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 created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeMemoryItem 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": DeclarativeUserIdentifier.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "description": obj.get("description"), + "id": obj.get("id"), + "instruction": obj.get("instruction"), + "isDisabled": obj.get("isDisabled"), + "keywords": obj.get("keywords"), + "modifiedAt": obj.get("modifiedAt"), + "modifiedBy": DeclarativeUserIdentifier.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None, + "strategy": obj.get("strategy"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_metric.py b/gooddata-api-client/gooddata_api_client/models/declarative_metric.py new file mode 100644 index 000000000..197a8003b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_metric.py @@ -0,0 +1,206 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.declarative_user_identifier import DeclarativeUserIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeMetric(BaseModel): + """ + DeclarativeMetric + """ # noqa: E501 + certification: Optional[StrictStr] = Field(default=None, description="Certification status of the entity.") + certification_message: Optional[StrictStr] = Field(default=None, description="Optional message associated with the certification.", alias="certificationMessage") + certified_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time when the certification was set.", alias="certifiedAt") + certified_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="certifiedBy") + content: Optional[Dict[str, Any]] = Field(description="Free-form JSON object") + created_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + created_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="createdBy") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Metric description.") + id: Annotated[str, Field(strict=True)] = Field(description="Metric ID.") + is_hidden: Optional[StrictBool] = Field(default=None, description="If true, this metric is hidden from AI search results.", alias="isHidden") + is_hidden_from_kda: Optional[StrictBool] = Field(default=None, description="If true, this metric is hidden from key drive analysis.", alias="isHiddenFromKda") + modified_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + modified_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="modifiedBy") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Metric title.") + __properties: ClassVar[List[str]] = ["certification", "certificationMessage", "certifiedAt", "certifiedBy", "content", "createdAt", "createdBy", "description", "id", "isHidden", "isHiddenFromKda", "modifiedAt", "modifiedBy", "tags", "title"] + + @field_validator('certification') + def certification_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['CERTIFIED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('CERTIFIED')") + return value + + @field_validator('certified_at') + def certified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + 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 DeclarativeMetric 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 certified_by + if self.certified_by: + _dict['certifiedBy'] = self.certified_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + # set to None if certification_message (nullable) is None + # and model_fields_set contains the field + if self.certification_message is None and "certification_message" in self.model_fields_set: + _dict['certificationMessage'] = None + + # set to None if certified_at (nullable) is None + # and model_fields_set contains the field + if self.certified_at is None and "certified_at" in self.model_fields_set: + _dict['certifiedAt'] = None + + # set to None if content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeMetric from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "certification": obj.get("certification"), + "certificationMessage": obj.get("certificationMessage"), + "certifiedAt": obj.get("certifiedAt"), + "certifiedBy": DeclarativeUserIdentifier.from_dict(obj["certifiedBy"]) if obj.get("certifiedBy") is not None else None, + "content": obj.get("content"), + "createdAt": obj.get("createdAt"), + "createdBy": DeclarativeUserIdentifier.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "description": obj.get("description"), + "id": obj.get("id"), + "isHidden": obj.get("isHidden"), + "isHiddenFromKda": obj.get("isHiddenFromKda"), + "modifiedAt": obj.get("modifiedAt"), + "modifiedBy": DeclarativeUserIdentifier.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None, + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_model.py b/gooddata-api-client/gooddata_api_client/models/declarative_model.py new file mode 100644 index 000000000..38cfe93e9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_model.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.declarative_ldm import DeclarativeLdm +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeModel(BaseModel): + """ + A data model structured as a set of its attributes. + """ # noqa: E501 + ldm: Optional[DeclarativeLdm] = None + __properties: ClassVar[List[str]] = ["ldm"] + + 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 DeclarativeModel 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 ldm + if self.ldm: + _dict['ldm'] = self.ldm.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ldm": DeclarativeLdm.from_dict(obj["ldm"]) if obj.get("ldm") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_notification_channel.py b/gooddata-api-client/gooddata_api_client/models/declarative_notification_channel.py new file mode 100644 index 000000000..21ce5760e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_notification_channel.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.declarative_notification_channel_destination import DeclarativeNotificationChannelDestination +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeNotificationChannel(BaseModel): + """ + A declarative form of a particular notification channel. + """ # noqa: E501 + allowed_recipients: Optional[StrictStr] = Field(default='INTERNAL', description="Allowed recipients of notifications from this channel. CREATOR - only the creator INTERNAL - all users within the organization EXTERNAL - all recipients including those outside the organization ", alias="allowedRecipients") + custom_dashboard_url: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Custom dashboard url that is going to be used in the notification. If not specified it is going to be deduced based on the context. Allowed placeholders are: {workspaceId} {dashboardId} {automationId} {asOfDate} ", alias="customDashboardUrl") + dashboard_link_visibility: Optional[StrictStr] = Field(default='INTERNAL_ONLY', description="Dashboard link visibility in notifications. HIDDEN - the link will not be included INTERNAL_ONLY - only internal users will see the link ALL - all users will see the link ", alias="dashboardLinkVisibility") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Description of a notification channel.") + destination: Optional[DeclarativeNotificationChannelDestination] = None + destination_type: Optional[StrictStr] = Field(default=None, alias="destinationType") + id: Annotated[str, Field(strict=True)] = Field(description="Identifier of a notification channel") + in_platform_notification: Optional[StrictStr] = Field(default='DISABLED', description="In-platform notifications configuration. No effect if the destination type is IN_PLATFORM. DISABLED - in-platform notifications are not sent ENABLED - in-platform notifications are sent in addition to the regular notifications ", alias="inPlatformNotification") + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Name of a notification channel.") + notification_source: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Human-readable description of the source of the notification. If specified, this propertywill be included in the notifications to this channel.Allowed placeholders are: {{workspaceId}} {{workspaceName}} {{workspaceDescription}} {{dashboardId}} {{dashboardName}} {{dashboardDescription}} ", alias="notificationSource") + __properties: ClassVar[List[str]] = ["allowedRecipients", "customDashboardUrl", "dashboardLinkVisibility", "description", "destination", "destinationType", "id", "inPlatformNotification", "name", "notificationSource"] + + @field_validator('allowed_recipients') + def allowed_recipients_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['CREATOR', 'INTERNAL', 'EXTERNAL']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('CREATOR', 'INTERNAL', 'EXTERNAL')") + return value + + @field_validator('dashboard_link_visibility') + def dashboard_link_visibility_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['HIDDEN', 'INTERNAL_ONLY', 'ALL']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('HIDDEN', 'INTERNAL_ONLY', 'ALL')") + return value + + @field_validator('destination_type') + def destination_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['WEBHOOK', 'SMTP', 'DEFAULT_SMTP', 'IN_PLATFORM']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('WEBHOOK', 'SMTP', 'DEFAULT_SMTP', 'IN_PLATFORM')") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('in_platform_notification') + def in_platform_notification_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['DISABLED', 'ENABLED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('DISABLED', 'ENABLED')") + 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 DeclarativeNotificationChannel 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. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "destination_type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of destination + if self.destination: + _dict['destination'] = self.destination.to_dict() + # set to None if destination_type (nullable) is None + # and model_fields_set contains the field + if self.destination_type is None and "destination_type" in self.model_fields_set: + _dict['destinationType'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeNotificationChannel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowedRecipients": obj.get("allowedRecipients") if obj.get("allowedRecipients") is not None else 'INTERNAL', + "customDashboardUrl": obj.get("customDashboardUrl"), + "dashboardLinkVisibility": obj.get("dashboardLinkVisibility") if obj.get("dashboardLinkVisibility") is not None else 'INTERNAL_ONLY', + "description": obj.get("description"), + "destination": DeclarativeNotificationChannelDestination.from_dict(obj["destination"]) if obj.get("destination") is not None else None, + "destinationType": obj.get("destinationType"), + "id": obj.get("id"), + "inPlatformNotification": obj.get("inPlatformNotification") if obj.get("inPlatformNotification") is not None else 'DISABLED', + "name": obj.get("name"), + "notificationSource": obj.get("notificationSource") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_notification_channel_destination.py b/gooddata-api-client/gooddata_api_client/models/declarative_notification_channel_destination.py new file mode 100644 index 000000000..8f283d718 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_notification_channel_destination.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.default_smtp import DefaultSmtp +from gooddata_api_client.models.in_platform import InPlatform +from gooddata_api_client.models.smtp import Smtp +from gooddata_api_client.models.webhook import Webhook +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DECLARATIVENOTIFICATIONCHANNELDESTINATION_ONE_OF_SCHEMAS = ["DefaultSmtp", "InPlatform", "Smtp", "Webhook"] + +class DeclarativeNotificationChannelDestination(BaseModel): + """ + DeclarativeNotificationChannelDestination + """ + # data type: DefaultSmtp + oneof_schema_1_validator: Optional[DefaultSmtp] = None + # data type: InPlatform + oneof_schema_2_validator: Optional[InPlatform] = None + # data type: Smtp + oneof_schema_3_validator: Optional[Smtp] = None + # data type: Webhook + oneof_schema_4_validator: Optional[Webhook] = None + actual_instance: Optional[Union[DefaultSmtp, InPlatform, Smtp, Webhook]] = None + one_of_schemas: Set[str] = { "DefaultSmtp", "InPlatform", "Smtp", "Webhook" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = DeclarativeNotificationChannelDestination.model_construct() + error_messages = [] + match = 0 + # validate data type: DefaultSmtp + if not isinstance(v, DefaultSmtp): + error_messages.append(f"Error! Input type `{type(v)}` is not `DefaultSmtp`") + else: + match += 1 + # validate data type: InPlatform + if not isinstance(v, InPlatform): + error_messages.append(f"Error! Input type `{type(v)}` is not `InPlatform`") + else: + match += 1 + # validate data type: Smtp + if not isinstance(v, Smtp): + error_messages.append(f"Error! Input type `{type(v)}` is not `Smtp`") + else: + match += 1 + # validate data type: Webhook + if not isinstance(v, Webhook): + error_messages.append(f"Error! Input type `{type(v)}` is not `Webhook`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DeclarativeNotificationChannelDestination with oneOf schemas: DefaultSmtp, InPlatform, Smtp, Webhook. 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 + + # deserialize data into DefaultSmtp + try: + if match == 0: + instance.actual_instance = DefaultSmtp.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into InPlatform + try: + if match == 0: + instance.actual_instance = InPlatform.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Smtp + try: + if match == 0: + instance.actual_instance = Smtp.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Webhook + try: + if match == 0: + instance.actual_instance = Webhook.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DeclarativeNotificationChannelDestination with oneOf schemas: DefaultSmtp, InPlatform, Smtp, Webhook. 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], DefaultSmtp, InPlatform, Smtp, Webhook]]: + """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/gooddata-api-client/gooddata_api_client/models/declarative_notification_channel_identifier.py b/gooddata-api-client/gooddata_api_client/models/declarative_notification_channel_identifier.py new file mode 100644 index 000000000..45173197c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_notification_channel_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeNotificationChannelIdentifier(BaseModel): + """ + A notification channel identifier. + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="Notification channel identifier.") + type: StrictStr = Field(description="A type.") + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['notificationChannel']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('notificationChannel')") + 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 DeclarativeNotificationChannelIdentifier 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 DeclarativeNotificationChannelIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_notification_channels.py b/gooddata-api-client/gooddata_api_client/models/declarative_notification_channels.py new file mode 100644 index 000000000..1c152464f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_notification_channels.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.declarative_notification_channel import DeclarativeNotificationChannel +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeNotificationChannels(BaseModel): + """ + Notification channels. + """ # noqa: E501 + notification_channels: List[DeclarativeNotificationChannel] = Field(alias="notificationChannels") + __properties: ClassVar[List[str]] = ["notificationChannels"] + + 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 DeclarativeNotificationChannels 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 each item in notification_channels (list) + _items = [] + if self.notification_channels: + for _item_notification_channels in self.notification_channels: + if _item_notification_channels: + _items.append(_item_notification_channels.to_dict()) + _dict['notificationChannels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeNotificationChannels from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "notificationChannels": [DeclarativeNotificationChannel.from_dict(_item) for _item in obj["notificationChannels"]] if obj.get("notificationChannels") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_organization.py b/gooddata-api-client/gooddata_api_client/models/declarative_organization.py new file mode 100644 index 000000000..8e7da66c3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_organization.py @@ -0,0 +1,192 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.declarative_custom_geo_collection import DeclarativeCustomGeoCollection +from gooddata_api_client.models.declarative_data_source import DeclarativeDataSource +from gooddata_api_client.models.declarative_export_template import DeclarativeExportTemplate +from gooddata_api_client.models.declarative_identity_provider import DeclarativeIdentityProvider +from gooddata_api_client.models.declarative_jwk import DeclarativeJwk +from gooddata_api_client.models.declarative_notification_channel import DeclarativeNotificationChannel +from gooddata_api_client.models.declarative_organization_info import DeclarativeOrganizationInfo +from gooddata_api_client.models.declarative_user import DeclarativeUser +from gooddata_api_client.models.declarative_user_group import DeclarativeUserGroup +from gooddata_api_client.models.declarative_workspace import DeclarativeWorkspace +from gooddata_api_client.models.declarative_workspace_data_filter import DeclarativeWorkspaceDataFilter +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeOrganization(BaseModel): + """ + Complete definition of an organization in a declarative form. + """ # noqa: E501 + custom_geo_collections: Optional[List[DeclarativeCustomGeoCollection]] = Field(default=None, alias="customGeoCollections") + data_sources: Optional[List[DeclarativeDataSource]] = Field(default=None, alias="dataSources") + export_templates: Optional[List[DeclarativeExportTemplate]] = Field(default=None, alias="exportTemplates") + identity_providers: Optional[List[DeclarativeIdentityProvider]] = Field(default=None, alias="identityProviders") + jwks: Optional[List[DeclarativeJwk]] = None + notification_channels: Optional[List[DeclarativeNotificationChannel]] = Field(default=None, alias="notificationChannels") + organization: DeclarativeOrganizationInfo + user_groups: Optional[List[DeclarativeUserGroup]] = Field(default=None, alias="userGroups") + users: Optional[List[DeclarativeUser]] = None + workspace_data_filters: Optional[List[DeclarativeWorkspaceDataFilter]] = Field(default=None, alias="workspaceDataFilters") + workspaces: Optional[List[DeclarativeWorkspace]] = None + __properties: ClassVar[List[str]] = ["customGeoCollections", "dataSources", "exportTemplates", "identityProviders", "jwks", "notificationChannels", "organization", "userGroups", "users", "workspaceDataFilters", "workspaces"] + + 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 DeclarativeOrganization 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 each item in custom_geo_collections (list) + _items = [] + if self.custom_geo_collections: + for _item_custom_geo_collections in self.custom_geo_collections: + if _item_custom_geo_collections: + _items.append(_item_custom_geo_collections.to_dict()) + _dict['customGeoCollections'] = _items + # 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 each item in export_templates (list) + _items = [] + if self.export_templates: + for _item_export_templates in self.export_templates: + if _item_export_templates: + _items.append(_item_export_templates.to_dict()) + _dict['exportTemplates'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in identity_providers (list) + _items = [] + if self.identity_providers: + for _item_identity_providers in self.identity_providers: + if _item_identity_providers: + _items.append(_item_identity_providers.to_dict()) + _dict['identityProviders'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in jwks (list) + _items = [] + if self.jwks: + for _item_jwks in self.jwks: + if _item_jwks: + _items.append(_item_jwks.to_dict()) + _dict['jwks'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in notification_channels (list) + _items = [] + if self.notification_channels: + for _item_notification_channels in self.notification_channels: + if _item_notification_channels: + _items.append(_item_notification_channels.to_dict()) + _dict['notificationChannels'] = _items + # override the default output from pydantic by calling `to_dict()` of organization + if self.organization: + _dict['organization'] = self.organization.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in user_groups (list) + _items = [] + if self.user_groups: + for _item_user_groups in self.user_groups: + if _item_user_groups: + _items.append(_item_user_groups.to_dict()) + _dict['userGroups'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in workspace_data_filters (list) + _items = [] + if self.workspace_data_filters: + for _item_workspace_data_filters in self.workspace_data_filters: + if _item_workspace_data_filters: + _items.append(_item_workspace_data_filters.to_dict()) + _dict['workspaceDataFilters'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in workspaces (list) + _items = [] + if self.workspaces: + for _item_workspaces in self.workspaces: + if _item_workspaces: + _items.append(_item_workspaces.to_dict()) + _dict['workspaces'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeOrganization from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customGeoCollections": [DeclarativeCustomGeoCollection.from_dict(_item) for _item in obj["customGeoCollections"]] if obj.get("customGeoCollections") is not None else None, + "dataSources": [DeclarativeDataSource.from_dict(_item) for _item in obj["dataSources"]] if obj.get("dataSources") is not None else None, + "exportTemplates": [DeclarativeExportTemplate.from_dict(_item) for _item in obj["exportTemplates"]] if obj.get("exportTemplates") is not None else None, + "identityProviders": [DeclarativeIdentityProvider.from_dict(_item) for _item in obj["identityProviders"]] if obj.get("identityProviders") is not None else None, + "jwks": [DeclarativeJwk.from_dict(_item) for _item in obj["jwks"]] if obj.get("jwks") is not None else None, + "notificationChannels": [DeclarativeNotificationChannel.from_dict(_item) for _item in obj["notificationChannels"]] if obj.get("notificationChannels") is not None else None, + "organization": DeclarativeOrganizationInfo.from_dict(obj["organization"]) if obj.get("organization") is not None else None, + "userGroups": [DeclarativeUserGroup.from_dict(_item) for _item in obj["userGroups"]] if obj.get("userGroups") is not None else None, + "users": [DeclarativeUser.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, + "workspaceDataFilters": [DeclarativeWorkspaceDataFilter.from_dict(_item) for _item in obj["workspaceDataFilters"]] if obj.get("workspaceDataFilters") is not None else None, + "workspaces": [DeclarativeWorkspace.from_dict(_item) for _item in obj["workspaces"]] if obj.get("workspaces") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_organization_info.py b/gooddata-api-client/gooddata_api_client/models/declarative_organization_info.py new file mode 100644 index 000000000..357106c6f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_organization_info.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.declarative_color_palette import DeclarativeColorPalette +from gooddata_api_client.models.declarative_csp_directive import DeclarativeCspDirective +from gooddata_api_client.models.declarative_identity_provider_identifier import DeclarativeIdentityProviderIdentifier +from gooddata_api_client.models.declarative_organization_permission import DeclarativeOrganizationPermission +from gooddata_api_client.models.declarative_setting import DeclarativeSetting +from gooddata_api_client.models.declarative_theme import DeclarativeTheme +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeOrganizationInfo(BaseModel): + """ + Information available about an organization. + """ # noqa: E501 + allowed_origins: Optional[List[StrictStr]] = Field(default=None, alias="allowedOrigins") + color_palettes: Optional[List[DeclarativeColorPalette]] = Field(default=None, description="A list of color palettes.", alias="colorPalettes") + csp_directives: Optional[List[DeclarativeCspDirective]] = Field(default=None, description="A list of CSP directives.", alias="cspDirectives") + early_access: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Early access defined on level Organization", alias="earlyAccess") + early_access_values: Optional[List[Annotated[str, Field(strict=True, max_length=255)]]] = Field(default=None, description="Early access defined on level Organization", alias="earlyAccessValues") + hostname: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Formal hostname used in deployment.") + id: Annotated[str, Field(strict=True)] = Field(description="Identifier of the organization.") + identity_provider: Optional[DeclarativeIdentityProviderIdentifier] = Field(default=None, alias="identityProvider") + name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Formal name of the organization.") + permissions: List[DeclarativeOrganizationPermission] + settings: Optional[List[DeclarativeSetting]] = Field(default=None, description="A list of organization settings.") + themes: Optional[List[DeclarativeTheme]] = Field(default=None, description="A list of themes.") + __properties: ClassVar[List[str]] = ["allowedOrigins", "colorPalettes", "cspDirectives", "earlyAccess", "earlyAccessValues", "hostname", "id", "identityProvider", "name", "permissions", "settings", "themes"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeOrganizationInfo 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 each item in color_palettes (list) + _items = [] + if self.color_palettes: + for _item_color_palettes in self.color_palettes: + if _item_color_palettes: + _items.append(_item_color_palettes.to_dict()) + _dict['colorPalettes'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in csp_directives (list) + _items = [] + if self.csp_directives: + for _item_csp_directives in self.csp_directives: + if _item_csp_directives: + _items.append(_item_csp_directives.to_dict()) + _dict['cspDirectives'] = _items + # override the default output from pydantic by calling `to_dict()` of identity_provider + if self.identity_provider: + _dict['identityProvider'] = self.identity_provider.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in settings (list) + _items = [] + if self.settings: + for _item_settings in self.settings: + if _item_settings: + _items.append(_item_settings.to_dict()) + _dict['settings'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in themes (list) + _items = [] + if self.themes: + for _item_themes in self.themes: + if _item_themes: + _items.append(_item_themes.to_dict()) + _dict['themes'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeOrganizationInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowedOrigins": obj.get("allowedOrigins"), + "colorPalettes": [DeclarativeColorPalette.from_dict(_item) for _item in obj["colorPalettes"]] if obj.get("colorPalettes") is not None else None, + "cspDirectives": [DeclarativeCspDirective.from_dict(_item) for _item in obj["cspDirectives"]] if obj.get("cspDirectives") is not None else None, + "earlyAccess": obj.get("earlyAccess"), + "earlyAccessValues": obj.get("earlyAccessValues"), + "hostname": obj.get("hostname"), + "id": obj.get("id"), + "identityProvider": DeclarativeIdentityProviderIdentifier.from_dict(obj["identityProvider"]) if obj.get("identityProvider") is not None else None, + "name": obj.get("name"), + "permissions": [DeclarativeOrganizationPermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None, + "settings": [DeclarativeSetting.from_dict(_item) for _item in obj["settings"]] if obj.get("settings") is not None else None, + "themes": [DeclarativeTheme.from_dict(_item) for _item in obj["themes"]] if obj.get("themes") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_organization_permission.py b/gooddata-api-client/gooddata_api_client/models/declarative_organization_permission.py new file mode 100644 index 000000000..ddb948c44 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_organization_permission.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.assignee_identifier import AssigneeIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeOrganizationPermission(BaseModel): + """ + Definition of an organization permission assigned to a user/user-group. + """ # noqa: E501 + assignee: AssigneeIdentifier + name: StrictStr = Field(description="Permission name.") + __properties: ClassVar[List[str]] = ["assignee", "name"] + + @field_validator('name') + def name_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['MANAGE', 'SELF_CREATE_TOKEN', 'BASE_UI_ACCESS']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MANAGE', 'SELF_CREATE_TOKEN', 'BASE_UI_ACCESS')") + 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 DeclarativeOrganizationPermission 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 assignee + if self.assignee: + _dict['assignee'] = self.assignee.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeOrganizationPermission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assignee": AssigneeIdentifier.from_dict(obj["assignee"]) if obj.get("assignee") is not None else None, + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_reference.py b/gooddata-api-client/gooddata_api_client/models/declarative_reference.py new file mode 100644 index 000000000..66eb4bf2f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_reference.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.declarative_reference_source import DeclarativeReferenceSource +from gooddata_api_client.models.reference_identifier import ReferenceIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeReference(BaseModel): + """ + A dataset reference. + """ # noqa: E501 + identifier: ReferenceIdentifier + multivalue: StrictBool = Field(description="The multi-value flag enables many-to-many cardinality for references.") + source_column_data_types: Optional[List[StrictStr]] = Field(default=None, description="An array of source column data types for a given reference. Deprecated, use 'sources' instead.", alias="sourceColumnDataTypes") + source_columns: Optional[List[StrictStr]] = Field(default=None, description="An array of source column names for a given reference. Deprecated, use 'sources' instead.", alias="sourceColumns") + sources: Optional[List[DeclarativeReferenceSource]] = Field(default=None, description="An array of source columns for a given reference.") + __properties: ClassVar[List[str]] = ["identifier", "multivalue", "sourceColumnDataTypes", "sourceColumns", "sources"] + + @field_validator('source_column_data_types') + def source_column_data_types_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + raise ValueError("each list item must be one of ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 DeclarativeReference 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 identifier + if self.identifier: + _dict['identifier'] = self.identifier.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in sources (list) + _items = [] + if self.sources: + for _item_sources in self.sources: + if _item_sources: + _items.append(_item_sources.to_dict()) + _dict['sources'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeReference from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": ReferenceIdentifier.from_dict(obj["identifier"]) if obj.get("identifier") is not None else None, + "multivalue": obj.get("multivalue"), + "sourceColumnDataTypes": obj.get("sourceColumnDataTypes"), + "sourceColumns": obj.get("sourceColumns"), + "sources": [DeclarativeReferenceSource.from_dict(_item) for _item in obj["sources"]] if obj.get("sources") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_reference_source.py b/gooddata-api-client/gooddata_api_client/models/declarative_reference_source.py new file mode 100644 index 000000000..c4f0a1c29 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_reference_source.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.grain_identifier import GrainIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeReferenceSource(BaseModel): + """ + A dataset reference source column description. + """ # noqa: E501 + column: Annotated[str, Field(strict=True, max_length=255)] = Field(description="A name of the source column in the table.") + data_type: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="A type of the source column.", alias="dataType") + is_nullable: Optional[StrictBool] = Field(default=None, description="Flag indicating whether the associated source column allows null values.", alias="isNullable") + null_value: Optional[StrictStr] = Field(default=None, description="Value used in coalesce during joins instead of null.", alias="nullValue") + target: GrainIdentifier + __properties: ClassVar[List[str]] = ["column", "dataType", "isNullable", "nullValue", "target"] + + @field_validator('data_type') + def data_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 DeclarativeReferenceSource 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 target + if self.target: + _dict['target'] = self.target.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeReferenceSource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "column": obj.get("column"), + "dataType": obj.get("dataType"), + "isNullable": obj.get("isNullable"), + "nullValue": obj.get("nullValue"), + "target": GrainIdentifier.from_dict(obj["target"]) if obj.get("target") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_rsa_specification.py b/gooddata-api-client/gooddata_api_client/models/declarative_rsa_specification.py new file mode 100644 index 000000000..f98ec876d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_rsa_specification.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 DeclarativeRsaSpecification(BaseModel): + """ + Declarative specification of the cryptographic key. + """ # noqa: E501 + alg: StrictStr = Field(description="Algorithm intended for use with the key.") + e: StrictStr = Field(description="parameter contains the exponent value for the RSA public key.") + kid: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Parameter is used to match a specific key.") + kty: StrictStr = Field(description="Key type parameter") + n: StrictStr = Field(description="Parameter contains the modulus value for the RSA public key.") + use: StrictStr = Field(description="Parameter identifies the intended use of the public key.") + x5c: Optional[List[StrictStr]] = Field(default=None, description="Parameter contains a chain of one or more PKIX certificates.") + x5t: Optional[StrictStr] = Field(default=None, description="Parameter is a base64url-encoded SHA-1 thumbprint of the DER encoding of an X.509 certificate.") + __properties: ClassVar[List[str]] = ["alg", "e", "kid", "kty", "n", "use", "x5c", "x5t"] + + @field_validator('alg') + def alg_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['RS256', 'RS384', 'RS512']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('RS256', 'RS384', 'RS512')") + return value + + @field_validator('kid') + def kid_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[^.]", value): + raise ValueError(r"must validate the regular expression /^[^.]/") + return value + + @field_validator('kty') + def kty_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['RSA']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('RSA')") + return value + + @field_validator('use') + def use_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['sig']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('sig')") + 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 DeclarativeRsaSpecification 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 DeclarativeRsaSpecification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alg": obj.get("alg"), + "e": obj.get("e"), + "kid": obj.get("kid"), + "kty": obj.get("kty"), + "n": obj.get("n"), + "use": obj.get("use"), + "x5c": obj.get("x5c"), + "x5t": obj.get("x5t") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_setting.py b/gooddata-api-client/gooddata_api_client/models/declarative_setting.py new file mode 100644 index 000000000..5d85c9992 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_setting.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 DeclarativeSetting(BaseModel): + """ + Setting and its value. + """ # noqa: E501 + content: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + id: Annotated[str, Field(strict=True)] = Field(description="Setting ID.") + type: Optional[StrictStr] = Field(default=None, description="Type of the setting.") + __properties: ClassVar[List[str]] = ["content", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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(['TIMEZONE', 'ACTIVE_THEME', 'ACTIVE_COLOR_PALETTE', 'ACTIVE_LLM_ENDPOINT', 'ACTIVE_LLM_PROVIDER', 'ACTIVE_CALENDARS', 'WHITE_LABELING', 'LOCALE', 'METADATA_LOCALE', 'FORMAT_LOCALE', 'MAPBOX_TOKEN', 'AG_GRID_TOKEN', 'WEEK_START', 'FISCAL_YEAR', 'SHOW_HIDDEN_CATALOG_ITEMS', 'OPERATOR_OVERRIDES', 'TIMEZONE_VALIDATION_ENABLED', 'OPENAI_CONFIG', 'ENABLE_FILE_ANALYTICS', 'ALERT', 'SEPARATORS', 'DATE_FILTER_CONFIG', 'JIT_PROVISIONING', 'JWT_JIT_PROVISIONING', 'DASHBOARD_FILTERS_APPLY_MODE', 'ENABLE_SLIDES_EXPORT', 'ENABLE_SNAPSHOT_EXPORT', 'AI_RATE_LIMIT', 'ATTACHMENT_SIZE_LIMIT', 'ATTACHMENT_LINK_TTL', 'AD_CATALOG_GROUPS_DEFAULT_EXPAND_STATE', 'ENABLE_DRILL_TO_URL_BY_DEFAULT', 'ALLOW_UNSAFE_FLEX_CONNECT_ENDPOINTS', 'ENABLE_AUTOMATION_EVALUATION_MODE', 'ENABLE_ACCESSIBILITY_MODE', 'REGISTERED_PLUGGABLE_APPLICATIONS', 'DATA_LOCALE', 'LDM_DEFAULT_LOCALE', 'EXPORT_RESULT_POLLING_TIMEOUT_SECONDS', 'MAX_ZOOM_LEVEL', 'SORT_CASE_SENSITIVE', 'METRIC_FORMAT_OVERRIDE', 'ENABLE_AI_ON_DATA', 'API_ENTITIES_DEFAULT_CONTENT_MEDIA_TYPE', 'ENABLE_NULL_JOINS', 'EXPORT_CSV_CUSTOM_DELIMITER', 'ENABLE_QUERY_TAGS', 'RESTRICT_BASE_UI', 'CERTIFY_PARENT_OBJECTS']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('TIMEZONE', 'ACTIVE_THEME', 'ACTIVE_COLOR_PALETTE', 'ACTIVE_LLM_ENDPOINT', 'ACTIVE_LLM_PROVIDER', 'ACTIVE_CALENDARS', 'WHITE_LABELING', 'LOCALE', 'METADATA_LOCALE', 'FORMAT_LOCALE', 'MAPBOX_TOKEN', 'AG_GRID_TOKEN', 'WEEK_START', 'FISCAL_YEAR', 'SHOW_HIDDEN_CATALOG_ITEMS', 'OPERATOR_OVERRIDES', 'TIMEZONE_VALIDATION_ENABLED', 'OPENAI_CONFIG', 'ENABLE_FILE_ANALYTICS', 'ALERT', 'SEPARATORS', 'DATE_FILTER_CONFIG', 'JIT_PROVISIONING', 'JWT_JIT_PROVISIONING', 'DASHBOARD_FILTERS_APPLY_MODE', 'ENABLE_SLIDES_EXPORT', 'ENABLE_SNAPSHOT_EXPORT', 'AI_RATE_LIMIT', 'ATTACHMENT_SIZE_LIMIT', 'ATTACHMENT_LINK_TTL', 'AD_CATALOG_GROUPS_DEFAULT_EXPAND_STATE', 'ENABLE_DRILL_TO_URL_BY_DEFAULT', 'ALLOW_UNSAFE_FLEX_CONNECT_ENDPOINTS', 'ENABLE_AUTOMATION_EVALUATION_MODE', 'ENABLE_ACCESSIBILITY_MODE', 'REGISTERED_PLUGGABLE_APPLICATIONS', 'DATA_LOCALE', 'LDM_DEFAULT_LOCALE', 'EXPORT_RESULT_POLLING_TIMEOUT_SECONDS', 'MAX_ZOOM_LEVEL', 'SORT_CASE_SENSITIVE', 'METRIC_FORMAT_OVERRIDE', 'ENABLE_AI_ON_DATA', 'API_ENTITIES_DEFAULT_CONTENT_MEDIA_TYPE', 'ENABLE_NULL_JOINS', 'EXPORT_CSV_CUSTOM_DELIMITER', 'ENABLE_QUERY_TAGS', 'RESTRICT_BASE_UI', 'CERTIFY_PARENT_OBJECTS')") + 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 DeclarativeSetting 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 content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeSetting from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_single_workspace_permission.py b/gooddata-api-client/gooddata_api_client/models/declarative_single_workspace_permission.py new file mode 100644 index 000000000..4c6f9c362 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_single_workspace_permission.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.assignee_identifier import AssigneeIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeSingleWorkspacePermission(BaseModel): + """ + DeclarativeSingleWorkspacePermission + """ # noqa: E501 + assignee: AssigneeIdentifier + name: StrictStr = Field(description="Permission name.") + __properties: ClassVar[List[str]] = ["assignee", "name"] + + @field_validator('name') + def name_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['MANAGE', 'ANALYZE', 'EXPORT', 'EXPORT_TABULAR', 'EXPORT_PDF', 'CREATE_AUTOMATION', 'USE_AI_ASSISTANT', 'WRITE_KNOWLEDGE_DOCUMENTS', 'READ_KNOWLEDGE_DOCUMENTS', 'CREATE_FILTER_VIEW', 'VIEW']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MANAGE', 'ANALYZE', 'EXPORT', 'EXPORT_TABULAR', 'EXPORT_PDF', 'CREATE_AUTOMATION', 'USE_AI_ASSISTANT', 'WRITE_KNOWLEDGE_DOCUMENTS', 'READ_KNOWLEDGE_DOCUMENTS', 'CREATE_FILTER_VIEW', 'VIEW')") + 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 DeclarativeSingleWorkspacePermission 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 assignee + if self.assignee: + _dict['assignee'] = self.assignee.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeSingleWorkspacePermission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assignee": AssigneeIdentifier.from_dict(obj["assignee"]) if obj.get("assignee") is not None else None, + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_source_fact_reference.py b/gooddata-api-client/gooddata_api_client/models/declarative_source_fact_reference.py new file mode 100644 index 000000000..c539306e8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_source_fact_reference.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.fact_identifier import FactIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeSourceFactReference(BaseModel): + """ + Aggregated awareness source fact reference. + """ # noqa: E501 + operation: StrictStr = Field(description="Aggregation operation.") + reference: FactIdentifier + __properties: ClassVar[List[str]] = ["operation", "reference"] + + @field_validator('operation') + def operation_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['SUM', 'MIN', 'MAX']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SUM', 'MIN', 'MAX')") + 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 DeclarativeSourceFactReference 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 reference + if self.reference: + _dict['reference'] = self.reference.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeSourceFactReference from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "operation": obj.get("operation"), + "reference": FactIdentifier.from_dict(obj["reference"]) if obj.get("reference") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_table.py b/gooddata-api-client/gooddata_api_client/models/declarative_table.py new file mode 100644 index 000000000..aa9f534ca --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_table.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.declarative_column import DeclarativeColumn +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeTable(BaseModel): + """ + A database table. + """ # noqa: E501 + columns: List[DeclarativeColumn] = Field(description="An array of physical columns") + id: Annotated[str, Field(strict=True)] = Field(description="Table id.") + name_prefix: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Table or view name prefix used in scan. Will be stripped when generating LDM.", alias="namePrefix") + path: List[StrictStr] = Field(description="Path to table.") + type: StrictStr = Field(description="Table type: TABLE or VIEW.") + __properties: ClassVar[List[str]] = ["columns", "id", "namePrefix", "path", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeTable 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 each item in columns (list) + _items = [] + if self.columns: + for _item_columns in self.columns: + if _item_columns: + _items.append(_item_columns.to_dict()) + _dict['columns'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeTable from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "columns": [DeclarativeColumn.from_dict(_item) for _item in obj["columns"]] if obj.get("columns") is not None else None, + "id": obj.get("id"), + "namePrefix": obj.get("namePrefix"), + "path": obj.get("path"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_tables.py b/gooddata-api-client/gooddata_api_client/models/declarative_tables.py new file mode 100644 index 000000000..793faa248 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_tables.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.declarative_table import DeclarativeTable +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeTables(BaseModel): + """ + A physical data model (PDM) tables. + """ # noqa: E501 + tables: List[DeclarativeTable] = Field(description="An array of physical database tables.") + __properties: ClassVar[List[str]] = ["tables"] + + 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 DeclarativeTables 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 each item in tables (list) + _items = [] + if self.tables: + for _item_tables in self.tables: + if _item_tables: + _items.append(_item_tables.to_dict()) + _dict['tables'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeTables from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tables": [DeclarativeTable.from_dict(_item) for _item in obj["tables"]] if obj.get("tables") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_theme.py b/gooddata-api-client/gooddata_api_client/models/declarative_theme.py new file mode 100644 index 000000000..a47b1c6c5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_theme.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeTheme(BaseModel): + """ + Theme and its properties. + """ # noqa: E501 + content: Optional[Dict[str, Any]] = Field(description="Free-form JSON object") + id: StrictStr + name: Annotated[str, Field(strict=True, max_length=255)] + __properties: ClassVar[List[str]] = ["content", "id", "name"] + + 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 DeclarativeTheme 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 content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeTheme from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "id": obj.get("id"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_user.py b/gooddata-api-client/gooddata_api_client/models/declarative_user.py new file mode 100644 index 000000000..8143525e1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_user.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.declarative_setting import DeclarativeSetting +from gooddata_api_client.models.declarative_user_group_identifier import DeclarativeUserGroupIdentifier +from gooddata_api_client.models.declarative_user_permission import DeclarativeUserPermission +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeUser(BaseModel): + """ + A user and its properties + """ # noqa: E501 + auth_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="User identification in the authentication manager.", alias="authId") + email: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="User email address") + firstname: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="User first name") + id: Annotated[str, Field(strict=True)] = Field(description="User identifier.") + lastname: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="User last name") + permissions: Optional[List[DeclarativeUserPermission]] = None + settings: Optional[List[DeclarativeSetting]] = Field(default=None, description="A list of user settings.") + user_groups: Optional[List[DeclarativeUserGroupIdentifier]] = Field(default=None, alias="userGroups") + __properties: ClassVar[List[str]] = ["authId", "email", "firstname", "id", "lastname", "permissions", "settings", "userGroups"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeUser 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 each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in settings (list) + _items = [] + if self.settings: + for _item_settings in self.settings: + if _item_settings: + _items.append(_item_settings.to_dict()) + _dict['settings'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in user_groups (list) + _items = [] + if self.user_groups: + for _item_user_groups in self.user_groups: + if _item_user_groups: + _items.append(_item_user_groups.to_dict()) + _dict['userGroups'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authId": obj.get("authId"), + "email": obj.get("email"), + "firstname": obj.get("firstname"), + "id": obj.get("id"), + "lastname": obj.get("lastname"), + "permissions": [DeclarativeUserPermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None, + "settings": [DeclarativeSetting.from_dict(_item) for _item in obj["settings"]] if obj.get("settings") is not None else None, + "userGroups": [DeclarativeUserGroupIdentifier.from_dict(_item) for _item in obj["userGroups"]] if obj.get("userGroups") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_user_data_filter.py b/gooddata-api-client/gooddata_api_client/models/declarative_user_data_filter.py new file mode 100644 index 000000000..2b55138a6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_user_data_filter.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.declarative_user_group_identifier import DeclarativeUserGroupIdentifier +from gooddata_api_client.models.declarative_user_identifier import DeclarativeUserIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeUserDataFilter(BaseModel): + """ + User Data Filters serving the filtering of what data users can see in workspaces. + """ # noqa: E501 + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="User Data Filters setting description.") + id: Annotated[str, Field(strict=True)] = Field(description="User Data Filters ID. This ID is further used to refer to this instance.") + maql: Annotated[str, Field(strict=True, max_length=10000)] = Field(description="Expression in MAQL specifying the User Data Filter") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="User Data Filters setting title.") + user: Optional[DeclarativeUserIdentifier] = None + user_group: Optional[DeclarativeUserGroupIdentifier] = Field(default=None, alias="userGroup") + __properties: ClassVar[List[str]] = ["description", "id", "maql", "tags", "title", "user", "userGroup"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeUserDataFilter 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 user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_group + if self.user_group: + _dict['userGroup'] = self.user_group.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeUserDataFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "id": obj.get("id"), + "maql": obj.get("maql"), + "tags": obj.get("tags"), + "title": obj.get("title"), + "user": DeclarativeUserIdentifier.from_dict(obj["user"]) if obj.get("user") is not None else None, + "userGroup": DeclarativeUserGroupIdentifier.from_dict(obj["userGroup"]) if obj.get("userGroup") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_user_data_filters.py b/gooddata-api-client/gooddata_api_client/models/declarative_user_data_filters.py new file mode 100644 index 000000000..f51158aee --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_user_data_filters.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.declarative_user_data_filter import DeclarativeUserDataFilter +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeUserDataFilters(BaseModel): + """ + Declarative form of user data filters. + """ # noqa: E501 + user_data_filters: List[DeclarativeUserDataFilter] = Field(alias="userDataFilters") + __properties: ClassVar[List[str]] = ["userDataFilters"] + + 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 DeclarativeUserDataFilters 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 each item in user_data_filters (list) + _items = [] + if self.user_data_filters: + for _item_user_data_filters in self.user_data_filters: + if _item_user_data_filters: + _items.append(_item_user_data_filters.to_dict()) + _dict['userDataFilters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeUserDataFilters from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userDataFilters": [DeclarativeUserDataFilter.from_dict(_item) for _item in obj["userDataFilters"]] if obj.get("userDataFilters") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_user_group.py b/gooddata-api-client/gooddata_api_client/models/declarative_user_group.py new file mode 100644 index 000000000..c1332b02d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_user_group.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.declarative_user_group_identifier import DeclarativeUserGroupIdentifier +from gooddata_api_client.models.declarative_user_group_permission import DeclarativeUserGroupPermission +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeUserGroup(BaseModel): + """ + A user-group and its properties + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="UserGroup identifier.") + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Name of UserGroup") + parents: Optional[List[DeclarativeUserGroupIdentifier]] = None + permissions: Optional[List[DeclarativeUserGroupPermission]] = None + __properties: ClassVar[List[str]] = ["id", "name", "parents", "permissions"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeUserGroup 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 each item in parents (list) + _items = [] + if self.parents: + for _item_parents in self.parents: + if _item_parents: + _items.append(_item_parents.to_dict()) + _dict['parents'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeUserGroup 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"), + "parents": [DeclarativeUserGroupIdentifier.from_dict(_item) for _item in obj["parents"]] if obj.get("parents") is not None else None, + "permissions": [DeclarativeUserGroupPermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_user_group_identifier.py b/gooddata-api-client/gooddata_api_client/models/declarative_user_group_identifier.py new file mode 100644 index 000000000..2a155247f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_user_group_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeUserGroupIdentifier(BaseModel): + """ + A user group identifier. + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="Identifier of the user group.") + type: StrictStr = Field(description="A type.") + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userGroup']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userGroup')") + 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 DeclarativeUserGroupIdentifier 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 DeclarativeUserGroupIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_user_group_permission.py b/gooddata-api-client/gooddata_api_client/models/declarative_user_group_permission.py new file mode 100644 index 000000000..24fd8a656 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_user_group_permission.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.assignee_identifier import AssigneeIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeUserGroupPermission(BaseModel): + """ + Definition of a user-group permission assigned to a user/user-group. + """ # noqa: E501 + assignee: AssigneeIdentifier + name: StrictStr = Field(description="Permission name.") + __properties: ClassVar[List[str]] = ["assignee", "name"] + + @field_validator('name') + def name_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['SEE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SEE')") + 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 DeclarativeUserGroupPermission 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 assignee + if self.assignee: + _dict['assignee'] = self.assignee.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeUserGroupPermission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assignee": AssigneeIdentifier.from_dict(obj["assignee"]) if obj.get("assignee") is not None else None, + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_user_group_permissions.py b/gooddata-api-client/gooddata_api_client/models/declarative_user_group_permissions.py new file mode 100644 index 000000000..3fbfa6a09 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_user_group_permissions.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.declarative_user_group_permission import DeclarativeUserGroupPermission +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeUserGroupPermissions(BaseModel): + """ + Definition of permissions associated with a user-group. + """ # noqa: E501 + permissions: Optional[List[DeclarativeUserGroupPermission]] = None + __properties: ClassVar[List[str]] = ["permissions"] + + 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 DeclarativeUserGroupPermissions 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 each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeUserGroupPermissions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "permissions": [DeclarativeUserGroupPermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_user_groups.py b/gooddata-api-client/gooddata_api_client/models/declarative_user_groups.py new file mode 100644 index 000000000..b9fa1ff6e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_user_groups.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.declarative_user_group import DeclarativeUserGroup +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeUserGroups(BaseModel): + """ + Declarative form of userGroups and its properties. + """ # noqa: E501 + user_groups: List[DeclarativeUserGroup] = Field(alias="userGroups") + __properties: ClassVar[List[str]] = ["userGroups"] + + 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 DeclarativeUserGroups 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 each item in user_groups (list) + _items = [] + if self.user_groups: + for _item_user_groups in self.user_groups: + if _item_user_groups: + _items.append(_item_user_groups.to_dict()) + _dict['userGroups'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeUserGroups from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userGroups": [DeclarativeUserGroup.from_dict(_item) for _item in obj["userGroups"]] if obj.get("userGroups") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_user_identifier.py b/gooddata-api-client/gooddata_api_client/models/declarative_user_identifier.py new file mode 100644 index 000000000..b066a28a4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_user_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeUserIdentifier(BaseModel): + """ + A user identifier. + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="User identifier.") + type: StrictStr = Field(description="A type.") + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('user')") + 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 DeclarativeUserIdentifier 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 DeclarativeUserIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_user_permission.py b/gooddata-api-client/gooddata_api_client/models/declarative_user_permission.py new file mode 100644 index 000000000..1202dbdd3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_user_permission.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.assignee_identifier import AssigneeIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeUserPermission(BaseModel): + """ + Definition of a user permission assigned to a user/user-group. + """ # noqa: E501 + assignee: AssigneeIdentifier + name: StrictStr = Field(description="Permission name.") + __properties: ClassVar[List[str]] = ["assignee", "name"] + + @field_validator('name') + def name_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['SEE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SEE')") + 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 DeclarativeUserPermission 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 assignee + if self.assignee: + _dict['assignee'] = self.assignee.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeUserPermission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assignee": AssigneeIdentifier.from_dict(obj["assignee"]) if obj.get("assignee") is not None else None, + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_user_permissions.py b/gooddata-api-client/gooddata_api_client/models/declarative_user_permissions.py new file mode 100644 index 000000000..fb53ca81c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_user_permissions.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.declarative_user_permission import DeclarativeUserPermission +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeUserPermissions(BaseModel): + """ + Definition of permissions associated with a user. + """ # noqa: E501 + permissions: Optional[List[DeclarativeUserPermission]] = None + __properties: ClassVar[List[str]] = ["permissions"] + + 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 DeclarativeUserPermissions 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 each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeUserPermissions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "permissions": [DeclarativeUserPermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_users.py b/gooddata-api-client/gooddata_api_client/models/declarative_users.py new file mode 100644 index 000000000..a708f7497 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_users.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.declarative_user import DeclarativeUser +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeUsers(BaseModel): + """ + Declarative form of users and its properties. + """ # noqa: E501 + users: List[DeclarativeUser] + __properties: ClassVar[List[str]] = ["users"] + + 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 DeclarativeUsers 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 each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeUsers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "users": [DeclarativeUser.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_users_user_groups.py b/gooddata-api-client/gooddata_api_client/models/declarative_users_user_groups.py new file mode 100644 index 000000000..87a11b684 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_users_user_groups.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.declarative_user import DeclarativeUser +from gooddata_api_client.models.declarative_user_group import DeclarativeUserGroup +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeUsersUserGroups(BaseModel): + """ + Declarative form of both users and user groups and theirs properties. + """ # noqa: E501 + user_groups: List[DeclarativeUserGroup] = Field(alias="userGroups") + users: List[DeclarativeUser] + __properties: ClassVar[List[str]] = ["userGroups", "users"] + + 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 DeclarativeUsersUserGroups 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 each item in user_groups (list) + _items = [] + if self.user_groups: + for _item_user_groups in self.user_groups: + if _item_user_groups: + _items.append(_item_user_groups.to_dict()) + _dict['userGroups'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeUsersUserGroups from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userGroups": [DeclarativeUserGroup.from_dict(_item) for _item in obj["userGroups"]] if obj.get("userGroups") is not None else None, + "users": [DeclarativeUser.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_visualization_object.py b/gooddata-api-client/gooddata_api_client/models/declarative_visualization_object.py new file mode 100644 index 000000000..2458e3746 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_visualization_object.py @@ -0,0 +1,204 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.declarative_user_identifier import DeclarativeUserIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeVisualizationObject(BaseModel): + """ + DeclarativeVisualizationObject + """ # noqa: E501 + certification: Optional[StrictStr] = Field(default=None, description="Certification status of the entity.") + certification_message: Optional[StrictStr] = Field(default=None, description="Optional message associated with the certification.", alias="certificationMessage") + certified_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time when the certification was set.", alias="certifiedAt") + certified_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="certifiedBy") + content: Optional[Dict[str, Any]] = Field(description="Free-form JSON object") + created_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + created_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="createdBy") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Visualization object description.") + id: Annotated[str, Field(strict=True)] = Field(description="Visualization object ID.") + is_hidden: Optional[StrictBool] = Field(default=None, description="If true, this visualization object is hidden from AI search results.", alias="isHidden") + modified_at: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + modified_by: Optional[DeclarativeUserIdentifier] = Field(default=None, alias="modifiedBy") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of tags.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Visualization object title.") + __properties: ClassVar[List[str]] = ["certification", "certificationMessage", "certifiedAt", "certifiedBy", "content", "createdAt", "createdBy", "description", "id", "isHidden", "modifiedAt", "modifiedBy", "tags", "title"] + + @field_validator('certification') + def certification_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['CERTIFIED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('CERTIFIED')") + return value + + @field_validator('certified_at') + def certified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + 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 DeclarativeVisualizationObject 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 certified_by + if self.certified_by: + _dict['certifiedBy'] = self.certified_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + # set to None if certification_message (nullable) is None + # and model_fields_set contains the field + if self.certification_message is None and "certification_message" in self.model_fields_set: + _dict['certificationMessage'] = None + + # set to None if certified_at (nullable) is None + # and model_fields_set contains the field + if self.certified_at is None and "certified_at" in self.model_fields_set: + _dict['certifiedAt'] = None + + # set to None if content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeVisualizationObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "certification": obj.get("certification"), + "certificationMessage": obj.get("certificationMessage"), + "certifiedAt": obj.get("certifiedAt"), + "certifiedBy": DeclarativeUserIdentifier.from_dict(obj["certifiedBy"]) if obj.get("certifiedBy") is not None else None, + "content": obj.get("content"), + "createdAt": obj.get("createdAt"), + "createdBy": DeclarativeUserIdentifier.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "description": obj.get("description"), + "id": obj.get("id"), + "isHidden": obj.get("isHidden"), + "modifiedAt": obj.get("modifiedAt"), + "modifiedBy": DeclarativeUserIdentifier.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None, + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_workspace.py b/gooddata-api-client/gooddata_api_client/models/declarative_workspace.py new file mode 100644 index 000000000..d28dd04b5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_workspace.py @@ -0,0 +1,206 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.declarative_automation import DeclarativeAutomation +from gooddata_api_client.models.declarative_custom_application_setting import DeclarativeCustomApplicationSetting +from gooddata_api_client.models.declarative_filter_view import DeclarativeFilterView +from gooddata_api_client.models.declarative_setting import DeclarativeSetting +from gooddata_api_client.models.declarative_single_workspace_permission import DeclarativeSingleWorkspacePermission +from gooddata_api_client.models.declarative_user_data_filter import DeclarativeUserDataFilter +from gooddata_api_client.models.declarative_workspace_hierarchy_permission import DeclarativeWorkspaceHierarchyPermission +from gooddata_api_client.models.declarative_workspace_model import DeclarativeWorkspaceModel +from gooddata_api_client.models.workspace_data_source import WorkspaceDataSource +from gooddata_api_client.models.workspace_identifier import WorkspaceIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeWorkspace(BaseModel): + """ + A declarative form of a particular workspace. + """ # noqa: E501 + automations: Optional[List[DeclarativeAutomation]] = None + cache_extra_limit: Optional[StrictInt] = Field(default=None, description="Extra cache limit allocated to specific workspace. In case there is extra cache budget setup for organization, it can be split between multiple workspaces.", alias="cacheExtraLimit") + custom_application_settings: Optional[List[DeclarativeCustomApplicationSetting]] = Field(default=None, description="A list of workspace custom settings.", alias="customApplicationSettings") + data_source: Optional[WorkspaceDataSource] = Field(default=None, alias="dataSource") + description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Description of the workspace") + early_access: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Early access defined on level Workspace", alias="earlyAccess") + early_access_values: Optional[List[Annotated[str, Field(strict=True, max_length=255)]]] = Field(default=None, description="Early access defined on level Workspace", alias="earlyAccessValues") + filter_views: Optional[List[DeclarativeFilterView]] = Field(default=None, alias="filterViews") + hierarchy_permissions: Optional[List[DeclarativeWorkspaceHierarchyPermission]] = Field(default=None, alias="hierarchyPermissions") + id: Annotated[str, Field(strict=True)] = Field(description="Identifier of a workspace") + model: Optional[DeclarativeWorkspaceModel] = None + name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Name of a workspace to view.") + parent: Optional[WorkspaceIdentifier] = None + permissions: Optional[List[DeclarativeSingleWorkspacePermission]] = None + prefix: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Custom prefix of entity identifiers in workspace") + settings: Optional[List[DeclarativeSetting]] = Field(default=None, description="A list of workspace settings.") + user_data_filters: Optional[List[DeclarativeUserDataFilter]] = Field(default=None, description="A list of workspace user data filters.", alias="userDataFilters") + __properties: ClassVar[List[str]] = ["automations", "cacheExtraLimit", "customApplicationSettings", "dataSource", "description", "earlyAccess", "earlyAccessValues", "filterViews", "hierarchyPermissions", "id", "model", "name", "parent", "permissions", "prefix", "settings", "userDataFilters"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('prefix') + def prefix_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeWorkspace 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 each item in automations (list) + _items = [] + if self.automations: + for _item_automations in self.automations: + if _item_automations: + _items.append(_item_automations.to_dict()) + _dict['automations'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in custom_application_settings (list) + _items = [] + if self.custom_application_settings: + for _item_custom_application_settings in self.custom_application_settings: + if _item_custom_application_settings: + _items.append(_item_custom_application_settings.to_dict()) + _dict['customApplicationSettings'] = _items + # override the default output from pydantic by calling `to_dict()` of data_source + if self.data_source: + _dict['dataSource'] = self.data_source.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filter_views (list) + _items = [] + if self.filter_views: + for _item_filter_views in self.filter_views: + if _item_filter_views: + _items.append(_item_filter_views.to_dict()) + _dict['filterViews'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in hierarchy_permissions (list) + _items = [] + if self.hierarchy_permissions: + for _item_hierarchy_permissions in self.hierarchy_permissions: + if _item_hierarchy_permissions: + _items.append(_item_hierarchy_permissions.to_dict()) + _dict['hierarchyPermissions'] = _items + # override the default output from pydantic by calling `to_dict()` of model + if self.model: + _dict['model'] = self.model.to_dict() + # override the default output from pydantic by calling `to_dict()` of parent + if self.parent: + _dict['parent'] = self.parent.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in settings (list) + _items = [] + if self.settings: + for _item_settings in self.settings: + if _item_settings: + _items.append(_item_settings.to_dict()) + _dict['settings'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in user_data_filters (list) + _items = [] + if self.user_data_filters: + for _item_user_data_filters in self.user_data_filters: + if _item_user_data_filters: + _items.append(_item_user_data_filters.to_dict()) + _dict['userDataFilters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeWorkspace from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "automations": [DeclarativeAutomation.from_dict(_item) for _item in obj["automations"]] if obj.get("automations") is not None else None, + "cacheExtraLimit": obj.get("cacheExtraLimit"), + "customApplicationSettings": [DeclarativeCustomApplicationSetting.from_dict(_item) for _item in obj["customApplicationSettings"]] if obj.get("customApplicationSettings") is not None else None, + "dataSource": WorkspaceDataSource.from_dict(obj["dataSource"]) if obj.get("dataSource") is not None else None, + "description": obj.get("description"), + "earlyAccess": obj.get("earlyAccess"), + "earlyAccessValues": obj.get("earlyAccessValues"), + "filterViews": [DeclarativeFilterView.from_dict(_item) for _item in obj["filterViews"]] if obj.get("filterViews") is not None else None, + "hierarchyPermissions": [DeclarativeWorkspaceHierarchyPermission.from_dict(_item) for _item in obj["hierarchyPermissions"]] if obj.get("hierarchyPermissions") is not None else None, + "id": obj.get("id"), + "model": DeclarativeWorkspaceModel.from_dict(obj["model"]) if obj.get("model") is not None else None, + "name": obj.get("name"), + "parent": WorkspaceIdentifier.from_dict(obj["parent"]) if obj.get("parent") is not None else None, + "permissions": [DeclarativeSingleWorkspacePermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None, + "prefix": obj.get("prefix"), + "settings": [DeclarativeSetting.from_dict(_item) for _item in obj["settings"]] if obj.get("settings") is not None else None, + "userDataFilters": [DeclarativeUserDataFilter.from_dict(_item) for _item in obj["userDataFilters"]] if obj.get("userDataFilters") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter.py b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter.py new file mode 100644 index 000000000..968055574 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.declarative_workspace_data_filter_setting import DeclarativeWorkspaceDataFilterSetting +from gooddata_api_client.models.workspace_identifier import WorkspaceIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeWorkspaceDataFilter(BaseModel): + """ + Workspace Data Filters serving the filtering of what data users can see in workspaces. + """ # noqa: E501 + column_name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Workspace Data Filters column name. Data are filtered using this physical column.", alias="columnName") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Workspace Data Filters description.") + id: Annotated[str, Field(strict=True)] = Field(description="Workspace Data Filters ID. This ID is further used to refer to this instance.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Workspace Data Filters title.") + workspace: WorkspaceIdentifier + workspace_data_filter_settings: List[DeclarativeWorkspaceDataFilterSetting] = Field(description="Filter settings specifying values of filters valid for the workspace.", alias="workspaceDataFilterSettings") + __properties: ClassVar[List[str]] = ["columnName", "description", "id", "title", "workspace", "workspaceDataFilterSettings"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeWorkspaceDataFilter 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 workspace + if self.workspace: + _dict['workspace'] = self.workspace.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in workspace_data_filter_settings (list) + _items = [] + if self.workspace_data_filter_settings: + for _item_workspace_data_filter_settings in self.workspace_data_filter_settings: + if _item_workspace_data_filter_settings: + _items.append(_item_workspace_data_filter_settings.to_dict()) + _dict['workspaceDataFilterSettings'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeWorkspaceDataFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "columnName": obj.get("columnName"), + "description": obj.get("description"), + "id": obj.get("id"), + "title": obj.get("title"), + "workspace": WorkspaceIdentifier.from_dict(obj["workspace"]) if obj.get("workspace") is not None else None, + "workspaceDataFilterSettings": [DeclarativeWorkspaceDataFilterSetting.from_dict(_item) for _item in obj["workspaceDataFilterSettings"]] if obj.get("workspaceDataFilterSettings") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter_column.py b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter_column.py new file mode 100644 index 000000000..491d7f630 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter_column.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeWorkspaceDataFilterColumn(BaseModel): + """ + DeclarativeWorkspaceDataFilterColumn + """ # noqa: E501 + data_type: StrictStr = Field(description="Data type of the column", alias="dataType") + name: StrictStr = Field(description="Name of the column") + __properties: ClassVar[List[str]] = ["dataType", "name"] + + @field_validator('data_type') + def data_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 DeclarativeWorkspaceDataFilterColumn 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 DeclarativeWorkspaceDataFilterColumn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataType": obj.get("dataType"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter_references.py b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter_references.py new file mode 100644 index 000000000..027644cf0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter_references.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.dataset_workspace_data_filter_identifier import DatasetWorkspaceDataFilterIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeWorkspaceDataFilterReferences(BaseModel): + """ + DeclarativeWorkspaceDataFilterReferences + """ # noqa: E501 + filter_column: StrictStr = Field(description="Filter column name", alias="filterColumn") + filter_column_data_type: StrictStr = Field(description="Filter column data type", alias="filterColumnDataType") + filter_id: DatasetWorkspaceDataFilterIdentifier = Field(alias="filterId") + __properties: ClassVar[List[str]] = ["filterColumn", "filterColumnDataType", "filterId"] + + @field_validator('filter_column_data_type') + def filter_column_data_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 DeclarativeWorkspaceDataFilterReferences 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 filter_id + if self.filter_id: + _dict['filterId'] = self.filter_id.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeWorkspaceDataFilterReferences from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filterColumn": obj.get("filterColumn"), + "filterColumnDataType": obj.get("filterColumnDataType"), + "filterId": DatasetWorkspaceDataFilterIdentifier.from_dict(obj["filterId"]) if obj.get("filterId") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter_setting.py b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter_setting.py new file mode 100644 index 000000000..9d9f683bd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filter_setting.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.workspace_identifier import WorkspaceIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeWorkspaceDataFilterSetting(BaseModel): + """ + Workspace Data Filters serving the filtering of what data users can see in workspaces. + """ # noqa: E501 + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Workspace Data Filters setting description.") + filter_values: List[StrictStr] = Field(description="Only those rows are returned, where columnName from filter matches those values.", alias="filterValues") + id: Annotated[str, Field(strict=True)] = Field(description="Workspace Data Filters ID. This ID is further used to refer to this instance.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Workspace Data Filters setting title.") + workspace: WorkspaceIdentifier + __properties: ClassVar[List[str]] = ["description", "filterValues", "id", "title", "workspace"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 DeclarativeWorkspaceDataFilterSetting 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 workspace + if self.workspace: + _dict['workspace'] = self.workspace.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeWorkspaceDataFilterSetting from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "filterValues": obj.get("filterValues"), + "id": obj.get("id"), + "title": obj.get("title"), + "workspace": WorkspaceIdentifier.from_dict(obj["workspace"]) if obj.get("workspace") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filters.py b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filters.py new file mode 100644 index 000000000..cbbe9a3f7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_data_filters.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.declarative_workspace_data_filter import DeclarativeWorkspaceDataFilter +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeWorkspaceDataFilters(BaseModel): + """ + Declarative form of data filters. + """ # noqa: E501 + workspace_data_filters: List[DeclarativeWorkspaceDataFilter] = Field(alias="workspaceDataFilters") + __properties: ClassVar[List[str]] = ["workspaceDataFilters"] + + 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 DeclarativeWorkspaceDataFilters 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 each item in workspace_data_filters (list) + _items = [] + if self.workspace_data_filters: + for _item_workspace_data_filters in self.workspace_data_filters: + if _item_workspace_data_filters: + _items.append(_item_workspace_data_filters.to_dict()) + _dict['workspaceDataFilters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeWorkspaceDataFilters from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "workspaceDataFilters": [DeclarativeWorkspaceDataFilter.from_dict(_item) for _item in obj["workspaceDataFilters"]] if obj.get("workspaceDataFilters") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_workspace_hierarchy_permission.py b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_hierarchy_permission.py new file mode 100644 index 000000000..c119ebf6a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_hierarchy_permission.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.assignee_identifier import AssigneeIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeWorkspaceHierarchyPermission(BaseModel): + """ + DeclarativeWorkspaceHierarchyPermission + """ # noqa: E501 + assignee: AssigneeIdentifier + name: StrictStr = Field(description="Permission name.") + __properties: ClassVar[List[str]] = ["assignee", "name"] + + @field_validator('name') + def name_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['MANAGE', 'ANALYZE', 'EXPORT', 'EXPORT_TABULAR', 'EXPORT_PDF', 'CREATE_AUTOMATION', 'USE_AI_ASSISTANT', 'WRITE_KNOWLEDGE_DOCUMENTS', 'READ_KNOWLEDGE_DOCUMENTS', 'CREATE_FILTER_VIEW', 'VIEW']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MANAGE', 'ANALYZE', 'EXPORT', 'EXPORT_TABULAR', 'EXPORT_PDF', 'CREATE_AUTOMATION', 'USE_AI_ASSISTANT', 'WRITE_KNOWLEDGE_DOCUMENTS', 'READ_KNOWLEDGE_DOCUMENTS', 'CREATE_FILTER_VIEW', 'VIEW')") + 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 DeclarativeWorkspaceHierarchyPermission 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 assignee + if self.assignee: + _dict['assignee'] = self.assignee.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeWorkspaceHierarchyPermission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assignee": AssigneeIdentifier.from_dict(obj["assignee"]) if obj.get("assignee") is not None else None, + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_workspace_model.py b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_model.py new file mode 100644 index 000000000..806c585b2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_model.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.declarative_analytics_layer import DeclarativeAnalyticsLayer +from gooddata_api_client.models.declarative_ldm import DeclarativeLdm +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeWorkspaceModel(BaseModel): + """ + A declarative form of a model and analytics for a workspace. + """ # noqa: E501 + analytics: Optional[DeclarativeAnalyticsLayer] = None + ldm: Optional[DeclarativeLdm] = None + __properties: ClassVar[List[str]] = ["analytics", "ldm"] + + 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 DeclarativeWorkspaceModel 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 analytics + if self.analytics: + _dict['analytics'] = self.analytics.to_dict() + # override the default output from pydantic by calling `to_dict()` of ldm + if self.ldm: + _dict['ldm'] = self.ldm.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeWorkspaceModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analytics": DeclarativeAnalyticsLayer.from_dict(obj["analytics"]) if obj.get("analytics") is not None else None, + "ldm": DeclarativeLdm.from_dict(obj["ldm"]) if obj.get("ldm") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_workspace_permissions.py b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_permissions.py new file mode 100644 index 000000000..1ae36d203 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_workspace_permissions.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.declarative_single_workspace_permission import DeclarativeSingleWorkspacePermission +from gooddata_api_client.models.declarative_workspace_hierarchy_permission import DeclarativeWorkspaceHierarchyPermission +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeWorkspacePermissions(BaseModel): + """ + Definition of permissions associated with a workspace. + """ # noqa: E501 + hierarchy_permissions: Optional[List[DeclarativeWorkspaceHierarchyPermission]] = Field(default=None, alias="hierarchyPermissions") + permissions: Optional[List[DeclarativeSingleWorkspacePermission]] = None + __properties: ClassVar[List[str]] = ["hierarchyPermissions", "permissions"] + + 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 DeclarativeWorkspacePermissions 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 each item in hierarchy_permissions (list) + _items = [] + if self.hierarchy_permissions: + for _item_hierarchy_permissions in self.hierarchy_permissions: + if _item_hierarchy_permissions: + _items.append(_item_hierarchy_permissions.to_dict()) + _dict['hierarchyPermissions'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeWorkspacePermissions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hierarchyPermissions": [DeclarativeWorkspaceHierarchyPermission.from_dict(_item) for _item in obj["hierarchyPermissions"]] if obj.get("hierarchyPermissions") is not None else None, + "permissions": [DeclarativeSingleWorkspacePermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/declarative_workspaces.py b/gooddata-api-client/gooddata_api_client/models/declarative_workspaces.py new file mode 100644 index 000000000..11857ecd2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/declarative_workspaces.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.declarative_workspace import DeclarativeWorkspace +from gooddata_api_client.models.declarative_workspace_data_filter import DeclarativeWorkspaceDataFilter +from typing import Optional, Set +from typing_extensions import Self + +class DeclarativeWorkspaces(BaseModel): + """ + A declarative form of a all workspace layout. + """ # noqa: E501 + workspace_data_filters: List[DeclarativeWorkspaceDataFilter] = Field(alias="workspaceDataFilters") + workspaces: List[DeclarativeWorkspace] + __properties: ClassVar[List[str]] = ["workspaceDataFilters", "workspaces"] + + 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 DeclarativeWorkspaces 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 each item in workspace_data_filters (list) + _items = [] + if self.workspace_data_filters: + for _item_workspace_data_filters in self.workspace_data_filters: + if _item_workspace_data_filters: + _items.append(_item_workspace_data_filters.to_dict()) + _dict['workspaceDataFilters'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in workspaces (list) + _items = [] + if self.workspaces: + for _item_workspaces in self.workspaces: + if _item_workspaces: + _items.append(_item_workspaces.to_dict()) + _dict['workspaces'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeclarativeWorkspaces from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "workspaceDataFilters": [DeclarativeWorkspaceDataFilter.from_dict(_item) for _item in obj["workspaceDataFilters"]] if obj.get("workspaceDataFilters") is not None else None, + "workspaces": [DeclarativeWorkspace.from_dict(_item) for _item in obj["workspaces"]] if obj.get("workspaces") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/default_smtp.py b/gooddata-api-client/gooddata_api_client/models/default_smtp.py new file mode 100644 index 000000000..c6bfffc47 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/default_smtp.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class DefaultSmtp(BaseModel): + """ + Default SMTP destination for notifications. + """ # noqa: E501 + from_email: Optional[StrictStr] = Field(default='no-reply@gooddata.com', description="E-mail address to send notifications from. Currently this does not have any effect. E-mail 'no-reply@gooddata.com' is used instead.", alias="fromEmail") + from_email_name: Optional[StrictStr] = Field(default='GoodData', description="An optional e-mail name to send notifications from. Currently this does not have any effect. E-mail from name 'GoodData' is used instead.", alias="fromEmailName") + type: StrictStr = Field(description="The destination type.") + __properties: ClassVar[List[str]] = ["fromEmail", "fromEmailName", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['DEFAULT_SMTP']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('DEFAULT_SMTP')") + 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 DefaultSmtp 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 DefaultSmtp from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fromEmail": obj.get("fromEmail") if obj.get("fromEmail") is not None else 'no-reply@gooddata.com', + "fromEmailName": obj.get("fromEmailName") if obj.get("fromEmailName") is not None else 'GoodData', + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/delete_knowledge_document_response_dto.py b/gooddata-api-client/gooddata_api_client/models/delete_knowledge_document_response_dto.py new file mode 100644 index 000000000..cc284dbb1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/delete_knowledge_document_response_dto.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DeleteKnowledgeDocumentResponseDto(BaseModel): + """ + DeleteKnowledgeDocumentResponseDto + """ # noqa: E501 + message: StrictStr + success: StrictBool + __properties: ClassVar[List[str]] = ["message", "success"] + + 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 DeleteKnowledgeDocumentResponseDto 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 DeleteKnowledgeDocumentResponseDto from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "success": obj.get("success") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dependent_entities_graph.py b/gooddata-api-client/gooddata_api_client/models/dependent_entities_graph.py new file mode 100644 index 000000000..fbaf249c9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dependent_entities_graph.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.dependent_entities_node import DependentEntitiesNode +from gooddata_api_client.models.entity_identifier import EntityIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DependentEntitiesGraph(BaseModel): + """ + DependentEntitiesGraph + """ # noqa: E501 + edges: List[List[EntityIdentifier]] + nodes: List[DependentEntitiesNode] + __properties: ClassVar[List[str]] = ["edges", "nodes"] + + 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 DependentEntitiesGraph 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 each item in edges (list of list) + _items = [] + if self.edges: + for _item_edges in self.edges: + if _item_edges: + _items.append( + [_inner_item.to_dict() for _inner_item in _item_edges if _inner_item is not None] + ) + _dict['edges'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in nodes (list) + _items = [] + if self.nodes: + for _item_nodes in self.nodes: + if _item_nodes: + _items.append(_item_nodes.to_dict()) + _dict['nodes'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DependentEntitiesGraph from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "edges": [ + [EntityIdentifier.from_dict(_inner_item) for _inner_item in _item] + for _item in obj["edges"] + ] if obj.get("edges") is not None else None, + "nodes": [DependentEntitiesNode.from_dict(_item) for _item in obj["nodes"]] if obj.get("nodes") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dependent_entities_node.py b/gooddata-api-client/gooddata_api_client/models/dependent_entities_node.py new file mode 100644 index 000000000..c92d37cf3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dependent_entities_node.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DependentEntitiesNode(BaseModel): + """ + DependentEntitiesNode + """ # noqa: E501 + id: StrictStr + title: Optional[StrictStr] = None + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "title", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['analyticalDashboard', 'attribute', 'attributeHierarchy', 'dashboardPlugin', 'dataset', 'fact', 'label', 'metric', 'userDataFilter', 'automation', 'memoryItem', 'knowledgeRecommendation', 'visualizationObject', 'filterContext', 'filterView']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('analyticalDashboard', 'attribute', 'attributeHierarchy', 'dashboardPlugin', 'dataset', 'fact', 'label', 'metric', 'userDataFilter', 'automation', 'memoryItem', 'knowledgeRecommendation', 'visualizationObject', 'filterContext', 'filterView')") + 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 DependentEntitiesNode 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 DependentEntitiesNode 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"), + "title": obj.get("title"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dependent_entities_request.py b/gooddata-api-client/gooddata_api_client/models/dependent_entities_request.py new file mode 100644 index 000000000..6557c1301 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dependent_entities_request.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.entity_identifier import EntityIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class DependentEntitiesRequest(BaseModel): + """ + DependentEntitiesRequest + """ # noqa: E501 + identifiers: List[EntityIdentifier] + relation: Optional[StrictStr] = Field(default='DEPENDENTS', description="Entity relation for graph traversal from the entry points. DEPENDENTS returns entities that depend on the entry points. DEPENDENCIES returns entities that the entry points depend on.") + __properties: ClassVar[List[str]] = ["identifiers", "relation"] + + @field_validator('relation') + def relation_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['DEPENDENTS', 'DEPENDENCIES']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('DEPENDENTS', 'DEPENDENCIES')") + 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 DependentEntitiesRequest 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 each item in identifiers (list) + _items = [] + if self.identifiers: + for _item_identifiers in self.identifiers: + if _item_identifiers: + _items.append(_item_identifiers.to_dict()) + _dict['identifiers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DependentEntitiesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifiers": [EntityIdentifier.from_dict(_item) for _item in obj["identifiers"]] if obj.get("identifiers") is not None else None, + "relation": obj.get("relation") if obj.get("relation") is not None else 'DEPENDENTS' + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dependent_entities_response.py b/gooddata-api-client/gooddata_api_client/models/dependent_entities_response.py new file mode 100644 index 000000000..28c869f88 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dependent_entities_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.dependent_entities_graph import DependentEntitiesGraph +from typing import Optional, Set +from typing_extensions import Self + +class DependentEntitiesResponse(BaseModel): + """ + DependentEntitiesResponse + """ # noqa: E501 + graph: DependentEntitiesGraph + __properties: ClassVar[List[str]] = ["graph"] + + 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 DependentEntitiesResponse 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 graph + if self.graph: + _dict['graph'] = self.graph.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DependentEntitiesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "graph": DependentEntitiesGraph.from_dict(obj["graph"]) if obj.get("graph") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/depends_on.py b/gooddata-api-client/gooddata_api_client/models/depends_on.py new file mode 100644 index 000000000..2381ff489 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/depends_on.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DependsOn(BaseModel): + """ + Filter definition type specified by label and values. + """ # noqa: E501 + complement_filter: Optional[StrictBool] = Field(default=False, description="Inverse filtering mode.", alias="complementFilter") + label: StrictStr = Field(description="Specifies on which label the filter depends on.") + values: List[Optional[StrictStr]] = Field(description="Specifies values of the label for element filtering.") + __properties: ClassVar[List[str]] = ["complementFilter", "label", "values"] + + 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 DependsOn 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 DependsOn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "complementFilter": obj.get("complementFilter") if obj.get("complementFilter") is not None else False, + "label": obj.get("label"), + "values": obj.get("values") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/depends_on_date_filter.py b/gooddata-api-client/gooddata_api_client/models/depends_on_date_filter.py new file mode 100644 index 000000000..20c48ee60 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/depends_on_date_filter.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.date_filter import DateFilter +from typing import Optional, Set +from typing_extensions import Self + +class DependsOnDateFilter(BaseModel): + """ + Filter definition type for dates. + """ # noqa: E501 + date_filter: DateFilter = Field(alias="dateFilter") + __properties: ClassVar[List[str]] = ["dateFilter"] + + 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 DependsOnDateFilter 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 date_filter + if self.date_filter: + _dict['dateFilter'] = self.date_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DependsOnDateFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dateFilter": DateFilter.from_dict(obj["dateFilter"]) if obj.get("dateFilter") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dim_attribute.py b/gooddata-api-client/gooddata_api_client/models/dim_attribute.py new file mode 100644 index 000000000..b6c48b9a2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dim_attribute.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class DimAttribute(BaseModel): + """ + List of attributes representing the dimensionality of the new visualization + """ # noqa: E501 + id: StrictStr = Field(description="ID of the object") + title: StrictStr = Field(description="Title of attribute.") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["id", "title", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attribute']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attribute')") + 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 DimAttribute 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 DimAttribute 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"), + "title": obj.get("title"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dimension.py b/gooddata-api-client/gooddata_api_client/models/dimension.py new file mode 100644 index 000000000..891889c90 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dimension.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.sort_key import SortKey +from typing import Optional, Set +from typing_extensions import Self + +class Dimension(BaseModel): + """ + Single dimension description. + """ # noqa: E501 + item_identifiers: List[StrictStr] = Field(description="List of items in current dimension. Can reference 'localIdentifier' from 'AttributeItem', or special pseudo attribute \"measureGroup\" representing list of metrics.", alias="itemIdentifiers") + local_identifier: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Dimension identification within requests. Other entities can reference this dimension by this value.", alias="localIdentifier") + sorting: Optional[List[SortKey]] = Field(default=None, description="List of sorting rules. From most relevant to least relevant (less relevant rule is applied, when more relevant rule compares items as equal).") + __properties: ClassVar[List[str]] = ["itemIdentifiers", "localIdentifier", "sorting"] + + @field_validator('local_identifier') + def local_identifier_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[.a-zA-Z0-9_-]+$", value): + raise ValueError(r"must validate the regular expression /^[.a-zA-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 Dimension 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 each item in sorting (list) + _items = [] + if self.sorting: + for _item_sorting in self.sorting: + if _item_sorting: + _items.append(_item_sorting.to_dict()) + _dict['sorting'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Dimension from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "itemIdentifiers": obj.get("itemIdentifiers"), + "localIdentifier": obj.get("localIdentifier"), + "sorting": [SortKey.from_dict(_item) for _item in obj["sorting"]] if obj.get("sorting") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/dimension_header.py b/gooddata-api-client/gooddata_api_client/models/dimension_header.py new file mode 100644 index 000000000..616400c1e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/dimension_header.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.header_group import HeaderGroup +from typing import Optional, Set +from typing_extensions import Self + +class DimensionHeader(BaseModel): + """ + Contains the dimension-specific header information. + """ # noqa: E501 + header_groups: List[HeaderGroup] = Field(description="An array containing header groups.", alias="headerGroups") + __properties: ClassVar[List[str]] = ["headerGroups"] + + 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 DimensionHeader 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 each item in header_groups (list) + _items = [] + if self.header_groups: + for _item_header_groups in self.header_groups: + if _item_header_groups: + _items.append(_item_header_groups.to_dict()) + _dict['headerGroups'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DimensionHeader from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "headerGroups": [HeaderGroup.from_dict(_item) for _item in obj["headerGroups"]] if obj.get("headerGroups") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/element.py b/gooddata-api-client/gooddata_api_client/models/element.py new file mode 100644 index 000000000..68702129b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/element.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class Element(BaseModel): + """ + List of returned elements. + """ # noqa: E501 + primary_title: StrictStr = Field(description="Title of primary label of attribute owning requested label, null if the title is null or the primary label is excluded", alias="primaryTitle") + title: StrictStr = Field(description="Title of requested label.") + __properties: ClassVar[List[str]] = ["primaryTitle", "title"] + + 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 Element 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 Element from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "primaryTitle": obj.get("primaryTitle"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/elements_request.py b/gooddata-api-client/gooddata_api_client/models/elements_request.py new file mode 100644 index 000000000..deb1e71e6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/elements_request.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from gooddata_api_client.models.elements_request_depends_on_inner import ElementsRequestDependsOnInner +from gooddata_api_client.models.filter_by import FilterBy +from gooddata_api_client.models.validate_by_item import ValidateByItem +from typing import Optional, Set +from typing_extensions import Self + +class ElementsRequest(BaseModel): + """ + ElementsRequest + """ # noqa: E501 + cache_id: Optional[StrictStr] = Field(default=None, description="If specified, the element data will be taken from the result with the same cacheId if it is available.", alias="cacheId") + complement_filter: Optional[StrictBool] = Field(default=False, description="Inverse filters: * ```false``` - return items matching ```patternFilter``` and ```exactFilter``` * ```true``` - return items not matching ```patternFilter``` and ```exactFilter```", alias="complementFilter") + data_sampling_percentage: Optional[Union[StrictFloat, StrictInt]] = Field(default=100.0, description="Specifies percentage of source table data scanned during the computation. This field is deprecated and is no longer used during the elements computation.", alias="dataSamplingPercentage") + depends_on: Optional[List[ElementsRequestDependsOnInner]] = Field(default=None, description="Return only items that are not filtered-out by the parent filters.", alias="dependsOn") + exact_filter: Optional[List[Optional[StrictStr]]] = Field(default=None, description="Return only items, whose ```label``` title exactly matches one of ```filter```.", alias="exactFilter") + exclude_primary_label: Optional[StrictBool] = Field(default=False, description="Excludes items from the result that differ only by primary label * ```false``` - return items with distinct primary label * ```true``` - return items with distinct requested label", alias="excludePrimaryLabel") + filter_by: Optional[FilterBy] = Field(default=None, alias="filterBy") + label: Annotated[str, Field(strict=True)] = Field(description="Requested label.") + pattern_filter: Optional[StrictStr] = Field(default=None, description="Return only items, whose ```label``` title case insensitively contains ```filter``` as substring.", alias="patternFilter") + sort_order: Optional[StrictStr] = Field(default=None, description="Sort order of returned items. Items are sorted by ```label``` title. If no sort order is specified then attribute's ```sortDirection``` is used, which is ASC by default", alias="sortOrder") + validate_by: Optional[List[Optional[ValidateByItem]]] = Field(default=None, description="Return only items that are computable on metric.", alias="validateBy") + __properties: ClassVar[List[str]] = ["cacheId", "complementFilter", "dataSamplingPercentage", "dependsOn", "exactFilter", "excludePrimaryLabel", "filterBy", "label", "patternFilter", "sortOrder", "validateBy"] + + @field_validator('label') + def label_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('sort_order') + def sort_order_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ASC', 'DESC']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ASC', 'DESC')") + 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 ElementsRequest 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 each item in depends_on (list) + _items = [] + if self.depends_on: + for _item_depends_on in self.depends_on: + if _item_depends_on: + _items.append(_item_depends_on.to_dict()) + _dict['dependsOn'] = _items + # override the default output from pydantic by calling `to_dict()` of filter_by + if self.filter_by: + _dict['filterBy'] = self.filter_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in validate_by (list) + _items = [] + if self.validate_by: + for _item_validate_by in self.validate_by: + if _item_validate_by: + _items.append(_item_validate_by.to_dict()) + _dict['validateBy'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ElementsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cacheId": obj.get("cacheId"), + "complementFilter": obj.get("complementFilter") if obj.get("complementFilter") is not None else False, + "dataSamplingPercentage": obj.get("dataSamplingPercentage") if obj.get("dataSamplingPercentage") is not None else 100.0, + "dependsOn": [ElementsRequestDependsOnInner.from_dict(_item) for _item in obj["dependsOn"]] if obj.get("dependsOn") is not None else None, + "exactFilter": obj.get("exactFilter"), + "excludePrimaryLabel": obj.get("excludePrimaryLabel") if obj.get("excludePrimaryLabel") is not None else False, + "filterBy": FilterBy.from_dict(obj["filterBy"]) if obj.get("filterBy") is not None else None, + "label": obj.get("label"), + "patternFilter": obj.get("patternFilter"), + "sortOrder": obj.get("sortOrder"), + "validateBy": [ValidateByItem.from_dict(_item) for _item in obj["validateBy"]] if obj.get("validateBy") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/elements_request_depends_on_inner.py b/gooddata-api-client/gooddata_api_client/models/elements_request_depends_on_inner.py new file mode 100644 index 000000000..2b59b855f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/elements_request_depends_on_inner.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.depends_on import DependsOn +from gooddata_api_client.models.depends_on_date_filter import DependsOnDateFilter +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ELEMENTSREQUESTDEPENDSONINNER_ONE_OF_SCHEMAS = ["DependsOn", "DependsOnDateFilter"] + +class ElementsRequestDependsOnInner(BaseModel): + """ + ElementsRequestDependsOnInner + """ + # data type: DependsOn + oneof_schema_1_validator: Optional[DependsOn] = None + # data type: DependsOnDateFilter + oneof_schema_2_validator: Optional[DependsOnDateFilter] = None + actual_instance: Optional[Union[DependsOn, DependsOnDateFilter]] = None + one_of_schemas: Set[str] = { "DependsOn", "DependsOnDateFilter" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = ElementsRequestDependsOnInner.model_construct() + error_messages = [] + match = 0 + # validate data type: DependsOn + if not isinstance(v, DependsOn): + error_messages.append(f"Error! Input type `{type(v)}` is not `DependsOn`") + else: + match += 1 + # validate data type: DependsOnDateFilter + if not isinstance(v, DependsOnDateFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `DependsOnDateFilter`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ElementsRequestDependsOnInner with oneOf schemas: DependsOn, DependsOnDateFilter. 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 + + # deserialize data into DependsOn + try: + if match == 0: + instance.actual_instance = DependsOn.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DependsOnDateFilter + try: + if match == 0: + instance.actual_instance = DependsOnDateFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ElementsRequestDependsOnInner with oneOf schemas: DependsOn, DependsOnDateFilter. 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], DependsOn, DependsOnDateFilter]]: + """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/gooddata-api-client/gooddata_api_client/models/elements_response.py b/gooddata-api-client/gooddata_api_client/models/elements_response.py new file mode 100644 index 000000000..802d1142a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/elements_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.attribute_format import AttributeFormat +from gooddata_api_client.models.element import Element +from gooddata_api_client.models.paging import Paging +from gooddata_api_client.models.rest_api_identifier import RestApiIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class ElementsResponse(BaseModel): + """ + Entity holding list of sorted & filtered label elements, related primary label of attribute owning requested label and paging. + """ # noqa: E501 + cache_id: Optional[StrictStr] = Field(default=None, description="The client can use this in subsequent requests (like paging or search) to get results from the same point in time as the previous request. This is useful when the underlying data source has caches disabled and the client wants to avoid seeing inconsistent results and to also avoid excessive queries to the database itself.", alias="cacheId") + elements: List[Element] = Field(description="List of returned elements.") + format: Optional[AttributeFormat] = None + granularity: Optional[StrictStr] = Field(default=None, description="Granularity of requested label in case of date attribute") + paging: Paging + primary_label: RestApiIdentifier = Field(alias="primaryLabel") + __properties: ClassVar[List[str]] = ["cacheId", "elements", "format", "granularity", "paging", "primaryLabel"] + + @field_validator('granularity') + def granularity_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR')") + 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 ElementsResponse 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 each item in elements (list) + _items = [] + if self.elements: + for _item_elements in self.elements: + if _item_elements: + _items.append(_item_elements.to_dict()) + _dict['elements'] = _items + # override the default output from pydantic by calling `to_dict()` of format + if self.format: + _dict['format'] = self.format.to_dict() + # override the default output from pydantic by calling `to_dict()` of paging + if self.paging: + _dict['paging'] = self.paging.to_dict() + # override the default output from pydantic by calling `to_dict()` of primary_label + if self.primary_label: + _dict['primaryLabel'] = self.primary_label.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ElementsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cacheId": obj.get("cacheId"), + "elements": [Element.from_dict(_item) for _item in obj["elements"]] if obj.get("elements") is not None else None, + "format": AttributeFormat.from_dict(obj["format"]) if obj.get("format") is not None else None, + "granularity": obj.get("granularity"), + "paging": Paging.from_dict(obj["paging"]) if obj.get("paging") is not None else None, + "primaryLabel": RestApiIdentifier.from_dict(obj["primaryLabel"]) if obj.get("primaryLabel") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/entitlements_request.py b/gooddata-api-client/gooddata_api_client/models/entitlements_request.py new file mode 100644 index 000000000..e7183e53f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/entitlements_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class EntitlementsRequest(BaseModel): + """ + EntitlementsRequest + """ # noqa: E501 + entitlements_name: List[StrictStr] = Field(alias="entitlementsName") + __properties: ClassVar[List[str]] = ["entitlementsName"] + + @field_validator('entitlements_name') + def entitlements_name_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['CacheStrategy', 'Contract', 'CustomTheming', 'ExtraCache', 'Hipaa', 'PdfExports', 'UiLocalization', 'Tier', 'UserCount', 'ManagedIdpUserCount', 'UnlimitedUsers', 'UnlimitedWorkspaces', 'WhiteLabeling', 'WorkspaceCount', 'UserTelemetryDisabled', 'AutomationCount', 'UnlimitedAutomations', 'AutomationRecipientCount', 'UnlimitedAutomationRecipients', 'DailyScheduledActionCount', 'UnlimitedDailyScheduledActions', 'DailyAlertActionCount', 'UnlimitedDailyAlertActions', 'ScheduledActionMinimumRecurrenceMinutes', 'FederatedIdentityManagement', 'AuditLogging', 'ControlledFeatureRollout', 'AiLake']): + raise ValueError("each list item must be one of ('CacheStrategy', 'Contract', 'CustomTheming', 'ExtraCache', 'Hipaa', 'PdfExports', 'UiLocalization', 'Tier', 'UserCount', 'ManagedIdpUserCount', 'UnlimitedUsers', 'UnlimitedWorkspaces', 'WhiteLabeling', 'WorkspaceCount', 'UserTelemetryDisabled', 'AutomationCount', 'UnlimitedAutomations', 'AutomationRecipientCount', 'UnlimitedAutomationRecipients', 'DailyScheduledActionCount', 'UnlimitedDailyScheduledActions', 'DailyAlertActionCount', 'UnlimitedDailyAlertActions', 'ScheduledActionMinimumRecurrenceMinutes', 'FederatedIdentityManagement', 'AuditLogging', 'ControlledFeatureRollout', 'AiLake')") + 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 EntitlementsRequest 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 EntitlementsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "entitlementsName": obj.get("entitlementsName") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/entity_identifier.py b/gooddata-api-client/gooddata_api_client/models/entity_identifier.py new file mode 100644 index 000000000..49e678e23 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/entity_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EntityIdentifier(BaseModel): + """ + EntityIdentifier + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="Object identifier.") + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['analyticalDashboard', 'attribute', 'attributeHierarchy', 'dashboardPlugin', 'dataset', 'fact', 'label', 'metric', 'userDataFilter', 'automation', 'knowledgeRecommendation', 'visualizationObject', 'filterContext', 'filterView']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('analyticalDashboard', 'attribute', 'attributeHierarchy', 'dashboardPlugin', 'dataset', 'fact', 'label', 'metric', 'userDataFilter', 'automation', 'knowledgeRecommendation', 'visualizationObject', 'filterContext', 'filterView')") + 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 EntityIdentifier 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 EntityIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/entity_search_body.py b/gooddata-api-client/gooddata_api_client/models/entity_search_body.py new file mode 100644 index 000000000..2e1b9d477 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/entity_search_body.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.entity_search_page import EntitySearchPage +from gooddata_api_client.models.entity_search_sort import EntitySearchSort +from typing import Optional, Set +from typing_extensions import Self + +class EntitySearchBody(BaseModel): + """ + Request body for entity search operations + """ # noqa: E501 + filter: Optional[StrictStr] = Field(default=None, description="Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123').") + include: Optional[List[StrictStr]] = Field(default=None, description="List of related entities to include in the response") + meta_include: Optional[List[StrictStr]] = Field(default=None, description="Set of metadata fields to include in the response", alias="metaInclude") + page: Optional[EntitySearchPage] = None + sort: Optional[List[EntitySearchSort]] = Field(default=None, description="Sorting criteria (can specify multiple sort orders)") + __properties: ClassVar[List[str]] = ["filter", "include", "metaInclude", "page", "sort"] + + 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 EntitySearchBody 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 page + if self.page: + _dict['page'] = self.page.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in sort (list) + _items = [] + if self.sort: + for _item_sort in self.sort: + if _item_sort: + _items.append(_item_sort.to_dict()) + _dict['sort'] = _items + # set to None if filter (nullable) is None + # and model_fields_set contains the field + if self.filter is None and "filter" in self.model_fields_set: + _dict['filter'] = None + + # set to None if include (nullable) is None + # and model_fields_set contains the field + if self.include is None and "include" in self.model_fields_set: + _dict['include'] = None + + # set to None if meta_include (nullable) is None + # and model_fields_set contains the field + if self.meta_include is None and "meta_include" in self.model_fields_set: + _dict['metaInclude'] = None + + # set to None if sort (nullable) is None + # and model_fields_set contains the field + if self.sort is None and "sort" in self.model_fields_set: + _dict['sort'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EntitySearchBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filter": obj.get("filter"), + "include": obj.get("include"), + "metaInclude": obj.get("metaInclude"), + "page": EntitySearchPage.from_dict(obj["page"]) if obj.get("page") is not None else None, + "sort": [EntitySearchSort.from_dict(_item) for _item in obj["sort"]] if obj.get("sort") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/entity_search_page.py b/gooddata-api-client/gooddata_api_client/models/entity_search_page.py new file mode 100644 index 000000000..11acff9c5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/entity_search_page.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EntitySearchPage(BaseModel): + """ + Pagination information for entity search + """ # noqa: E501 + index: Annotated[int, Field(strict=True, ge=0)] = Field(description="Zero-based page index") + size: Annotated[int, Field(strict=True, ge=1)] = Field(description="Number of items per page") + __properties: ClassVar[List[str]] = ["index", "size"] + + 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 EntitySearchPage 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 EntitySearchPage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "index": obj.get("index") if obj.get("index") is not None else 0, + "size": obj.get("size") if obj.get("size") is not None else 100 + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/entity_search_sort.py b/gooddata-api-client/gooddata_api_client/models/entity_search_sort.py new file mode 100644 index 000000000..e9e3c90dc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/entity_search_sort.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class EntitySearchSort(BaseModel): + """ + Sorting criteria for entity search + """ # noqa: E501 + direction: Optional[StrictStr] = Field(default='ASC', description="Sort direction") + var_property: StrictStr = Field(description="Property name to sort by", alias="property") + __properties: ClassVar[List[str]] = ["direction", "property"] + + @field_validator('direction') + def direction_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ASC', 'DESC']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ASC', 'DESC')") + 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 EntitySearchSort 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 EntitySearchSort from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "direction": obj.get("direction") if obj.get("direction") is not None else 'ASC', + "property": obj.get("property") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/execution_links.py b/gooddata-api-client/gooddata_api_client/models/execution_links.py new file mode 100644 index 000000000..337666c5c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/execution_links.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionLinks(BaseModel): + """ + Links to the execution result. + """ # noqa: E501 + execution_result: StrictStr = Field(description="Link to the result data.", alias="executionResult") + __properties: ClassVar[List[str]] = ["executionResult"] + + 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 ExecutionLinks 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 ExecutionLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "executionResult": obj.get("executionResult") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/execution_response.py b/gooddata-api-client/gooddata_api_client/models/execution_response.py new file mode 100644 index 000000000..6d795c29d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/execution_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.execution_links import ExecutionLinks +from gooddata_api_client.models.result_dimension import ResultDimension +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionResponse(BaseModel): + """ + Response to AFM execution request body + """ # noqa: E501 + dimensions: List[ResultDimension] = Field(description="Dimensions of the result") + links: ExecutionLinks + __properties: ClassVar[List[str]] = ["dimensions", "links"] + + 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 ExecutionResponse 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 each item in dimensions (list) + _items = [] + if self.dimensions: + for _item_dimensions in self.dimensions: + if _item_dimensions: + _items.append(_item_dimensions.to_dict()) + _dict['dimensions'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExecutionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dimensions": [ResultDimension.from_dict(_item) for _item in obj["dimensions"]] if obj.get("dimensions") is not None else None, + "links": ExecutionLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/execution_result.py b/gooddata-api-client/gooddata_api_client/models/execution_result.py new file mode 100644 index 000000000..5858403e9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/execution_result.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.dimension_header import DimensionHeader +from gooddata_api_client.models.execution_result_grand_total import ExecutionResultGrandTotal +from gooddata_api_client.models.execution_result_metadata import ExecutionResultMetadata +from gooddata_api_client.models.execution_result_paging import ExecutionResultPaging +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionResult(BaseModel): + """ + Contains the result of an AFM execution. + """ # noqa: E501 + data: List[Any] = Field(description="A multi-dimensional array of computed results. The most common one being a 2-dimensional array. The arrays can be composed of Double or null values.") + dimension_headers: List[DimensionHeader] = Field(description="An array containing dimension headers. The size of the array corresponds to the number of dimensions. Their order corresponds to the dimension order in the execution result spec.", alias="dimensionHeaders") + grand_totals: List[ExecutionResultGrandTotal] = Field(alias="grandTotals") + metadata: ExecutionResultMetadata + paging: ExecutionResultPaging + __properties: ClassVar[List[str]] = ["data", "dimensionHeaders", "grandTotals", "metadata", "paging"] + + 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 ExecutionResult 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 each item in dimension_headers (list) + _items = [] + if self.dimension_headers: + for _item_dimension_headers in self.dimension_headers: + if _item_dimension_headers: + _items.append(_item_dimension_headers.to_dict()) + _dict['dimensionHeaders'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in grand_totals (list) + _items = [] + if self.grand_totals: + for _item_grand_totals in self.grand_totals: + if _item_grand_totals: + _items.append(_item_grand_totals.to_dict()) + _dict['grandTotals'] = _items + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of paging + if self.paging: + _dict['paging'] = self.paging.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExecutionResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": obj.get("data"), + "dimensionHeaders": [DimensionHeader.from_dict(_item) for _item in obj["dimensionHeaders"]] if obj.get("dimensionHeaders") is not None else None, + "grandTotals": [ExecutionResultGrandTotal.from_dict(_item) for _item in obj["grandTotals"]] if obj.get("grandTotals") is not None else None, + "metadata": ExecutionResultMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "paging": ExecutionResultPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/execution_result_data_source_message.py b/gooddata-api-client/gooddata_api_client/models/execution_result_data_source_message.py new file mode 100644 index 000000000..0611fc52f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/execution_result_data_source_message.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 ExecutionResultDataSourceMessage(BaseModel): + """ + A piece of extra information related to the results (e.g. debug information, warnings, etc.). + """ # noqa: E501 + correlation_id: StrictStr = Field(description="Id correlating different pieces of supplementary info together.", alias="correlationId") + data: Optional[Dict[str, Any]] = Field(default=None, description="Data of this particular supplementary info item: a free-form JSON specific to the particular supplementary info item type.") + source: StrictStr = Field(description="Information about what part of the system created this piece of supplementary info.") + type: StrictStr = Field(description="Type of the supplementary info instance. There are currently no well-known values for this, but there might be some in the future.") + __properties: ClassVar[List[str]] = ["correlationId", "data", "source", "type"] + + 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 ExecutionResultDataSourceMessage 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 ExecutionResultDataSourceMessage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "correlationId": obj.get("correlationId"), + "data": obj.get("data"), + "source": obj.get("source"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/execution_result_grand_total.py b/gooddata-api-client/gooddata_api_client/models/execution_result_grand_total.py new file mode 100644 index 000000000..80d599045 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/execution_result_grand_total.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.dimension_header import DimensionHeader +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionResultGrandTotal(BaseModel): + """ + Contains the data of grand totals with the same dimensions. + """ # noqa: E501 + data: List[Dict[str, Any]] = Field(description="A multi-dimensional array of computed results. The most common one being a 2-dimensional array. The arrays can be composed of Double or null values.") + dimension_headers: List[DimensionHeader] = Field(description="Contains headers for a subset of `totalDimensions` in which the totals are grand totals.", alias="dimensionHeaders") + total_dimensions: List[StrictStr] = Field(description="Dimensions of the grand totals.", alias="totalDimensions") + __properties: ClassVar[List[str]] = ["data", "dimensionHeaders", "totalDimensions"] + + 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 ExecutionResultGrandTotal 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 each item in dimension_headers (list) + _items = [] + if self.dimension_headers: + for _item_dimension_headers in self.dimension_headers: + if _item_dimension_headers: + _items.append(_item_dimension_headers.to_dict()) + _dict['dimensionHeaders'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExecutionResultGrandTotal from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": obj.get("data"), + "dimensionHeaders": [DimensionHeader.from_dict(_item) for _item in obj["dimensionHeaders"]] if obj.get("dimensionHeaders") is not None else None, + "totalDimensions": obj.get("totalDimensions") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/execution_result_header.py b/gooddata-api-client/gooddata_api_client/models/execution_result_header.py new file mode 100644 index 000000000..8f92be9d0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/execution_result_header.py @@ -0,0 +1,197 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.attribute_execution_result_header import AttributeExecutionResultHeader +from gooddata_api_client.models.measure_execution_result_header import MeasureExecutionResultHeader +from gooddata_api_client.models.total_execution_result_header import TotalExecutionResultHeader +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +EXECUTIONRESULTHEADER_ONE_OF_SCHEMAS = ["AttributeExecutionResultHeader", "MeasureExecutionResultHeader", "TotalExecutionResultHeader"] + +class ExecutionResultHeader(BaseModel): + """ + Abstract execution result header + """ + # data type: AttributeExecutionResultHeader + oneof_schema_1_validator: Optional[AttributeExecutionResultHeader] = None + # data type: MeasureExecutionResultHeader + oneof_schema_2_validator: Optional[MeasureExecutionResultHeader] = None + # data type: TotalExecutionResultHeader + oneof_schema_3_validator: Optional[TotalExecutionResultHeader] = None + actual_instance: Optional[Union[AttributeExecutionResultHeader, MeasureExecutionResultHeader, TotalExecutionResultHeader]] = None + one_of_schemas: Set[str] = { "AttributeExecutionResultHeader", "MeasureExecutionResultHeader", "TotalExecutionResultHeader" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = ExecutionResultHeader.model_construct() + error_messages = [] + match = 0 + # validate data type: AttributeExecutionResultHeader + if not isinstance(v, AttributeExecutionResultHeader): + error_messages.append(f"Error! Input type `{type(v)}` is not `AttributeExecutionResultHeader`") + else: + match += 1 + # validate data type: MeasureExecutionResultHeader + if not isinstance(v, MeasureExecutionResultHeader): + error_messages.append(f"Error! Input type `{type(v)}` is not `MeasureExecutionResultHeader`") + else: + match += 1 + # validate data type: TotalExecutionResultHeader + if not isinstance(v, TotalExecutionResultHeader): + error_messages.append(f"Error! Input type `{type(v)}` is not `TotalExecutionResultHeader`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ExecutionResultHeader with oneOf schemas: AttributeExecutionResultHeader, MeasureExecutionResultHeader, TotalExecutionResultHeader. 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 _try_deserialize(cls, json_str: str, data: dict) -> Self: + """Disambiguate oneOf by checking for distinguishing keys. + + Each sub-schema wraps its content in a unique key: + - AttributeExecutionResultHeader uses 'attributeHeader' + - MeasureExecutionResultHeader uses 'measureHeader' + - TotalExecutionResultHeader uses 'totalHeader' + + Without field-based checking, pydantic v2 may accept multiple schemas + because all fields in the non-matching schemas happen to be optional + or have defaults, causing false-positive matches. + """ + instance = cls.model_construct() + + if "attributeHeader" in data: + instance.actual_instance = AttributeExecutionResultHeader.from_json(json_str) + return instance + + if "measureHeader" in data: + instance.actual_instance = MeasureExecutionResultHeader.from_json(json_str) + return instance + + if "totalHeader" in data: + instance.actual_instance = TotalExecutionResultHeader.from_json(json_str) + return instance + + raise ValueError( + "No match found when deserializing the JSON string into " + "ExecutionResultHeader with oneOf schemas: " + "AttributeExecutionResultHeader, MeasureExecutionResultHeader, " + "TotalExecutionResultHeader. The JSON object does not contain a " + "distinguishing key ('attributeHeader', 'measureHeader', or " + "'totalHeader')." + ) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + data = json.loads(json_str) + if isinstance(data, dict): + return cls._try_deserialize(json_str, data) + + # Fallback: brute-force try each schema (original behaviour) + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into AttributeExecutionResultHeader + try: + if match == 0: + instance.actual_instance = AttributeExecutionResultHeader.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MeasureExecutionResultHeader + try: + if match == 0: + instance.actual_instance = MeasureExecutionResultHeader.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TotalExecutionResultHeader + try: + if match == 0: + instance.actual_instance = TotalExecutionResultHeader.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ExecutionResultHeader with oneOf schemas: AttributeExecutionResultHeader, MeasureExecutionResultHeader, TotalExecutionResultHeader. 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], AttributeExecutionResultHeader, MeasureExecutionResultHeader, TotalExecutionResultHeader]]: + """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/gooddata-api-client/gooddata_api_client/models/execution_result_metadata.py b/gooddata-api-client/gooddata_api_client/models/execution_result_metadata.py new file mode 100644 index 000000000..b5e6433a1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/execution_result_metadata.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.execution_result_data_source_message import ExecutionResultDataSourceMessage +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionResultMetadata(BaseModel): + """ + Additional metadata for the particular execution result. + """ # noqa: E501 + data_source_messages: List[ExecutionResultDataSourceMessage] = Field(description="Additional information sent by the underlying data source.", alias="dataSourceMessages") + __properties: ClassVar[List[str]] = ["dataSourceMessages"] + + 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 ExecutionResultMetadata 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 each item in data_source_messages (list) + _items = [] + if self.data_source_messages: + for _item_data_source_messages in self.data_source_messages: + if _item_data_source_messages: + _items.append(_item_data_source_messages.to_dict()) + _dict['dataSourceMessages'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExecutionResultMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataSourceMessages": [ExecutionResultDataSourceMessage.from_dict(_item) for _item in obj["dataSourceMessages"]] if obj.get("dataSourceMessages") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/execution_result_paging.py b/gooddata-api-client/gooddata_api_client/models/execution_result_paging.py new file mode 100644 index 000000000..b775717c5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/execution_result_paging.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionResultPaging(BaseModel): + """ + A paging information related to the data presented in the execution result. These paging information are multi-dimensional. + """ # noqa: E501 + count: List[StrictInt] = Field(description="A count of the returned results in every dimension.") + offset: List[StrictInt] = Field(description="The offset of the results returned in every dimension.") + total: List[StrictInt] = Field(description="A total count of the results in every dimension.") + __properties: ClassVar[List[str]] = ["count", "offset", "total"] + + 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 ExecutionResultPaging 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 ExecutionResultPaging from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "count": obj.get("count"), + "offset": obj.get("offset"), + "total": obj.get("total") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/execution_settings.py b/gooddata-api-client/gooddata_api_client/models/execution_settings.py new file mode 100644 index 000000000..a7e1bce9d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/execution_settings.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionSettings(BaseModel): + """ + Various settings affecting the process of AFM execution or its result + """ # noqa: E501 + data_sampling_percentage: Optional[Union[Annotated[float, Field(lt=100, strict=True, gt=0)], Annotated[int, Field(lt=100, strict=True, gt=0)]]] = Field(default=None, description="Specifies the percentage of rows from fact datasets to use during computation. This feature is available only for workspaces that use a Vertica Data Source without table views.", alias="dataSamplingPercentage") + timestamp: Optional[datetime] = Field(default=None, description="Specifies the timestamp of the execution from which relative filters are resolved. If not set, the current time is used.") + __properties: ClassVar[List[str]] = ["dataSamplingPercentage", "timestamp"] + + 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 ExecutionSettings 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 ExecutionSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataSamplingPercentage": obj.get("dataSamplingPercentage"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/export_request.py b/gooddata-api-client/gooddata_api_client/models/export_request.py new file mode 100644 index 000000000..6384336f6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/export_request.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.tabular_export_request import TabularExportRequest +from gooddata_api_client.models.visual_export_request import VisualExportRequest +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +EXPORTREQUEST_ONE_OF_SCHEMAS = ["TabularExportRequest", "VisualExportRequest"] + +class ExportRequest(BaseModel): + """ + JSON content to be used as export request payload for /export/tabular and /export/visual endpoints. + """ + # data type: VisualExportRequest + oneof_schema_1_validator: Optional[VisualExportRequest] = None + # data type: TabularExportRequest + oneof_schema_2_validator: Optional[TabularExportRequest] = None + actual_instance: Optional[Union[TabularExportRequest, VisualExportRequest]] = None + one_of_schemas: Set[str] = { "TabularExportRequest", "VisualExportRequest" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = ExportRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: VisualExportRequest + if not isinstance(v, VisualExportRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `VisualExportRequest`") + else: + match += 1 + # validate data type: TabularExportRequest + if not isinstance(v, TabularExportRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `TabularExportRequest`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ExportRequest with oneOf schemas: TabularExportRequest, VisualExportRequest. 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 + + # deserialize data into VisualExportRequest + try: + if match == 0: + instance.actual_instance = VisualExportRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TabularExportRequest + try: + if match == 0: + instance.actual_instance = TabularExportRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ExportRequest with oneOf schemas: TabularExportRequest, VisualExportRequest. 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], TabularExportRequest, VisualExportRequest]]: + """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/gooddata-api-client/gooddata_api_client/models/export_response.py b/gooddata-api-client/gooddata_api_client/models/export_response.py new file mode 100644 index 000000000..0111ede8c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/export_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ExportResponse(BaseModel): + """ + ExportResponse + """ # noqa: E501 + export_result: StrictStr = Field(alias="exportResult") + __properties: ClassVar[List[str]] = ["exportResult"] + + 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 ExportResponse 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 ExportResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "exportResult": obj.get("exportResult") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/export_result.py b/gooddata-api-client/gooddata_api_client/models/export_result.py new file mode 100644 index 000000000..42af7abbd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/export_result.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ExportResult(BaseModel): + """ + ExportResult + """ # noqa: E501 + error_message: Optional[StrictStr] = Field(default=None, alias="errorMessage") + expires_at: Optional[datetime] = Field(default=None, alias="expiresAt") + export_id: StrictStr = Field(alias="exportId") + file_name: StrictStr = Field(alias="fileName") + file_size: Optional[StrictInt] = Field(default=None, alias="fileSize") + file_uri: Optional[StrictStr] = Field(default=None, alias="fileUri") + status: StrictStr + trace_id: Optional[StrictStr] = Field(default=None, alias="traceId") + triggered_at: Optional[datetime] = Field(default=None, alias="triggeredAt") + __properties: ClassVar[List[str]] = ["errorMessage", "expiresAt", "exportId", "fileName", "fileSize", "fileUri", "status", "traceId", "triggeredAt"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['SUCCESS', 'ERROR', 'INTERNAL_ERROR', 'TIMEOUT']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SUCCESS', 'ERROR', 'INTERNAL_ERROR', 'TIMEOUT')") + 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 ExportResult 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 ExportResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "errorMessage": obj.get("errorMessage"), + "expiresAt": obj.get("expiresAt"), + "exportId": obj.get("exportId"), + "fileName": obj.get("fileName"), + "fileSize": obj.get("fileSize"), + "fileUri": obj.get("fileUri"), + "status": obj.get("status"), + "traceId": obj.get("traceId"), + "triggeredAt": obj.get("triggeredAt") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/fact_identifier.py b/gooddata-api-client/gooddata_api_client/models/fact_identifier.py new file mode 100644 index 000000000..d06923115 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/fact_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class FactIdentifier(BaseModel): + """ + A fact identifier. + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="Fact ID.") + type: StrictStr = Field(description="A type of the fact.") + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['fact']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('fact')") + 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 FactIdentifier 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 FactIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/failed_operation.py b/gooddata-api-client/gooddata_api_client/models/failed_operation.py new file mode 100644 index 000000000..0cf631b21 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/failed_operation.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 ConfigDict +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.operation import Operation +from gooddata_api_client.models.operation_error import OperationError +from typing import Optional, Set +from typing_extensions import Self + +class FailedOperation(Operation): + """ + Operation that has failed + """ # noqa: E501 + error: OperationError + __properties: ClassVar[List[str]] = ["id", "kind", "status", "error"] + + 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 FailedOperation 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 error + if self.error: + _dict['error'] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FailedOperation 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"), + "kind": obj.get("kind"), + "status": obj.get("status"), + "error": OperationError.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/file.py b/gooddata-api-client/gooddata_api_client/models/file.py new file mode 100644 index 000000000..180b7d9f9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/file.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.notes import Notes +from gooddata_api_client.models.skeleton import Skeleton +from typing import Optional, Set +from typing_extensions import Self + +class File(BaseModel): + """ + File + """ # noqa: E501 + any: Optional[List[Dict[str, Any]]] = None + can_resegment: Optional[StrictStr] = Field(default=None, alias="canResegment") + id: Optional[StrictStr] = None + notes: Optional[Notes] = None + original: Optional[StrictStr] = None + other_attributes: Optional[Dict[str, StrictStr]] = Field(default=None, alias="otherAttributes") + skeleton: Optional[Skeleton] = None + space: Optional[StrictStr] = None + src_dir: Optional[StrictStr] = Field(default=None, alias="srcDir") + translate: Optional[StrictStr] = None + trg_dir: Optional[StrictStr] = Field(default=None, alias="trgDir") + unit_or_group: Optional[List[Dict[str, Any]]] = Field(default=None, alias="unitOrGroup") + __properties: ClassVar[List[str]] = ["any", "canResegment", "id", "notes", "original", "otherAttributes", "skeleton", "space", "srcDir", "translate", "trgDir", "unitOrGroup"] + + @field_validator('can_resegment') + def can_resegment_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['YES', 'NO']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('YES', 'NO')") + return value + + @field_validator('src_dir') + def src_dir_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['LTR', 'RTL', 'AUTO']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('LTR', 'RTL', 'AUTO')") + return value + + @field_validator('translate') + def translate_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['YES', 'NO']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('YES', 'NO')") + return value + + @field_validator('trg_dir') + def trg_dir_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['LTR', 'RTL', 'AUTO']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('LTR', 'RTL', 'AUTO')") + 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 File 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 notes + if self.notes: + _dict['notes'] = self.notes.to_dict() + # override the default output from pydantic by calling `to_dict()` of skeleton + if self.skeleton: + _dict['skeleton'] = self.skeleton.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of File from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "any": obj.get("any"), + "canResegment": obj.get("canResegment"), + "id": obj.get("id"), + "notes": Notes.from_dict(obj["notes"]) if obj.get("notes") is not None else None, + "original": obj.get("original"), + "otherAttributes": obj.get("otherAttributes"), + "skeleton": Skeleton.from_dict(obj["skeleton"]) if obj.get("skeleton") is not None else None, + "space": obj.get("space"), + "srcDir": obj.get("srcDir"), + "translate": obj.get("translate"), + "trgDir": obj.get("trgDir"), + "unitOrGroup": obj.get("unitOrGroup") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/filter_by.py b/gooddata-api-client/gooddata_api_client/models/filter_by.py new file mode 100644 index 000000000..71aa40a9f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/filter_by.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class FilterBy(BaseModel): + """ + Specifies what is used for filtering. + """ # noqa: E501 + label_type: Optional[StrictStr] = Field(default='REQUESTED', description="Specifies which label is used for filtering - primary or requested.", alias="labelType") + __properties: ClassVar[List[str]] = ["labelType"] + + @field_validator('label_type') + def label_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['PRIMARY', 'REQUESTED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('PRIMARY', 'REQUESTED')") + 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 FilterBy 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 FilterBy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labelType": obj.get("labelType") if obj.get("labelType") is not None else 'REQUESTED' + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/filter_definition.py b/gooddata-api-client/gooddata_api_client/models/filter_definition.py new file mode 100644 index 000000000..89becbddd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/filter_definition.py @@ -0,0 +1,276 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.absolute_date_filter import AbsoluteDateFilter +from gooddata_api_client.models.all_time_date_filter import AllTimeDateFilter +from gooddata_api_client.models.comparison_measure_value_filter import ComparisonMeasureValueFilter +from gooddata_api_client.models.compound_measure_value_filter import CompoundMeasureValueFilter +from gooddata_api_client.models.inline_filter_definition import InlineFilterDefinition +from gooddata_api_client.models.match_attribute_filter import MatchAttributeFilter +from gooddata_api_client.models.negative_attribute_filter import NegativeAttributeFilter +from gooddata_api_client.models.positive_attribute_filter import PositiveAttributeFilter +from gooddata_api_client.models.range_measure_value_filter import RangeMeasureValueFilter +from gooddata_api_client.models.ranking_filter import RankingFilter +from gooddata_api_client.models.relative_date_filter import RelativeDateFilter +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +FILTERDEFINITION_ONE_OF_SCHEMAS = ["AbsoluteDateFilter", "AllTimeDateFilter", "ComparisonMeasureValueFilter", "CompoundMeasureValueFilter", "InlineFilterDefinition", "MatchAttributeFilter", "NegativeAttributeFilter", "PositiveAttributeFilter", "RangeMeasureValueFilter", "RankingFilter", "RelativeDateFilter"] + +class FilterDefinition(BaseModel): + """ + Abstract filter definition type + """ + # data type: InlineFilterDefinition + oneof_schema_1_validator: Optional[InlineFilterDefinition] = None + # data type: RankingFilter + oneof_schema_2_validator: Optional[RankingFilter] = None + # data type: ComparisonMeasureValueFilter + oneof_schema_3_validator: Optional[ComparisonMeasureValueFilter] = None + # data type: RangeMeasureValueFilter + oneof_schema_4_validator: Optional[RangeMeasureValueFilter] = None + # data type: CompoundMeasureValueFilter + oneof_schema_5_validator: Optional[CompoundMeasureValueFilter] = None + # data type: AbsoluteDateFilter + oneof_schema_6_validator: Optional[AbsoluteDateFilter] = None + # data type: RelativeDateFilter + oneof_schema_7_validator: Optional[RelativeDateFilter] = None + # data type: AllTimeDateFilter + oneof_schema_8_validator: Optional[AllTimeDateFilter] = None + # data type: NegativeAttributeFilter + oneof_schema_9_validator: Optional[NegativeAttributeFilter] = None + # data type: PositiveAttributeFilter + oneof_schema_10_validator: Optional[PositiveAttributeFilter] = None + # data type: MatchAttributeFilter + oneof_schema_11_validator: Optional[MatchAttributeFilter] = None + actual_instance: Optional[Union[AbsoluteDateFilter, AllTimeDateFilter, ComparisonMeasureValueFilter, CompoundMeasureValueFilter, InlineFilterDefinition, MatchAttributeFilter, NegativeAttributeFilter, PositiveAttributeFilter, RangeMeasureValueFilter, RankingFilter, RelativeDateFilter]] = None + one_of_schemas: Set[str] = { "AbsoluteDateFilter", "AllTimeDateFilter", "ComparisonMeasureValueFilter", "CompoundMeasureValueFilter", "InlineFilterDefinition", "MatchAttributeFilter", "NegativeAttributeFilter", "PositiveAttributeFilter", "RangeMeasureValueFilter", "RankingFilter", "RelativeDateFilter" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = FilterDefinition.model_construct() + error_messages = [] + match = 0 + # validate data type: InlineFilterDefinition + if not isinstance(v, InlineFilterDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `InlineFilterDefinition`") + else: + match += 1 + # validate data type: RankingFilter + if not isinstance(v, RankingFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `RankingFilter`") + else: + match += 1 + # validate data type: ComparisonMeasureValueFilter + if not isinstance(v, ComparisonMeasureValueFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `ComparisonMeasureValueFilter`") + else: + match += 1 + # validate data type: RangeMeasureValueFilter + if not isinstance(v, RangeMeasureValueFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `RangeMeasureValueFilter`") + else: + match += 1 + # validate data type: CompoundMeasureValueFilter + if not isinstance(v, CompoundMeasureValueFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `CompoundMeasureValueFilter`") + else: + match += 1 + # validate data type: AbsoluteDateFilter + if not isinstance(v, AbsoluteDateFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `AbsoluteDateFilter`") + else: + match += 1 + # validate data type: RelativeDateFilter + if not isinstance(v, RelativeDateFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `RelativeDateFilter`") + else: + match += 1 + # validate data type: AllTimeDateFilter + if not isinstance(v, AllTimeDateFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `AllTimeDateFilter`") + else: + match += 1 + # validate data type: NegativeAttributeFilter + if not isinstance(v, NegativeAttributeFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `NegativeAttributeFilter`") + else: + match += 1 + # validate data type: PositiveAttributeFilter + if not isinstance(v, PositiveAttributeFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `PositiveAttributeFilter`") + else: + match += 1 + # validate data type: MatchAttributeFilter + if not isinstance(v, MatchAttributeFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `MatchAttributeFilter`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in FilterDefinition with oneOf schemas: AbsoluteDateFilter, AllTimeDateFilter, ComparisonMeasureValueFilter, CompoundMeasureValueFilter, InlineFilterDefinition, MatchAttributeFilter, NegativeAttributeFilter, PositiveAttributeFilter, RangeMeasureValueFilter, RankingFilter, RelativeDateFilter. 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 + + # deserialize data into InlineFilterDefinition + try: + if match == 0: + instance.actual_instance = InlineFilterDefinition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RankingFilter + try: + if match == 0: + instance.actual_instance = RankingFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ComparisonMeasureValueFilter + try: + if match == 0: + instance.actual_instance = ComparisonMeasureValueFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RangeMeasureValueFilter + try: + if match == 0: + instance.actual_instance = RangeMeasureValueFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CompoundMeasureValueFilter + try: + if match == 0: + instance.actual_instance = CompoundMeasureValueFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AbsoluteDateFilter + try: + if match == 0: + instance.actual_instance = AbsoluteDateFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RelativeDateFilter + try: + if match == 0: + instance.actual_instance = RelativeDateFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AllTimeDateFilter + try: + if match == 0: + instance.actual_instance = AllTimeDateFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into NegativeAttributeFilter + try: + if match == 0: + instance.actual_instance = NegativeAttributeFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PositiveAttributeFilter + try: + if match == 0: + instance.actual_instance = PositiveAttributeFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MatchAttributeFilter + try: + if match == 0: + instance.actual_instance = MatchAttributeFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into FilterDefinition with oneOf schemas: AbsoluteDateFilter, AllTimeDateFilter, ComparisonMeasureValueFilter, CompoundMeasureValueFilter, InlineFilterDefinition, MatchAttributeFilter, NegativeAttributeFilter, PositiveAttributeFilter, RangeMeasureValueFilter, RankingFilter, RelativeDateFilter. 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], AbsoluteDateFilter, AllTimeDateFilter, ComparisonMeasureValueFilter, CompoundMeasureValueFilter, InlineFilterDefinition, MatchAttributeFilter, NegativeAttributeFilter, PositiveAttributeFilter, RangeMeasureValueFilter, RankingFilter, RelativeDateFilter]]: + """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/gooddata-api-client/gooddata_api_client/models/filter_definition_for_simple_measure.py b/gooddata-api-client/gooddata_api_client/models/filter_definition_for_simple_measure.py new file mode 100644 index 000000000..e410a3aa3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/filter_definition_for_simple_measure.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.attribute_filter import AttributeFilter +from gooddata_api_client.models.date_filter import DateFilter +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +FILTERDEFINITIONFORSIMPLEMEASURE_ONE_OF_SCHEMAS = ["AttributeFilter", "DateFilter"] + +class FilterDefinitionForSimpleMeasure(BaseModel): + """ + Abstract filter definition type for simple metric. + """ + # data type: DateFilter + oneof_schema_1_validator: Optional[DateFilter] = None + # data type: AttributeFilter + oneof_schema_2_validator: Optional[AttributeFilter] = None + actual_instance: Optional[Union[AttributeFilter, DateFilter]] = None + one_of_schemas: Set[str] = { "AttributeFilter", "DateFilter" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = FilterDefinitionForSimpleMeasure.model_construct() + error_messages = [] + match = 0 + # validate data type: DateFilter + if not isinstance(v, DateFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `DateFilter`") + else: + match += 1 + # validate data type: AttributeFilter + if not isinstance(v, AttributeFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `AttributeFilter`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in FilterDefinitionForSimpleMeasure with oneOf schemas: AttributeFilter, DateFilter. 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 + + # deserialize data into DateFilter + try: + if match == 0: + instance.actual_instance = DateFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AttributeFilter + try: + if match == 0: + instance.actual_instance = AttributeFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into FilterDefinitionForSimpleMeasure with oneOf schemas: AttributeFilter, DateFilter. 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], AttributeFilter, DateFilter]]: + """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/gooddata-api-client/gooddata_api_client/models/forecast_config.py b/gooddata-api-client/gooddata_api_client/models/forecast_config.py new file mode 100644 index 000000000..96f262cc4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/forecast_config.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class ForecastConfig(BaseModel): + """ + Forecast configuration. + """ # noqa: E501 + confidence_level: Union[StrictFloat, StrictInt] = Field(description="Confidence interval boundary value.", alias="confidenceLevel") + forecast_period: StrictInt = Field(description="Number of future periods that should be forecasted", alias="forecastPeriod") + seasonal: StrictBool = Field(description="Whether the input data is seasonal") + __properties: ClassVar[List[str]] = ["confidenceLevel", "forecastPeriod", "seasonal"] + + 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 ForecastConfig 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 ForecastConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "confidenceLevel": obj.get("confidenceLevel"), + "forecastPeriod": obj.get("forecastPeriod"), + "seasonal": obj.get("seasonal") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/forecast_request.py b/gooddata-api-client/gooddata_api_client/models/forecast_request.py new file mode 100644 index 000000000..2eccd2067 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/forecast_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, 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 + +class ForecastRequest(BaseModel): + """ + ForecastRequest + """ # noqa: E501 + confidence_level: Optional[Union[Annotated[float, Field(lt=1.0, strict=True, gt=0.0)], Annotated[int, Field(lt=1, strict=True, gt=0)]]] = Field(default=0.95, description="Confidence interval boundary value.", alias="confidenceLevel") + forecast_period: StrictInt = Field(description="Number of future periods that should be forecasted", alias="forecastPeriod") + seasonal: Optional[StrictBool] = Field(default=False, description="Whether the input data is seasonal") + __properties: ClassVar[List[str]] = ["confidenceLevel", "forecastPeriod", "seasonal"] + + 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 ForecastRequest 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 ForecastRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "confidenceLevel": obj.get("confidenceLevel") if obj.get("confidenceLevel") is not None else 0.95, + "forecastPeriod": obj.get("forecastPeriod"), + "seasonal": obj.get("seasonal") if obj.get("seasonal") is not None else False + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/forecast_result.py b/gooddata-api-client/gooddata_api_client/models/forecast_result.py new file mode 100644 index 000000000..6756ffbd1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/forecast_result.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ForecastResult(BaseModel): + """ + ForecastResult + """ # noqa: E501 + attribute: List[StrictStr] + lower_bound: List[Optional[Union[StrictFloat, StrictInt]]] = Field(alias="lowerBound") + origin: List[Optional[Union[StrictFloat, StrictInt]]] + prediction: List[Optional[Union[StrictFloat, StrictInt]]] + upper_bound: List[Optional[Union[StrictFloat, StrictInt]]] = Field(alias="upperBound") + __properties: ClassVar[List[str]] = ["attribute", "lowerBound", "origin", "prediction", "upperBound"] + + 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 ForecastResult 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 ForecastResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attribute": obj.get("attribute"), + "lowerBound": obj.get("lowerBound"), + "origin": obj.get("origin"), + "prediction": obj.get("prediction"), + "upperBound": obj.get("upperBound") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/found_objects.py b/gooddata-api-client/gooddata_api_client/models/found_objects.py new file mode 100644 index 000000000..697b6804a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/found_objects.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.search_result_object import SearchResultObject +from typing import Optional, Set +from typing_extensions import Self + +class FoundObjects(BaseModel): + """ + List of objects found by similarity search and post-processed by LLM. + """ # noqa: E501 + objects: List[SearchResultObject] = Field(description="List of objects found with a similarity search.") + reasoning: StrictStr = Field(description="DEPRECATED: Use top-level reasoning.steps instead. Reasoning from LLM. Description of how and why the answer was generated.") + __properties: ClassVar[List[str]] = ["objects", "reasoning"] + + 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 FoundObjects 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 each item in objects (list) + _items = [] + if self.objects: + for _item_objects in self.objects: + if _item_objects: + _items.append(_item_objects.to_dict()) + _dict['objects'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FoundObjects from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "objects": [SearchResultObject.from_dict(_item) for _item in obj["objects"]] if obj.get("objects") is not None else None, + "reasoning": obj.get("reasoning") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/frequency.py b/gooddata-api-client/gooddata_api_client/models/frequency.py new file mode 100644 index 000000000..04c3deaa6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/frequency.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.frequency_bucket import FrequencyBucket +from typing import Optional, Set +from typing_extensions import Self + +class Frequency(BaseModel): + """ + Frequency + """ # noqa: E501 + buckets: List[FrequencyBucket] + __properties: ClassVar[List[str]] = ["buckets"] + + 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 Frequency 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 each item in buckets (list) + _items = [] + if self.buckets: + for _item_buckets in self.buckets: + if _item_buckets: + _items.append(_item_buckets.to_dict()) + _dict['buckets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Frequency from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "buckets": [FrequencyBucket.from_dict(_item) for _item in obj["buckets"]] if obj.get("buckets") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/frequency_bucket.py b/gooddata-api-client/gooddata_api_client/models/frequency_bucket.py new file mode 100644 index 000000000..47026650b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/frequency_bucket.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FrequencyBucket(BaseModel): + """ + FrequencyBucket + """ # noqa: E501 + count: StrictInt + value: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["count", "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 FrequencyBucket 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 FrequencyBucket from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "count": obj.get("count"), + "value": obj.get("value") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/frequency_properties.py b/gooddata-api-client/gooddata_api_client/models/frequency_properties.py new file mode 100644 index 000000000..838374542 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/frequency_properties.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 FrequencyProperties(BaseModel): + """ + FrequencyProperties + """ # noqa: E501 + value_limit: Optional[StrictInt] = Field(default=10, description="The maximum number of distinct values to return.", alias="valueLimit") + __properties: ClassVar[List[str]] = ["valueLimit"] + + 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 FrequencyProperties 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 FrequencyProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "valueLimit": obj.get("valueLimit") if obj.get("valueLimit") is not None else 10 + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/generate_description_request.py b/gooddata-api-client/gooddata_api_client/models/generate_description_request.py new file mode 100644 index 000000000..36a911716 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/generate_description_request.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class GenerateDescriptionRequest(BaseModel): + """ + GenerateDescriptionRequest + """ # noqa: E501 + object_id: StrictStr = Field(description="Identifier of the object to describe", alias="objectId") + object_type: StrictStr = Field(description="Type of the object to describe. One of: visualization, dashboard, metric, fact, attribute", alias="objectType") + __properties: ClassVar[List[str]] = ["objectId", "objectType"] + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Visualization', 'Dashboard', 'Metric', 'Fact', 'Attribute']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('Visualization', 'Dashboard', 'Metric', 'Fact', 'Attribute')") + 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 GenerateDescriptionRequest 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 GenerateDescriptionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "objectId": obj.get("objectId"), + "objectType": obj.get("objectType") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/generate_description_response.py b/gooddata-api-client/gooddata_api_client/models/generate_description_response.py new file mode 100644 index 000000000..8f1e8cc00 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/generate_description_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 GenerateDescriptionResponse(BaseModel): + """ + GenerateDescriptionResponse + """ # noqa: E501 + description: Optional[StrictStr] = Field(default=None, description="Generated description of the requested object") + note: Optional[StrictStr] = Field(default=None, description="Additional note with details in case generation was not performed") + __properties: ClassVar[List[str]] = ["description", "note"] + + 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 GenerateDescriptionResponse 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 GenerateDescriptionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "note": obj.get("note") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/generate_ldm_request.py b/gooddata-api-client/gooddata_api_client/models/generate_ldm_request.py new file mode 100644 index 000000000..b38dbf08d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/generate_ldm_request.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.pdm_ldm_request import PdmLdmRequest +from typing import Optional, Set +from typing_extensions import Self + +class GenerateLdmRequest(BaseModel): + """ + A request containing all information needed for generation of logical model. + """ # noqa: E501 + aggregated_fact_prefix: Optional[StrictStr] = Field(default=None, description="Columns starting with this prefix will be considered as aggregated facts. The prefix is then followed by the value of `separator` parameter. Given the aggregated fact prefix is `aggr` and separator is `__`, the columns with name like `aggr__sum__product__sold` will be considered as aggregated sold fact in the product table with SUM aggregate function.", alias="aggregatedFactPrefix") + date_granularities: Optional[StrictStr] = Field(default=None, description="Option to control date granularities for date datasets. Empty value enables common date granularities (DAY, WEEK, MONTH, QUARTER, YEAR). Default value is `all` which enables all available date granularities, including time granularities (like hours, minutes).", alias="dateGranularities") + date_reference_prefix: Optional[StrictStr] = Field(default=None, description="Columns starting with this prefix will be considered as references to date dataset. The prefix is then followed by the value of `separator` parameter. Given the reference prefix is `d` and separator is `__`, the columns with name like `d__date` will be considered as reference to date dataset. There can be also second separator and granularity suffix, e.g. `d__date__day` to create attribute reference to exact date dataset and granularity.", alias="dateReferencePrefix") + denorm_prefix: Optional[StrictStr] = Field(default=None, description="Columns starting with this prefix will be considered as denormalization references. The prefix is then followed by the value of `separator` parameter. Given the denormalization reference prefix is `dr` and separator is `__`, the columns with name like `dr__customer_name` will be considered as denormalization references.", alias="denormPrefix") + fact_prefix: Optional[StrictStr] = Field(default=None, description="Columns starting with this prefix will be considered as facts. The prefix is then followed by the value of `separator` parameter. Given the fact prefix is `f` and separator is `__`, the columns with name like `f__sold` will be considered as facts.", alias="factPrefix") + generate_long_ids: Optional[StrictBool] = Field(default=False, description="A flag dictating how the attribute, fact and label ids are generated. By default their ids are derived only from the column name, unless there would be a conflict (e.g. category coming from two different tables). In that case a long id format of `.` is used. If the flag is set to true, then all ids will be generated in the long form.", alias="generateLongIds") + grain_multivalue_reference_prefix: Optional[StrictStr] = Field(default=None, description="Columns starting with this prefix will be considered as grain multivalue references. The prefix is then followed by the value of `separator` parameter. Given the reference prefix is `grmr` and separator is `__`, the columns with name like `grmr__customer__customer_id` will be considered as grain multivalue references to customer_id in customer table.", alias="grainMultivalueReferencePrefix") + grain_prefix: Optional[StrictStr] = Field(default=None, description="Columns starting with this prefix will be considered as grains. The prefix is then followed by the value of `separator` parameter. Given the grain prefix is `gr` and separator is `__`, the columns with name like `gr__name` will be considered as grains.", alias="grainPrefix") + grain_reference_prefix: Optional[StrictStr] = Field(default=None, description="Columns starting with this prefix will be considered as grain references. The prefix is then followed by the value of `separator` parameter. For composite references, the reference is multivalue if at least one column is multivalue. Given the reference prefix is `grr` and separator is `__`, the columns with name like `grr__customer__customer_id` will be considered as grain references to customer_id in customer table.", alias="grainReferencePrefix") + multivalue_reference_prefix: Optional[StrictStr] = Field(default=None, description="Columns starting with this prefix will be considered as multivalue references. The prefix is then followed by the value of `separator` parameter. For composite references, the reference is multivalue if at least one column is multivalue. Given the reference prefix is `mr` and separator is `__`, the columns with name like `mr__customer__customer_id` will be considered as multivalue references to customer_id in customer table.", alias="multivalueReferencePrefix") + pdm: Optional[PdmLdmRequest] = None + primary_label_prefix: Optional[StrictStr] = Field(default=None, description="Columns starting with this prefix will be considered as primary labels. The prefix is then followed by the value of `separator` parameter. Given the primary label prefix is `pl` and separator is `__`, the columns with name like `pl__country_id` will be considered as primary labels.", alias="primaryLabelPrefix") + reference_prefix: Optional[StrictStr] = Field(default=None, description="Columns starting with this prefix will be considered as references. The prefix is then followed by the value of `separator` parameter. Given the reference prefix is `r` and separator is `__`, the columns with name like `r__customer__customer_id` will be considered as references to customer_id in customer table.", alias="referencePrefix") + secondary_label_prefix: Optional[StrictStr] = Field(default=None, description="Columns starting with this prefix will be considered as secondary labels. The prefix is then followed by the value of `separator` parameter. Given the secondary label prefix is `ls` and separator is `__`, the columns with name like `ls__country_id__country_name` will be considered as secondary labels.", alias="secondaryLabelPrefix") + separator: Optional[StrictStr] = Field(default='__', description="A separator between prefixes and the names. Default is \"__\".") + table_prefix: Optional[StrictStr] = Field(default=None, description="Tables starting with this prefix will be included. The prefix is then followed by the value of `separator` parameter. Given the table prefix is `out_table` and separator is `__`, the table with name like `out_table__customers` will be scanned.", alias="tablePrefix") + translation_prefix: Optional[StrictStr] = Field(default=None, description="Columns starting with this prefix will be considered as secondary label translation. The prefix is then followed by the value of `separator` parameter. Given the translation prefix is `tr` and separator is `__`, the columns with name like `tr__attribute__label__en-US` will be considered as secondary label en-US translation to `label` label in `attribute` attribute.", alias="translationPrefix") + view_prefix: Optional[StrictStr] = Field(default=None, description="Views starting with this prefix will be included. The prefix is then followed by the value of `separator` parameter. Given the view prefix is `out_view` and separator is `__`, the table with name like `out_view__us_customers` will be scanned.", alias="viewPrefix") + wdf_prefix: Optional[StrictStr] = Field(default='wdf', description="Column serving as workspace data filter. No labels are auto generated for such columns.", alias="wdfPrefix") + workspace_id: Optional[StrictStr] = Field(default=None, description="Optional workspace id.", alias="workspaceId") + __properties: ClassVar[List[str]] = ["aggregatedFactPrefix", "dateGranularities", "dateReferencePrefix", "denormPrefix", "factPrefix", "generateLongIds", "grainMultivalueReferencePrefix", "grainPrefix", "grainReferencePrefix", "multivalueReferencePrefix", "pdm", "primaryLabelPrefix", "referencePrefix", "secondaryLabelPrefix", "separator", "tablePrefix", "translationPrefix", "viewPrefix", "wdfPrefix", "workspaceId"] + + 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 GenerateLdmRequest 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 pdm + if self.pdm: + _dict['pdm'] = self.pdm.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GenerateLdmRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aggregatedFactPrefix": obj.get("aggregatedFactPrefix"), + "dateGranularities": obj.get("dateGranularities"), + "dateReferencePrefix": obj.get("dateReferencePrefix"), + "denormPrefix": obj.get("denormPrefix"), + "factPrefix": obj.get("factPrefix"), + "generateLongIds": obj.get("generateLongIds") if obj.get("generateLongIds") is not None else False, + "grainMultivalueReferencePrefix": obj.get("grainMultivalueReferencePrefix"), + "grainPrefix": obj.get("grainPrefix"), + "grainReferencePrefix": obj.get("grainReferencePrefix"), + "multivalueReferencePrefix": obj.get("multivalueReferencePrefix"), + "pdm": PdmLdmRequest.from_dict(obj["pdm"]) if obj.get("pdm") is not None else None, + "primaryLabelPrefix": obj.get("primaryLabelPrefix"), + "referencePrefix": obj.get("referencePrefix"), + "secondaryLabelPrefix": obj.get("secondaryLabelPrefix"), + "separator": obj.get("separator") if obj.get("separator") is not None else '__', + "tablePrefix": obj.get("tablePrefix"), + "translationPrefix": obj.get("translationPrefix"), + "viewPrefix": obj.get("viewPrefix"), + "wdfPrefix": obj.get("wdfPrefix") if obj.get("wdfPrefix") is not None else 'wdf', + "workspaceId": obj.get("workspaceId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/generate_title_request.py b/gooddata-api-client/gooddata_api_client/models/generate_title_request.py new file mode 100644 index 000000000..7a64c81eb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/generate_title_request.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class GenerateTitleRequest(BaseModel): + """ + GenerateTitleRequest + """ # noqa: E501 + object_id: StrictStr = Field(description="Identifier of the object to title", alias="objectId") + object_type: StrictStr = Field(description="Type of the object to title. Matches chat-search object types.", alias="objectType") + __properties: ClassVar[List[str]] = ["objectId", "objectType"] + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Visualization', 'Dashboard', 'Metric', 'Fact', 'Attribute']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('Visualization', 'Dashboard', 'Metric', 'Fact', 'Attribute')") + 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 GenerateTitleRequest 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 GenerateTitleRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "objectId": obj.get("objectId"), + "objectType": obj.get("objectType") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/generate_title_response.py b/gooddata-api-client/gooddata_api_client/models/generate_title_response.py new file mode 100644 index 000000000..4ee946e4d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/generate_title_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 GenerateTitleResponse(BaseModel): + """ + GenerateTitleResponse + """ # noqa: E501 + note: Optional[StrictStr] = Field(default=None, description="Additional note with details in case generation was not performed") + title: Optional[StrictStr] = Field(default=None, description="Generated title of the requested object") + __properties: ClassVar[List[str]] = ["note", "title"] + + 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 GenerateTitleResponse 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 GenerateTitleResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "note": obj.get("note"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/geo_area_config.py b/gooddata-api-client/gooddata_api_client/models/geo_area_config.py new file mode 100644 index 000000000..e952b8c86 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/geo_area_config.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.geo_collection_identifier import GeoCollectionIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class GeoAreaConfig(BaseModel): + """ + Configuration specific to geo area labels. + """ # noqa: E501 + collection: GeoCollectionIdentifier + __properties: ClassVar[List[str]] = ["collection"] + + 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 GeoAreaConfig 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 collection + if self.collection: + _dict['collection'] = self.collection.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GeoAreaConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "collection": GeoCollectionIdentifier.from_dict(obj["collection"]) if obj.get("collection") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/geo_collection_identifier.py b/gooddata-api-client/gooddata_api_client/models/geo_collection_identifier.py new file mode 100644 index 000000000..e53e3c6dd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/geo_collection_identifier.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 GeoCollectionIdentifier(BaseModel): + """ + GeoCollectionIdentifier + """ # noqa: E501 + id: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Geo collection identifier.") + kind: Optional[StrictStr] = Field(default='STATIC', description="Type of geo collection.") + __properties: ClassVar[List[str]] = ["id", "kind"] + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['STATIC', 'CUSTOM']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('STATIC', 'CUSTOM')") + 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 GeoCollectionIdentifier 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 GeoCollectionIdentifier 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"), + "kind": obj.get("kind") if obj.get("kind") is not None else 'STATIC' + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/get_ai_lake_operation200_response.py b/gooddata-api-client/gooddata_api_client/models/get_ai_lake_operation200_response.py new file mode 100644 index 000000000..1dd5b0f1c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/get_ai_lake_operation200_response.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.failed_operation import FailedOperation +from gooddata_api_client.models.pending_operation import PendingOperation +from gooddata_api_client.models.succeeded_operation import SucceededOperation +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +GETAILAKEOPERATION200RESPONSE_ONE_OF_SCHEMAS = ["FailedOperation", "PendingOperation", "SucceededOperation"] + +class GetAiLakeOperation200Response(BaseModel): + """ + GetAiLakeOperation200Response + """ + # data type: FailedOperation + oneof_schema_1_validator: Optional[FailedOperation] = None + # data type: PendingOperation + oneof_schema_2_validator: Optional[PendingOperation] = None + # data type: SucceededOperation + oneof_schema_3_validator: Optional[SucceededOperation] = None + actual_instance: Optional[Union[FailedOperation, PendingOperation, SucceededOperation]] = None + one_of_schemas: Set[str] = { "FailedOperation", "PendingOperation", "SucceededOperation" } + + 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 = GetAiLakeOperation200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: FailedOperation + if not isinstance(v, FailedOperation): + error_messages.append(f"Error! Input type `{type(v)}` is not `FailedOperation`") + else: + match += 1 + # validate data type: PendingOperation + if not isinstance(v, PendingOperation): + error_messages.append(f"Error! Input type `{type(v)}` is not `PendingOperation`") + else: + match += 1 + # validate data type: SucceededOperation + if not isinstance(v, SucceededOperation): + error_messages.append(f"Error! Input type `{type(v)}` is not `SucceededOperation`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in GetAiLakeOperation200Response with oneOf schemas: FailedOperation, PendingOperation, SucceededOperation. 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 + + # deserialize data into FailedOperation + try: + if match == 0: + instance.actual_instance = FailedOperation.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PendingOperation + try: + if match == 0: + instance.actual_instance = PendingOperation.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SucceededOperation + try: + if match == 0: + instance.actual_instance = SucceededOperation.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into GetAiLakeOperation200Response with oneOf schemas: FailedOperation, PendingOperation, SucceededOperation. 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], FailedOperation, PendingOperation, SucceededOperation]]: + """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/gooddata-api-client/gooddata_api_client/models/get_image_export202_response_inner.py b/gooddata-api-client/gooddata_api_client/models/get_image_export202_response_inner.py new file mode 100644 index 000000000..e6ae7c919 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/get_image_export202_response_inner.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class GetImageExport202ResponseInner(BaseModel): + """ + GetImageExport202ResponseInner + """ # noqa: E501 + char: Optional[StrictStr] = None + direct: Optional[StrictBool] = None + double: Optional[Union[StrictFloat, StrictInt]] = None + var_float: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="float") + int: Optional[StrictInt] = None + long: Optional[StrictInt] = None + read_only: Optional[StrictBool] = Field(default=None, alias="readOnly") + short: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["char", "direct", "double", "float", "int", "long", "readOnly", "short"] + + 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 GetImageExport202ResponseInner 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 GetImageExport202ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "char": obj.get("char"), + "direct": obj.get("direct"), + "double": obj.get("double"), + "float": obj.get("float"), + "int": obj.get("int"), + "long": obj.get("long"), + "readOnly": obj.get("readOnly"), + "short": obj.get("short") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/get_quality_issues_response.py b/gooddata-api-client/gooddata_api_client/models/get_quality_issues_response.py new file mode 100644 index 000000000..d211610d7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/get_quality_issues_response.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.quality_issue import QualityIssue +from typing import Optional, Set +from typing_extensions import Self + +class GetQualityIssuesResponse(BaseModel): + """ + GetQualityIssuesResponse + """ # noqa: E501 + issues: List[QualityIssue] = Field(description="List of quality issues found in the workspace") + status: StrictStr = Field(description="Status of the latest triggered quality check process") + updated_at: Optional[StrictStr] = Field(default=None, description="Timestamp when the quality issues were last updated (ISO format)", alias="updatedAt") + __properties: ClassVar[List[str]] = ["issues", "status", "updatedAt"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['RUNNING', 'SYNCING', 'COMPLETED', 'FAILED', 'CANCELLED', 'NOT_FOUND', 'DISABLED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('RUNNING', 'SYNCING', 'COMPLETED', 'FAILED', 'CANCELLED', 'NOT_FOUND', 'DISABLED')") + 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 GetQualityIssuesResponse 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 each item in issues (list) + _items = [] + if self.issues: + for _item_issues in self.issues: + if _item_issues: + _items.append(_item_issues.to_dict()) + _dict['issues'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetQualityIssuesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "issues": [QualityIssue.from_dict(_item) for _item in obj["issues"]] if obj.get("issues") is not None else None, + "status": obj.get("status"), + "updatedAt": obj.get("updatedAt") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/grain_identifier.py b/gooddata-api-client/gooddata_api_client/models/grain_identifier.py new file mode 100644 index 000000000..c43a03a28 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/grain_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class GrainIdentifier(BaseModel): + """ + A grain identifier. + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="Grain ID.") + type: StrictStr = Field(description="A type of the grain.") + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attribute', 'date']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attribute', 'date')") + 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 GrainIdentifier 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 GrainIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/granted_permission.py b/gooddata-api-client/gooddata_api_client/models/granted_permission.py new file mode 100644 index 000000000..5f4e3f10a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/granted_permission.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class GrantedPermission(BaseModel): + """ + Permissions granted to the user group + """ # noqa: E501 + level: StrictStr = Field(description="Level of permission") + source: StrictStr = Field(description="Source of permission") + __properties: ClassVar[List[str]] = ["level", "source"] + + 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 GrantedPermission 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 GrantedPermission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "level": obj.get("level"), + "source": obj.get("source") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/granularities_formatting.py b/gooddata-api-client/gooddata_api_client/models/granularities_formatting.py new file mode 100644 index 000000000..267a0aab8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/granularities_formatting.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class GranularitiesFormatting(BaseModel): + """ + A date dataset granularities title formatting rules. + """ # noqa: E501 + title_base: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Title base is used as a token in title pattern. If left empty, it is replaced by date dataset title.", alias="titleBase") + title_pattern: Annotated[str, Field(strict=True, max_length=255)] = Field(description="This pattern is used to generate the title of attributes and labels that result from the granularities. There are two tokens available: * `%titleBase` - represents shared part by all titles, or title of Date Dataset if left empty * `%granularityTitle` - represents `DateGranularity` built-in title", alias="titlePattern") + __properties: ClassVar[List[str]] = ["titleBase", "titlePattern"] + + 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 GranularitiesFormatting 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 GranularitiesFormatting from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "titleBase": obj.get("titleBase"), + "titlePattern": obj.get("titlePattern") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/header_group.py b/gooddata-api-client/gooddata_api_client/models/header_group.py new file mode 100644 index 000000000..513f55301 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/header_group.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.execution_result_header import ExecutionResultHeader +from typing import Optional, Set +from typing_extensions import Self + +class HeaderGroup(BaseModel): + """ + Contains the information specific for a group of headers. These groups correlate to attributes and metric groups. + """ # noqa: E501 + headers: List[ExecutionResultHeader] = Field(description="An array containing headers.") + __properties: ClassVar[List[str]] = ["headers"] + + 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 HeaderGroup 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 each item in headers (list) + _items = [] + if self.headers: + for _item_headers in self.headers: + if _item_headers: + _items.append(_item_headers.to_dict()) + _dict['headers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HeaderGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "headers": [ExecutionResultHeader.from_dict(_item) for _item in obj["headers"]] if obj.get("headers") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/hierarchy_object_identification.py b/gooddata-api-client/gooddata_api_client/models/hierarchy_object_identification.py new file mode 100644 index 000000000..76c88d96e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/hierarchy_object_identification.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 HierarchyObjectIdentification(BaseModel): + """ + Represents objects with given ID and type in workspace hierarchy (more than one can exists in different workspaces). + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['analyticalDashboard', 'attribute', 'dashboardPlugin', 'dataset', 'fact', 'label', 'metric', 'prompt', 'visualizationObject', 'filterContext', 'workspaceDataFilter', 'workspaceDataFilterSettings']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('analyticalDashboard', 'attribute', 'dashboardPlugin', 'dataset', 'fact', 'label', 'metric', 'prompt', 'visualizationObject', 'filterContext', 'workspaceDataFilter', 'workspaceDataFilterSettings')") + 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 HierarchyObjectIdentification 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 HierarchyObjectIdentification 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/histogram.py b/gooddata-api-client/gooddata_api_client/models/histogram.py new file mode 100644 index 000000000..77e5fb423 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/histogram.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.histogram_bucket import HistogramBucket +from typing import Optional, Set +from typing_extensions import Self + +class Histogram(BaseModel): + """ + Histogram + """ # noqa: E501 + buckets: List[HistogramBucket] + __properties: ClassVar[List[str]] = ["buckets"] + + 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 Histogram 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 each item in buckets (list) + _items = [] + if self.buckets: + for _item_buckets in self.buckets: + if _item_buckets: + _items.append(_item_buckets.to_dict()) + _dict['buckets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Histogram from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "buckets": [HistogramBucket.from_dict(_item) for _item in obj["buckets"]] if obj.get("buckets") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/histogram_bucket.py b/gooddata-api-client/gooddata_api_client/models/histogram_bucket.py new file mode 100644 index 000000000..93c33c779 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/histogram_bucket.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class HistogramBucket(BaseModel): + """ + HistogramBucket + """ # noqa: E501 + count: StrictInt + lower_bound: Union[StrictFloat, StrictInt] = Field(alias="lowerBound") + upper_bound: Union[StrictFloat, StrictInt] = Field(alias="upperBound") + __properties: ClassVar[List[str]] = ["count", "lowerBound", "upperBound"] + + 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 HistogramBucket 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 HistogramBucket from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "count": obj.get("count"), + "lowerBound": obj.get("lowerBound"), + "upperBound": obj.get("upperBound") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/histogram_properties.py b/gooddata-api-client/gooddata_api_client/models/histogram_properties.py new file mode 100644 index 000000000..a2edfe661 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/histogram_properties.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class HistogramProperties(BaseModel): + """ + HistogramProperties + """ # noqa: E501 + bucket_count: StrictInt = Field(alias="bucketCount") + __properties: ClassVar[List[str]] = ["bucketCount"] + + 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 HistogramProperties 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 HistogramProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bucketCount": obj.get("bucketCount") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/identifier_duplications.py b/gooddata-api-client/gooddata_api_client/models/identifier_duplications.py new file mode 100644 index 000000000..3ae7db60c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/identifier_duplications.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 IdentifierDuplications(BaseModel): + """ + Contains information about conflicting IDs in workspace hierarchy + """ # noqa: E501 + id: StrictStr + origins: List[StrictStr] + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "origins", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['analyticalDashboard', 'attribute', 'dashboardPlugin', 'dataset', 'fact', 'label', 'metric', 'prompt', 'visualizationObject', 'filterContext', 'workspaceDataFilter', 'workspaceDataFilterSettings']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('analyticalDashboard', 'attribute', 'dashboardPlugin', 'dataset', 'fact', 'label', 'metric', 'prompt', 'visualizationObject', 'filterContext', 'workspaceDataFilter', 'workspaceDataFilterSettings')") + 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 IdentifierDuplications 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 IdentifierDuplications 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"), + "origins": obj.get("origins"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/identifier_ref.py b/gooddata-api-client/gooddata_api_client/models/identifier_ref.py new file mode 100644 index 000000000..afbf958b8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/identifier_ref.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.identifier_ref_identifier import IdentifierRefIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class IdentifierRef(BaseModel): + """ + IdentifierRef + """ # noqa: E501 + identifier: Optional[IdentifierRefIdentifier] = None + __properties: ClassVar[List[str]] = ["identifier"] + + 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 IdentifierRef 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 identifier + if self.identifier: + _dict['identifier'] = self.identifier.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IdentifierRef from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": IdentifierRefIdentifier.from_dict(obj["identifier"]) if obj.get("identifier") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/identifier_ref_identifier.py b/gooddata-api-client/gooddata_api_client/models/identifier_ref_identifier.py new file mode 100644 index 000000000..c25adad12 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/identifier_ref_identifier.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 IdentifierRefIdentifier(BaseModel): + """ + IdentifierRefIdentifier + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['analyticalDashboard', 'attribute', 'attributeHierarchy', 'dashboardPlugin', 'dataset', 'fact', 'aggregatedFact', 'label', 'metric', 'userDataFilter', 'exportDefinition', 'automation', 'automationResult', 'memoryItem', 'knowledgeRecommendation', 'prompt', 'visualizationObject', 'filterContext', 'workspaceSettings', 'customApplicationSetting', 'workspaceDataFilter', 'workspaceDataFilterSetting', 'filterView']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('analyticalDashboard', 'attribute', 'attributeHierarchy', 'dashboardPlugin', 'dataset', 'fact', 'aggregatedFact', 'label', 'metric', 'userDataFilter', 'exportDefinition', 'automation', 'automationResult', 'memoryItem', 'knowledgeRecommendation', 'prompt', 'visualizationObject', 'filterContext', 'workspaceSettings', 'customApplicationSetting', 'workspaceDataFilter', 'workspaceDataFilterSetting', 'filterView')") + 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 IdentifierRefIdentifier 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 IdentifierRefIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/image_export_request.py b/gooddata-api-client/gooddata_api_client/models/image_export_request.py new file mode 100644 index 000000000..50273ac94 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/image_export_request.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 ImageExportRequest(BaseModel): + """ + Export request object describing the export properties and metadata for image exports. + """ # noqa: E501 + dashboard_id: StrictStr = Field(description="Dashboard identifier", alias="dashboardId") + file_name: StrictStr = Field(description="File name to be used for retrieving the image document.", alias="fileName") + format: StrictStr = Field(description="Requested resulting file type.") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + widget_ids: Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=255)]], Field(min_length=1, max_length=1)] = Field(description="List of widget identifiers to be exported. Note that only one widget is currently supported.", alias="widgetIds") + __properties: ClassVar[List[str]] = ["dashboardId", "fileName", "format", "metadata", "widgetIds"] + + @field_validator('format') + def format_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['PNG']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('PNG')") + 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 ImageExportRequest 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 metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImageExportRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dashboardId": obj.get("dashboardId"), + "fileName": obj.get("fileName"), + "format": obj.get("format"), + "metadata": obj.get("metadata"), + "widgetIds": obj.get("widgetIds") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/in_platform.py b/gooddata-api-client/gooddata_api_client/models/in_platform.py new file mode 100644 index 000000000..7ed4a4289 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/in_platform.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class InPlatform(BaseModel): + """ + In-platform destination for notifications. + """ # noqa: E501 + type: StrictStr = Field(description="The destination type.") + __properties: ClassVar[List[str]] = ["type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['IN_PLATFORM']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('IN_PLATFORM')") + 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 InPlatform 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 InPlatform from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/inline_filter_definition.py b/gooddata-api-client/gooddata_api_client/models/inline_filter_definition.py new file mode 100644 index 000000000..4dbc5d839 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/inline_filter_definition.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.inline_filter_definition_inline import InlineFilterDefinitionInline +from typing import Optional, Set +from typing_extensions import Self + +class InlineFilterDefinition(BaseModel): + """ + Filter in form of direct MAQL query. + """ # noqa: E501 + inline: InlineFilterDefinitionInline + __properties: ClassVar[List[str]] = ["inline"] + + 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 InlineFilterDefinition 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 inline + if self.inline: + _dict['inline'] = self.inline.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InlineFilterDefinition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inline": InlineFilterDefinitionInline.from_dict(obj["inline"]) if obj.get("inline") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/inline_filter_definition_inline.py b/gooddata-api-client/gooddata_api_client/models/inline_filter_definition_inline.py new file mode 100644 index 000000000..2cee65591 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/inline_filter_definition_inline.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InlineFilterDefinitionInline(BaseModel): + """ + InlineFilterDefinitionInline + """ # noqa: E501 + apply_on_result: Optional[StrictBool] = Field(default=None, alias="applyOnResult") + filter: StrictStr = Field(description="MAQL query representing the filter.") + local_identifier: Optional[StrictStr] = Field(default=None, alias="localIdentifier") + __properties: ClassVar[List[str]] = ["applyOnResult", "filter", "localIdentifier"] + + 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 InlineFilterDefinitionInline 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 InlineFilterDefinitionInline from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applyOnResult": obj.get("applyOnResult"), + "filter": obj.get("filter"), + "localIdentifier": obj.get("localIdentifier") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/inline_measure_definition.py b/gooddata-api-client/gooddata_api_client/models/inline_measure_definition.py new file mode 100644 index 000000000..529c72577 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/inline_measure_definition.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.inline_measure_definition_inline import InlineMeasureDefinitionInline +from typing import Optional, Set +from typing_extensions import Self + +class InlineMeasureDefinition(BaseModel): + """ + Metric defined by the raw MAQL query. + """ # noqa: E501 + inline: InlineMeasureDefinitionInline + __properties: ClassVar[List[str]] = ["inline"] + + 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 InlineMeasureDefinition 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 inline + if self.inline: + _dict['inline'] = self.inline.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InlineMeasureDefinition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inline": InlineMeasureDefinitionInline.from_dict(obj["inline"]) if obj.get("inline") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/inline_measure_definition_inline.py b/gooddata-api-client/gooddata_api_client/models/inline_measure_definition_inline.py new file mode 100644 index 000000000..a18070193 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/inline_measure_definition_inline.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class InlineMeasureDefinitionInline(BaseModel): + """ + InlineMeasureDefinitionInline + """ # noqa: E501 + maql: StrictStr = Field(description="MAQL query defining the metric.") + __properties: ClassVar[List[str]] = ["maql"] + + 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 InlineMeasureDefinitionInline 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 InlineMeasureDefinitionInline from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "maql": obj.get("maql") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/intro_slide_template.py b/gooddata-api-client/gooddata_api_client/models/intro_slide_template.py new file mode 100644 index 000000000..f21305238 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/intro_slide_template.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.running_section import RunningSection +from typing import Optional, Set +from typing_extensions import Self + +class IntroSlideTemplate(BaseModel): + """ + Settings for intro slide. + """ # noqa: E501 + background_image: Optional[StrictBool] = Field(default=True, description="Show background image on the slide.", alias="backgroundImage") + description_field: Optional[StrictStr] = Field(default=None, alias="descriptionField") + footer: Optional[RunningSection] = None + header: Optional[RunningSection] = None + title_field: Optional[StrictStr] = Field(default=None, alias="titleField") + __properties: ClassVar[List[str]] = ["backgroundImage", "descriptionField", "footer", "header", "titleField"] + + 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 IntroSlideTemplate 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 footer + if self.footer: + _dict['footer'] = self.footer.to_dict() + # override the default output from pydantic by calling `to_dict()` of header + if self.header: + _dict['header'] = self.header.to_dict() + # set to None if description_field (nullable) is None + # and model_fields_set contains the field + if self.description_field is None and "description_field" in self.model_fields_set: + _dict['descriptionField'] = None + + # set to None if footer (nullable) is None + # and model_fields_set contains the field + if self.footer is None and "footer" in self.model_fields_set: + _dict['footer'] = None + + # set to None if header (nullable) is None + # and model_fields_set contains the field + if self.header is None and "header" in self.model_fields_set: + _dict['header'] = None + + # set to None if title_field (nullable) is None + # and model_fields_set contains the field + if self.title_field is None and "title_field" in self.model_fields_set: + _dict['titleField'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IntroSlideTemplate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "backgroundImage": obj.get("backgroundImage") if obj.get("backgroundImage") is not None else True, + "descriptionField": obj.get("descriptionField"), + "footer": RunningSection.from_dict(obj["footer"]) if obj.get("footer") is not None else None, + "header": RunningSection.from_dict(obj["header"]) if obj.get("header") is not None else None, + "titleField": obj.get("titleField") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_linkage.py new file mode 100644 index 000000000..6856d0936 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiAggregatedFactLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['aggregatedFact']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('aggregatedFact')") + 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 JsonApiAggregatedFactLinkage 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 JsonApiAggregatedFactLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out.py new file mode 100644 index 000000000..53679717a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_attributes import JsonApiAggregatedFactOutAttributes +from gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_aggregated_fact_out_relationships import JsonApiAggregatedFactOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAggregatedFactOut(BaseModel): + """ + JSON:API representation of aggregatedFact entity. + """ # noqa: E501 + attributes: JsonApiAggregatedFactOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiAggregatedFactOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['aggregatedFact']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('aggregatedFact')") + 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 JsonApiAggregatedFactOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAggregatedFactOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAggregatedFactOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiAggregatedFactOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_attributes.py new file mode 100644 index 000000000..ae2149669 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_attributes.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, 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 JsonApiAggregatedFactOutAttributes(BaseModel): + """ + JsonApiAggregatedFactOutAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + is_nullable: Optional[StrictBool] = Field(default=None, alias="isNullable") + null_value: Optional[StrictStr] = Field(default=None, alias="nullValue") + operation: StrictStr + source_column: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, alias="sourceColumn") + source_column_data_type: Optional[StrictStr] = Field(default=None, alias="sourceColumnDataType") + tags: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "description", "isNullable", "nullValue", "operation", "sourceColumn", "sourceColumnDataType", "tags"] + + @field_validator('operation') + def operation_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['SUM', 'MIN', 'MAX']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SUM', 'MIN', 'MAX')") + return value + + @field_validator('source_column_data_type') + def source_column_data_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 JsonApiAggregatedFactOutAttributes 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 JsonApiAggregatedFactOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "description": obj.get("description"), + "isNullable": obj.get("isNullable"), + "nullValue": obj.get("nullValue"), + "operation": obj.get("operation"), + "sourceColumn": obj.get("sourceColumn"), + "sourceColumnDataType": obj.get("sourceColumnDataType"), + "tags": obj.get("tags") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_document.py new file mode 100644 index 000000000..cd39ae5a7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out import JsonApiAggregatedFactOut +from gooddata_api_client.models.json_api_aggregated_fact_out_includes import JsonApiAggregatedFactOutIncludes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAggregatedFactOutDocument(BaseModel): + """ + JsonApiAggregatedFactOutDocument + """ # noqa: E501 + data: JsonApiAggregatedFactOut + included: Optional[List[JsonApiAggregatedFactOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiAggregatedFactOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAggregatedFactOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAggregatedFactOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiAggregatedFactOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_includes.py b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_includes.py new file mode 100644 index 000000000..0dd79f313 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_includes.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_dataset_out_with_links import JsonApiDatasetOutWithLinks +from gooddata_api_client.models.json_api_fact_out_with_links import JsonApiFactOutWithLinks +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIAGGREGATEDFACTOUTINCLUDES_ONE_OF_SCHEMAS = ["JsonApiDatasetOutWithLinks", "JsonApiFactOutWithLinks"] + +class JsonApiAggregatedFactOutIncludes(BaseModel): + """ + JsonApiAggregatedFactOutIncludes + """ + # data type: JsonApiDatasetOutWithLinks + oneof_schema_1_validator: Optional[JsonApiDatasetOutWithLinks] = None + # data type: JsonApiFactOutWithLinks + oneof_schema_2_validator: Optional[JsonApiFactOutWithLinks] = None + actual_instance: Optional[Union[JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks]] = None + one_of_schemas: Set[str] = { "JsonApiDatasetOutWithLinks", "JsonApiFactOutWithLinks" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiAggregatedFactOutIncludes.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiDatasetOutWithLinks + if not isinstance(v, JsonApiDatasetOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiDatasetOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiFactOutWithLinks + if not isinstance(v, JsonApiFactOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiFactOutWithLinks`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiAggregatedFactOutIncludes with oneOf schemas: JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks. 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 + + # deserialize data into JsonApiDatasetOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiDatasetOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiFactOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiFactOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiAggregatedFactOutIncludes with oneOf schemas: JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks. 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], JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_list.py new file mode 100644 index 000000000..7cce60031 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_includes import JsonApiAggregatedFactOutIncludes +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_aggregated_fact_out_with_links import JsonApiAggregatedFactOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAggregatedFactOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiAggregatedFactOutWithLinks] + included: Optional[List[JsonApiAggregatedFactOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiAggregatedFactOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAggregatedFactOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiAggregatedFactOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiAggregatedFactOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_list_meta.py b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_list_meta.py new file mode 100644 index 000000000..0d249165e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_list_meta.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.page_metadata import PageMetadata +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAggregatedFactOutListMeta(BaseModel): + """ + JsonApiAggregatedFactOutListMeta + """ # noqa: E501 + page: Optional[PageMetadata] = None + __properties: ClassVar[List[str]] = ["page"] + + 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 JsonApiAggregatedFactOutListMeta 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 page + if self.page: + _dict['page'] = self.page.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAggregatedFactOutListMeta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "page": PageMetadata.from_dict(obj["page"]) if obj.get("page") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_meta.py b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_meta.py new file mode 100644 index 000000000..6d1f77e22 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_meta.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_meta_origin import JsonApiAggregatedFactOutMetaOrigin +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAggregatedFactOutMeta(BaseModel): + """ + JsonApiAggregatedFactOutMeta + """ # noqa: E501 + origin: Optional[JsonApiAggregatedFactOutMetaOrigin] = None + __properties: ClassVar[List[str]] = ["origin"] + + 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 JsonApiAggregatedFactOutMeta 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 origin + if self.origin: + _dict['origin'] = self.origin.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAggregatedFactOutMeta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "origin": JsonApiAggregatedFactOutMetaOrigin.from_dict(obj["origin"]) if obj.get("origin") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_meta_origin.py b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_meta_origin.py new file mode 100644 index 000000000..f9330ce0d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_meta_origin.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAggregatedFactOutMetaOrigin(BaseModel): + """ + JsonApiAggregatedFactOutMetaOrigin + """ # noqa: E501 + origin_id: StrictStr = Field(description="defines id of the workspace where the entity comes from", alias="originId") + origin_type: StrictStr = Field(description="defines type of the origin of the entity", alias="originType") + __properties: ClassVar[List[str]] = ["originId", "originType"] + + @field_validator('origin_type') + def origin_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['NATIVE', 'PARENT']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('NATIVE', 'PARENT')") + 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 JsonApiAggregatedFactOutMetaOrigin 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 JsonApiAggregatedFactOutMetaOrigin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "originId": obj.get("originId"), + "originType": obj.get("originType") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_relationships.py new file mode 100644 index 000000000..6ca454984 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_relationships.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_relationships_dataset import JsonApiAggregatedFactOutRelationshipsDataset +from gooddata_api_client.models.json_api_aggregated_fact_out_relationships_source_fact import JsonApiAggregatedFactOutRelationshipsSourceFact +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAggregatedFactOutRelationships(BaseModel): + """ + JsonApiAggregatedFactOutRelationships + """ # noqa: E501 + dataset: Optional[JsonApiAggregatedFactOutRelationshipsDataset] = None + source_fact: Optional[JsonApiAggregatedFactOutRelationshipsSourceFact] = Field(default=None, alias="sourceFact") + __properties: ClassVar[List[str]] = ["dataset", "sourceFact"] + + 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 JsonApiAggregatedFactOutRelationships 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 dataset + if self.dataset: + _dict['dataset'] = self.dataset.to_dict() + # override the default output from pydantic by calling `to_dict()` of source_fact + if self.source_fact: + _dict['sourceFact'] = self.source_fact.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAggregatedFactOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataset": JsonApiAggregatedFactOutRelationshipsDataset.from_dict(obj["dataset"]) if obj.get("dataset") is not None else None, + "sourceFact": JsonApiAggregatedFactOutRelationshipsSourceFact.from_dict(obj["sourceFact"]) if obj.get("sourceFact") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_relationships_dataset.py b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_relationships_dataset.py new file mode 100644 index 000000000..0376260d1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_relationships_dataset.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_dataset_to_one_linkage import JsonApiDatasetToOneLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAggregatedFactOutRelationshipsDataset(BaseModel): + """ + JsonApiAggregatedFactOutRelationshipsDataset + """ # noqa: E501 + data: Optional[JsonApiDatasetToOneLinkage] + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAggregatedFactOutRelationshipsDataset 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAggregatedFactOutRelationshipsDataset from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiDatasetToOneLinkage.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_relationships_source_fact.py b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_relationships_source_fact.py new file mode 100644 index 000000000..6c0685a13 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_relationships_source_fact.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_fact_to_one_linkage import JsonApiFactToOneLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAggregatedFactOutRelationshipsSourceFact(BaseModel): + """ + JsonApiAggregatedFactOutRelationshipsSourceFact + """ # noqa: E501 + data: Optional[JsonApiFactToOneLinkage] + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAggregatedFactOutRelationshipsSourceFact 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAggregatedFactOutRelationshipsSourceFact from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiFactToOneLinkage.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_with_links.py new file mode 100644 index 000000000..d167ab3c5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_aggregated_fact_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_attributes import JsonApiAggregatedFactOutAttributes +from gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_aggregated_fact_out_relationships import JsonApiAggregatedFactOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAggregatedFactOutWithLinks(BaseModel): + """ + JsonApiAggregatedFactOutWithLinks + """ # noqa: E501 + attributes: JsonApiAggregatedFactOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiAggregatedFactOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['aggregatedFact']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('aggregatedFact')") + 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 JsonApiAggregatedFactOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAggregatedFactOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAggregatedFactOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiAggregatedFactOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_in.py new file mode 100644 index 000000000..aa254d749 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_analytical_dashboard_in_attributes import JsonApiAnalyticalDashboardInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardIn(BaseModel): + """ + JSON:API representation of analyticalDashboard entity. + """ # noqa: E501 + attributes: JsonApiAnalyticalDashboardInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['analyticalDashboard']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('analyticalDashboard')") + 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 JsonApiAnalyticalDashboardIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAnalyticalDashboardInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_in_attributes.py new file mode 100644 index 000000000..7fb4eac67 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_in_attributes.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardInAttributes(BaseModel): + """ + JsonApiAnalyticalDashboardInAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + content: Dict[str, Any] = Field(description="Free-form JSON content. Maximum supported length is 250000 characters.") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + summary: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="AI-generated summary of the dashboard content") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "content", "description", "summary", "tags", "title"] + + 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 JsonApiAnalyticalDashboardInAttributes 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 JsonApiAnalyticalDashboardInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "content": obj.get("content"), + "description": obj.get("description"), + "summary": obj.get("summary"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_in_document.py new file mode 100644 index 000000000..cb51da029 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_analytical_dashboard_in import JsonApiAnalyticalDashboardIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardInDocument(BaseModel): + """ + JsonApiAnalyticalDashboardInDocument + """ # noqa: E501 + data: JsonApiAnalyticalDashboardIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAnalyticalDashboardInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAnalyticalDashboardIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_linkage.py new file mode 100644 index 000000000..9986f6c32 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiAnalyticalDashboardLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['analyticalDashboard']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('analyticalDashboard')") + 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 JsonApiAnalyticalDashboardLinkage 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 JsonApiAnalyticalDashboardLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out.py new file mode 100644 index 000000000..8fc48bd0d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_analytical_dashboard_out_attributes import JsonApiAnalyticalDashboardOutAttributes +from gooddata_api_client.models.json_api_analytical_dashboard_out_meta import JsonApiAnalyticalDashboardOutMeta +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships import JsonApiAnalyticalDashboardOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardOut(BaseModel): + """ + JSON:API representation of analyticalDashboard entity. + """ # noqa: E501 + attributes: JsonApiAnalyticalDashboardOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAnalyticalDashboardOutMeta] = None + relationships: Optional[JsonApiAnalyticalDashboardOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['analyticalDashboard']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('analyticalDashboard')") + 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 JsonApiAnalyticalDashboardOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAnalyticalDashboardOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAnalyticalDashboardOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiAnalyticalDashboardOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_attributes.py new file mode 100644 index 000000000..13e093f3c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_attributes.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, 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 JsonApiAnalyticalDashboardOutAttributes(BaseModel): + """ + JsonApiAnalyticalDashboardOutAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + certification: Optional[StrictStr] = Field(default=None, description="Certification status of the entity.") + certification_message: Optional[StrictStr] = Field(default=None, description="Optional message associated with the certification.", alias="certificationMessage") + certified_at: Optional[datetime] = Field(default=None, description="Time when the certification was set.", alias="certifiedAt") + content: Dict[str, Any] = Field(description="Free-form JSON content. Maximum supported length is 250000 characters.") + created_at: Optional[datetime] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + modified_at: Optional[datetime] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + summary: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="AI-generated summary of the dashboard content") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "certification", "certificationMessage", "certifiedAt", "content", "createdAt", "description", "modifiedAt", "summary", "tags", "title"] + + @field_validator('certification') + def certification_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['CERTIFIED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('CERTIFIED')") + return value + + @field_validator('certified_at') + def certified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + 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 JsonApiAnalyticalDashboardOutAttributes 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 certification_message (nullable) is None + # and model_fields_set contains the field + if self.certification_message is None and "certification_message" in self.model_fields_set: + _dict['certificationMessage'] = None + + # set to None if certified_at (nullable) is None + # and model_fields_set contains the field + if self.certified_at is None and "certified_at" in self.model_fields_set: + _dict['certifiedAt'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "certification": obj.get("certification"), + "certificationMessage": obj.get("certificationMessage"), + "certifiedAt": obj.get("certifiedAt"), + "content": obj.get("content"), + "createdAt": obj.get("createdAt"), + "description": obj.get("description"), + "modifiedAt": obj.get("modifiedAt"), + "summary": obj.get("summary"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_document.py new file mode 100644 index 000000000..2284038e3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_analytical_dashboard_out import JsonApiAnalyticalDashboardOut +from gooddata_api_client.models.json_api_analytical_dashboard_out_includes import JsonApiAnalyticalDashboardOutIncludes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardOutDocument(BaseModel): + """ + JsonApiAnalyticalDashboardOutDocument + """ # noqa: E501 + data: JsonApiAnalyticalDashboardOut + included: Optional[List[JsonApiAnalyticalDashboardOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiAnalyticalDashboardOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAnalyticalDashboardOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiAnalyticalDashboardOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_includes.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_includes.py new file mode 100644 index 000000000..212794fe0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_includes.py @@ -0,0 +1,231 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_analytical_dashboard_out_with_links import JsonApiAnalyticalDashboardOutWithLinks +from gooddata_api_client.models.json_api_dashboard_plugin_out_with_links import JsonApiDashboardPluginOutWithLinks +from gooddata_api_client.models.json_api_dataset_out_with_links import JsonApiDatasetOutWithLinks +from gooddata_api_client.models.json_api_filter_context_out_with_links import JsonApiFilterContextOutWithLinks +from gooddata_api_client.models.json_api_label_out_with_links import JsonApiLabelOutWithLinks +from gooddata_api_client.models.json_api_metric_out_with_links import JsonApiMetricOutWithLinks +from gooddata_api_client.models.json_api_user_identifier_out_with_links import JsonApiUserIdentifierOutWithLinks +from gooddata_api_client.models.json_api_visualization_object_out_with_links import JsonApiVisualizationObjectOutWithLinks +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIANALYTICALDASHBOARDOUTINCLUDES_ONE_OF_SCHEMAS = ["JsonApiAnalyticalDashboardOutWithLinks", "JsonApiDashboardPluginOutWithLinks", "JsonApiDatasetOutWithLinks", "JsonApiFilterContextOutWithLinks", "JsonApiLabelOutWithLinks", "JsonApiMetricOutWithLinks", "JsonApiUserIdentifierOutWithLinks", "JsonApiVisualizationObjectOutWithLinks"] + +class JsonApiAnalyticalDashboardOutIncludes(BaseModel): + """ + JsonApiAnalyticalDashboardOutIncludes + """ + # data type: JsonApiUserIdentifierOutWithLinks + oneof_schema_1_validator: Optional[JsonApiUserIdentifierOutWithLinks] = None + # data type: JsonApiVisualizationObjectOutWithLinks + oneof_schema_2_validator: Optional[JsonApiVisualizationObjectOutWithLinks] = None + # data type: JsonApiAnalyticalDashboardOutWithLinks + oneof_schema_3_validator: Optional[JsonApiAnalyticalDashboardOutWithLinks] = None + # data type: JsonApiLabelOutWithLinks + oneof_schema_4_validator: Optional[JsonApiLabelOutWithLinks] = None + # data type: JsonApiMetricOutWithLinks + oneof_schema_5_validator: Optional[JsonApiMetricOutWithLinks] = None + # data type: JsonApiDatasetOutWithLinks + oneof_schema_6_validator: Optional[JsonApiDatasetOutWithLinks] = None + # data type: JsonApiFilterContextOutWithLinks + oneof_schema_7_validator: Optional[JsonApiFilterContextOutWithLinks] = None + # data type: JsonApiDashboardPluginOutWithLinks + oneof_schema_8_validator: Optional[JsonApiDashboardPluginOutWithLinks] = None + actual_instance: Optional[Union[JsonApiAnalyticalDashboardOutWithLinks, JsonApiDashboardPluginOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFilterContextOutWithLinks, JsonApiLabelOutWithLinks, JsonApiMetricOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiVisualizationObjectOutWithLinks]] = None + one_of_schemas: Set[str] = { "JsonApiAnalyticalDashboardOutWithLinks", "JsonApiDashboardPluginOutWithLinks", "JsonApiDatasetOutWithLinks", "JsonApiFilterContextOutWithLinks", "JsonApiLabelOutWithLinks", "JsonApiMetricOutWithLinks", "JsonApiUserIdentifierOutWithLinks", "JsonApiVisualizationObjectOutWithLinks" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiAnalyticalDashboardOutIncludes.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiUserIdentifierOutWithLinks + if not isinstance(v, JsonApiUserIdentifierOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserIdentifierOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiVisualizationObjectOutWithLinks + if not isinstance(v, JsonApiVisualizationObjectOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiVisualizationObjectOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiAnalyticalDashboardOutWithLinks + if not isinstance(v, JsonApiAnalyticalDashboardOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAnalyticalDashboardOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiLabelOutWithLinks + if not isinstance(v, JsonApiLabelOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiLabelOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiMetricOutWithLinks + if not isinstance(v, JsonApiMetricOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiMetricOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiDatasetOutWithLinks + if not isinstance(v, JsonApiDatasetOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiDatasetOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiFilterContextOutWithLinks + if not isinstance(v, JsonApiFilterContextOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiFilterContextOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiDashboardPluginOutWithLinks + if not isinstance(v, JsonApiDashboardPluginOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiDashboardPluginOutWithLinks`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiAnalyticalDashboardOutIncludes with oneOf schemas: JsonApiAnalyticalDashboardOutWithLinks, JsonApiDashboardPluginOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFilterContextOutWithLinks, JsonApiLabelOutWithLinks, JsonApiMetricOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiVisualizationObjectOutWithLinks. 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 + + # deserialize data into JsonApiUserIdentifierOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiUserIdentifierOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiVisualizationObjectOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiVisualizationObjectOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiAnalyticalDashboardOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAnalyticalDashboardOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiLabelOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiLabelOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiMetricOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiMetricOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiDatasetOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiDatasetOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiFilterContextOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiFilterContextOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiDashboardPluginOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiDashboardPluginOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiAnalyticalDashboardOutIncludes with oneOf schemas: JsonApiAnalyticalDashboardOutWithLinks, JsonApiDashboardPluginOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFilterContextOutWithLinks, JsonApiLabelOutWithLinks, JsonApiMetricOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiVisualizationObjectOutWithLinks. 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], JsonApiAnalyticalDashboardOutWithLinks, JsonApiDashboardPluginOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFilterContextOutWithLinks, JsonApiLabelOutWithLinks, JsonApiMetricOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiVisualizationObjectOutWithLinks]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_list.py new file mode 100644 index 000000000..7d716abba --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_analytical_dashboard_out_includes import JsonApiAnalyticalDashboardOutIncludes +from gooddata_api_client.models.json_api_analytical_dashboard_out_with_links import JsonApiAnalyticalDashboardOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiAnalyticalDashboardOutWithLinks] + included: Optional[List[JsonApiAnalyticalDashboardOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiAnalyticalDashboardOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiAnalyticalDashboardOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiAnalyticalDashboardOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_meta.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_meta.py new file mode 100644 index 000000000..c13d36740 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_meta.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta_origin import JsonApiAggregatedFactOutMetaOrigin +from gooddata_api_client.models.json_api_analytical_dashboard_out_meta_access_info import JsonApiAnalyticalDashboardOutMetaAccessInfo +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardOutMeta(BaseModel): + """ + JsonApiAnalyticalDashboardOutMeta + """ # noqa: E501 + access_info: Optional[JsonApiAnalyticalDashboardOutMetaAccessInfo] = Field(default=None, alias="accessInfo") + origin: Optional[JsonApiAggregatedFactOutMetaOrigin] = None + permissions: Optional[List[StrictStr]] = Field(default=None, description="List of valid permissions for a logged-in user.") + __properties: ClassVar[List[str]] = ["accessInfo", "origin", "permissions"] + + @field_validator('permissions') + def permissions_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['EDIT', 'SHARE', 'VIEW']): + raise ValueError("each list item must be one of ('EDIT', 'SHARE', 'VIEW')") + 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 JsonApiAnalyticalDashboardOutMeta 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 access_info + if self.access_info: + _dict['accessInfo'] = self.access_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of origin + if self.origin: + _dict['origin'] = self.origin.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardOutMeta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accessInfo": JsonApiAnalyticalDashboardOutMetaAccessInfo.from_dict(obj["accessInfo"]) if obj.get("accessInfo") is not None else None, + "origin": JsonApiAggregatedFactOutMetaOrigin.from_dict(obj["origin"]) if obj.get("origin") is not None else None, + "permissions": obj.get("permissions") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_meta_access_info.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_meta_access_info.py new file mode 100644 index 000000000..273cfc0a2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_meta_access_info.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardOutMetaAccessInfo(BaseModel): + """ + JsonApiAnalyticalDashboardOutMetaAccessInfo + """ # noqa: E501 + private: StrictBool = Field(description="is the entity private to the currently logged-in user") + __properties: ClassVar[List[str]] = ["private"] + + 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 JsonApiAnalyticalDashboardOutMetaAccessInfo 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 JsonApiAnalyticalDashboardOutMetaAccessInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "private": obj.get("private") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships.py new file mode 100644 index 000000000..a19e64cf8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_analytical_dashboards import JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_certified_by import JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_dashboard_plugins import JsonApiAnalyticalDashboardOutRelationshipsDashboardPlugins +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_datasets import JsonApiAnalyticalDashboardOutRelationshipsDatasets +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_filter_contexts import JsonApiAnalyticalDashboardOutRelationshipsFilterContexts +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_labels import JsonApiAnalyticalDashboardOutRelationshipsLabels +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_metrics import JsonApiAnalyticalDashboardOutRelationshipsMetrics +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_visualization_objects import JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardOutRelationships(BaseModel): + """ + JsonApiAnalyticalDashboardOutRelationships + """ # noqa: E501 + analytical_dashboards: Optional[JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards] = Field(default=None, alias="analyticalDashboards") + certified_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="certifiedBy") + created_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="createdBy") + dashboard_plugins: Optional[JsonApiAnalyticalDashboardOutRelationshipsDashboardPlugins] = Field(default=None, alias="dashboardPlugins") + datasets: Optional[JsonApiAnalyticalDashboardOutRelationshipsDatasets] = None + filter_contexts: Optional[JsonApiAnalyticalDashboardOutRelationshipsFilterContexts] = Field(default=None, alias="filterContexts") + labels: Optional[JsonApiAnalyticalDashboardOutRelationshipsLabels] = None + metrics: Optional[JsonApiAnalyticalDashboardOutRelationshipsMetrics] = None + modified_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="modifiedBy") + visualization_objects: Optional[JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects] = Field(default=None, alias="visualizationObjects") + __properties: ClassVar[List[str]] = ["analyticalDashboards", "certifiedBy", "createdBy", "dashboardPlugins", "datasets", "filterContexts", "labels", "metrics", "modifiedBy", "visualizationObjects"] + + 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 JsonApiAnalyticalDashboardOutRelationships 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 analytical_dashboards + if self.analytical_dashboards: + _dict['analyticalDashboards'] = self.analytical_dashboards.to_dict() + # override the default output from pydantic by calling `to_dict()` of certified_by + if self.certified_by: + _dict['certifiedBy'] = self.certified_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of dashboard_plugins + if self.dashboard_plugins: + _dict['dashboardPlugins'] = self.dashboard_plugins.to_dict() + # override the default output from pydantic by calling `to_dict()` of datasets + if self.datasets: + _dict['datasets'] = self.datasets.to_dict() + # override the default output from pydantic by calling `to_dict()` of filter_contexts + if self.filter_contexts: + _dict['filterContexts'] = self.filter_contexts.to_dict() + # override the default output from pydantic by calling `to_dict()` of labels + if self.labels: + _dict['labels'] = self.labels.to_dict() + # override the default output from pydantic by calling `to_dict()` of metrics + if self.metrics: + _dict['metrics'] = self.metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of visualization_objects + if self.visualization_objects: + _dict['visualizationObjects'] = self.visualization_objects.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyticalDashboards": JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards.from_dict(obj["analyticalDashboards"]) if obj.get("analyticalDashboards") is not None else None, + "certifiedBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["certifiedBy"]) if obj.get("certifiedBy") is not None else None, + "createdBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "dashboardPlugins": JsonApiAnalyticalDashboardOutRelationshipsDashboardPlugins.from_dict(obj["dashboardPlugins"]) if obj.get("dashboardPlugins") is not None else None, + "datasets": JsonApiAnalyticalDashboardOutRelationshipsDatasets.from_dict(obj["datasets"]) if obj.get("datasets") is not None else None, + "filterContexts": JsonApiAnalyticalDashboardOutRelationshipsFilterContexts.from_dict(obj["filterContexts"]) if obj.get("filterContexts") is not None else None, + "labels": JsonApiAnalyticalDashboardOutRelationshipsLabels.from_dict(obj["labels"]) if obj.get("labels") is not None else None, + "metrics": JsonApiAnalyticalDashboardOutRelationshipsMetrics.from_dict(obj["metrics"]) if obj.get("metrics") is not None else None, + "modifiedBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None, + "visualizationObjects": JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects.from_dict(obj["visualizationObjects"]) if obj.get("visualizationObjects") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_analytical_dashboards.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_analytical_dashboards.py new file mode 100644 index 000000000..b5cb26db0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_analytical_dashboards.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_analytical_dashboard_linkage import JsonApiAnalyticalDashboardLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards(BaseModel): + """ + JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards + """ # noqa: E501 + data: List[JsonApiAnalyticalDashboardLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiAnalyticalDashboardLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_certified_by.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_certified_by.py new file mode 100644 index 000000000..06f6585a7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_certified_by.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_user_identifier_to_one_linkage import JsonApiUserIdentifierToOneLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy(BaseModel): + """ + JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy + """ # noqa: E501 + data: Optional[JsonApiUserIdentifierToOneLinkage] + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserIdentifierToOneLinkage.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_dashboard_plugins.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_dashboard_plugins.py new file mode 100644 index 000000000..8ab940b7a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_dashboard_plugins.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_dashboard_plugin_linkage import JsonApiDashboardPluginLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardOutRelationshipsDashboardPlugins(BaseModel): + """ + JsonApiAnalyticalDashboardOutRelationshipsDashboardPlugins + """ # noqa: E501 + data: List[JsonApiDashboardPluginLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAnalyticalDashboardOutRelationshipsDashboardPlugins 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardOutRelationshipsDashboardPlugins from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiDashboardPluginLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_datasets.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_datasets.py new file mode 100644 index 000000000..03df24105 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_datasets.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_dataset_linkage import JsonApiDatasetLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardOutRelationshipsDatasets(BaseModel): + """ + JsonApiAnalyticalDashboardOutRelationshipsDatasets + """ # noqa: E501 + data: List[JsonApiDatasetLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAnalyticalDashboardOutRelationshipsDatasets 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardOutRelationshipsDatasets from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiDatasetLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_filter_contexts.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_filter_contexts.py new file mode 100644 index 000000000..b42ec503b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_filter_contexts.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_filter_context_linkage import JsonApiFilterContextLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardOutRelationshipsFilterContexts(BaseModel): + """ + JsonApiAnalyticalDashboardOutRelationshipsFilterContexts + """ # noqa: E501 + data: List[JsonApiFilterContextLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAnalyticalDashboardOutRelationshipsFilterContexts 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardOutRelationshipsFilterContexts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiFilterContextLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_labels.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_labels.py new file mode 100644 index 000000000..24fff6634 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_labels.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_label_linkage import JsonApiLabelLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardOutRelationshipsLabels(BaseModel): + """ + JsonApiAnalyticalDashboardOutRelationshipsLabels + """ # noqa: E501 + data: List[JsonApiLabelLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAnalyticalDashboardOutRelationshipsLabels 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardOutRelationshipsLabels from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiLabelLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_metrics.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_metrics.py new file mode 100644 index 000000000..7e916f58d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_metrics.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_metric_linkage import JsonApiMetricLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardOutRelationshipsMetrics(BaseModel): + """ + JsonApiAnalyticalDashboardOutRelationshipsMetrics + """ # noqa: E501 + data: List[JsonApiMetricLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAnalyticalDashboardOutRelationshipsMetrics 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardOutRelationshipsMetrics from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiMetricLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_visualization_objects.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_visualization_objects.py new file mode 100644 index 000000000..a2ae6df1f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_relationships_visualization_objects.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_visualization_object_linkage import JsonApiVisualizationObjectLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects(BaseModel): + """ + JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects + """ # noqa: E501 + data: List[JsonApiVisualizationObjectLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiVisualizationObjectLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_with_links.py new file mode 100644 index 000000000..6f574b0e0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_analytical_dashboard_out_attributes import JsonApiAnalyticalDashboardOutAttributes +from gooddata_api_client.models.json_api_analytical_dashboard_out_meta import JsonApiAnalyticalDashboardOutMeta +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships import JsonApiAnalyticalDashboardOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardOutWithLinks(BaseModel): + """ + JsonApiAnalyticalDashboardOutWithLinks + """ # noqa: E501 + attributes: JsonApiAnalyticalDashboardOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAnalyticalDashboardOutMeta] = None + relationships: Optional[JsonApiAnalyticalDashboardOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['analyticalDashboard']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('analyticalDashboard')") + 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 JsonApiAnalyticalDashboardOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAnalyticalDashboardOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAnalyticalDashboardOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiAnalyticalDashboardOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_patch.py new file mode 100644 index 000000000..4ade62b7e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_analytical_dashboard_patch_attributes import JsonApiAnalyticalDashboardPatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardPatch(BaseModel): + """ + JSON:API representation of patching analyticalDashboard entity. + """ # noqa: E501 + attributes: JsonApiAnalyticalDashboardPatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['analyticalDashboard']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('analyticalDashboard')") + 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 JsonApiAnalyticalDashboardPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAnalyticalDashboardPatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_patch_attributes.py new file mode 100644 index 000000000..27eabfd92 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_patch_attributes.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardPatchAttributes(BaseModel): + """ + JsonApiAnalyticalDashboardPatchAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + content: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON content. Maximum supported length is 250000 characters.") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + summary: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="AI-generated summary of the dashboard content") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "content", "description", "summary", "tags", "title"] + + 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 JsonApiAnalyticalDashboardPatchAttributes 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 JsonApiAnalyticalDashboardPatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "content": obj.get("content"), + "description": obj.get("description"), + "summary": obj.get("summary"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_patch_document.py new file mode 100644 index 000000000..da99bd147 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_analytical_dashboard_patch import JsonApiAnalyticalDashboardPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardPatchDocument(BaseModel): + """ + JsonApiAnalyticalDashboardPatchDocument + """ # noqa: E501 + data: JsonApiAnalyticalDashboardPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAnalyticalDashboardPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAnalyticalDashboardPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_post_optional_id.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_post_optional_id.py new file mode 100644 index 000000000..18a6193f0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_post_optional_id.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_analytical_dashboard_in_attributes import JsonApiAnalyticalDashboardInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardPostOptionalId(BaseModel): + """ + JSON:API representation of analyticalDashboard entity. + """ # noqa: E501 + attributes: JsonApiAnalyticalDashboardInAttributes + id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @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"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['analyticalDashboard']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('analyticalDashboard')") + 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 JsonApiAnalyticalDashboardPostOptionalId 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardPostOptionalId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAnalyticalDashboardInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_post_optional_id_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_post_optional_id_document.py new file mode 100644 index 000000000..180b1fb98 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_post_optional_id_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_analytical_dashboard_post_optional_id import JsonApiAnalyticalDashboardPostOptionalId +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAnalyticalDashboardPostOptionalIdDocument(BaseModel): + """ + JsonApiAnalyticalDashboardPostOptionalIdDocument + """ # noqa: E501 + data: JsonApiAnalyticalDashboardPostOptionalId + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAnalyticalDashboardPostOptionalIdDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAnalyticalDashboardPostOptionalIdDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAnalyticalDashboardPostOptionalId.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_to_one_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_to_one_linkage.py new file mode 100644 index 000000000..dfe11d0ca --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_analytical_dashboard_to_one_linkage.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_analytical_dashboard_linkage import JsonApiAnalyticalDashboardLinkage +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIANALYTICALDASHBOARDTOONELINKAGE_ONE_OF_SCHEMAS = ["JsonApiAnalyticalDashboardLinkage"] + +class JsonApiAnalyticalDashboardToOneLinkage(BaseModel): + """ + References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + """ + # data type: JsonApiAnalyticalDashboardLinkage + oneof_schema_1_validator: Optional[JsonApiAnalyticalDashboardLinkage] = None + actual_instance: Optional[Union[JsonApiAnalyticalDashboardLinkage]] = None + one_of_schemas: Set[str] = { "JsonApiAnalyticalDashboardLinkage" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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): + if v is None: + return v + + instance = JsonApiAnalyticalDashboardToOneLinkage.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiAnalyticalDashboardLinkage + if not isinstance(v, JsonApiAnalyticalDashboardLinkage): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAnalyticalDashboardLinkage`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiAnalyticalDashboardToOneLinkage with oneOf schemas: JsonApiAnalyticalDashboardLinkage. 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: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into JsonApiAnalyticalDashboardLinkage + try: + if match == 0: + instance.actual_instance = JsonApiAnalyticalDashboardLinkage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiAnalyticalDashboardToOneLinkage with oneOf schemas: JsonApiAnalyticalDashboardLinkage. 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], JsonApiAnalyticalDashboardLinkage]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_api_token_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_api_token_in.py new file mode 100644 index 000000000..dae80af1d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_api_token_in.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiApiTokenIn(BaseModel): + """ + JSON:API representation of apiToken entity. + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['apiToken']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('apiToken')") + 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 JsonApiApiTokenIn 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 JsonApiApiTokenIn 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_api_token_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_api_token_in_document.py new file mode 100644 index 000000000..a47d6a766 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_api_token_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_api_token_in import JsonApiApiTokenIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiApiTokenInDocument(BaseModel): + """ + JsonApiApiTokenInDocument + """ # noqa: E501 + data: JsonApiApiTokenIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiApiTokenInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiApiTokenInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiApiTokenIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_api_token_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_api_token_out.py new file mode 100644 index 000000000..7237e096b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_api_token_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_api_token_out_attributes import JsonApiApiTokenOutAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiApiTokenOut(BaseModel): + """ + JSON:API representation of apiToken entity. + """ # noqa: E501 + attributes: Optional[JsonApiApiTokenOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['apiToken']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('apiToken')") + 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 JsonApiApiTokenOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiApiTokenOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiApiTokenOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_attributes.py new file mode 100644 index 000000000..9cc62d6a8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_attributes.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiApiTokenOutAttributes(BaseModel): + """ + JsonApiApiTokenOutAttributes + """ # noqa: E501 + bearer_token: Optional[StrictStr] = Field(default=None, description="The value of the Bearer token. It is only returned when the API token is created.", alias="bearerToken") + __properties: ClassVar[List[str]] = ["bearerToken"] + + 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 JsonApiApiTokenOutAttributes 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 JsonApiApiTokenOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bearerToken": obj.get("bearerToken") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_document.py new file mode 100644 index 000000000..912f4e9fe --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_api_token_out import JsonApiApiTokenOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiApiTokenOutDocument(BaseModel): + """ + JsonApiApiTokenOutDocument + """ # noqa: E501 + data: JsonApiApiTokenOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiApiTokenOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiApiTokenOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiApiTokenOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_list.py new file mode 100644 index 000000000..e5c8d3ab8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_api_token_out_with_links import JsonApiApiTokenOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiApiTokenOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiApiTokenOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiApiTokenOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiApiTokenOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiApiTokenOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_with_links.py new file mode 100644 index 000000000..f571b1ef5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_api_token_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_api_token_out_attributes import JsonApiApiTokenOutAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiApiTokenOutWithLinks(BaseModel): + """ + JsonApiApiTokenOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiApiTokenOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['apiToken']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('apiToken')") + 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 JsonApiApiTokenOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiApiTokenOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiApiTokenOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_in.py new file mode 100644 index 000000000..f94a8de5b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_attribute_hierarchy_in_attributes import JsonApiAttributeHierarchyInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeHierarchyIn(BaseModel): + """ + JSON:API representation of attributeHierarchy entity. + """ # noqa: E501 + attributes: Optional[JsonApiAttributeHierarchyInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attributeHierarchy']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attributeHierarchy')") + 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 JsonApiAttributeHierarchyIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeHierarchyIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAttributeHierarchyInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_in_attributes.py new file mode 100644 index 000000000..045f4386f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_in_attributes.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeHierarchyInAttributes(BaseModel): + """ + JsonApiAttributeHierarchyInAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + content: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON content. Maximum supported length is 15000 characters.") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "content", "description", "tags", "title"] + + 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 JsonApiAttributeHierarchyInAttributes 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 JsonApiAttributeHierarchyInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "content": obj.get("content"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_in_document.py new file mode 100644 index 000000000..e3605a14d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_attribute_hierarchy_in import JsonApiAttributeHierarchyIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeHierarchyInDocument(BaseModel): + """ + JsonApiAttributeHierarchyInDocument + """ # noqa: E501 + data: JsonApiAttributeHierarchyIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAttributeHierarchyInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeHierarchyInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAttributeHierarchyIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_linkage.py new file mode 100644 index 000000000..ad2fbd1c9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiAttributeHierarchyLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attributeHierarchy']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attributeHierarchy')") + 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 JsonApiAttributeHierarchyLinkage 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 JsonApiAttributeHierarchyLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out.py new file mode 100644 index 000000000..1f2e23891 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_attribute_hierarchy_out_attributes import JsonApiAttributeHierarchyOutAttributes +from gooddata_api_client.models.json_api_attribute_hierarchy_out_relationships import JsonApiAttributeHierarchyOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeHierarchyOut(BaseModel): + """ + JSON:API representation of attributeHierarchy entity. + """ # noqa: E501 + attributes: Optional[JsonApiAttributeHierarchyOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiAttributeHierarchyOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attributeHierarchy']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attributeHierarchy')") + 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 JsonApiAttributeHierarchyOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeHierarchyOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAttributeHierarchyOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiAttributeHierarchyOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_attributes.py new file mode 100644 index 000000000..0a98cb97b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_attributes.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, 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 JsonApiAttributeHierarchyOutAttributes(BaseModel): + """ + JsonApiAttributeHierarchyOutAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + content: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON content. Maximum supported length is 15000 characters.") + created_at: Optional[datetime] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + modified_at: Optional[datetime] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "content", "createdAt", "description", "modifiedAt", "tags", "title"] + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + 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 JsonApiAttributeHierarchyOutAttributes 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 created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeHierarchyOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "content": obj.get("content"), + "createdAt": obj.get("createdAt"), + "description": obj.get("description"), + "modifiedAt": obj.get("modifiedAt"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_document.py new file mode 100644 index 000000000..ba4f53b5e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_attribute_hierarchy_out import JsonApiAttributeHierarchyOut +from gooddata_api_client.models.json_api_attribute_hierarchy_out_includes import JsonApiAttributeHierarchyOutIncludes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeHierarchyOutDocument(BaseModel): + """ + JsonApiAttributeHierarchyOutDocument + """ # noqa: E501 + data: JsonApiAttributeHierarchyOut + included: Optional[List[JsonApiAttributeHierarchyOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiAttributeHierarchyOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeHierarchyOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAttributeHierarchyOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiAttributeHierarchyOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_includes.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_includes.py new file mode 100644 index 000000000..7f577e377 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_includes.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_attribute_out_with_links import JsonApiAttributeOutWithLinks +from gooddata_api_client.models.json_api_user_identifier_out_with_links import JsonApiUserIdentifierOutWithLinks +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIATTRIBUTEHIERARCHYOUTINCLUDES_ONE_OF_SCHEMAS = ["JsonApiAttributeOutWithLinks", "JsonApiUserIdentifierOutWithLinks"] + +class JsonApiAttributeHierarchyOutIncludes(BaseModel): + """ + JsonApiAttributeHierarchyOutIncludes + """ + # data type: JsonApiUserIdentifierOutWithLinks + oneof_schema_1_validator: Optional[JsonApiUserIdentifierOutWithLinks] = None + # data type: JsonApiAttributeOutWithLinks + oneof_schema_2_validator: Optional[JsonApiAttributeOutWithLinks] = None + actual_instance: Optional[Union[JsonApiAttributeOutWithLinks, JsonApiUserIdentifierOutWithLinks]] = None + one_of_schemas: Set[str] = { "JsonApiAttributeOutWithLinks", "JsonApiUserIdentifierOutWithLinks" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiAttributeHierarchyOutIncludes.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiUserIdentifierOutWithLinks + if not isinstance(v, JsonApiUserIdentifierOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserIdentifierOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiAttributeOutWithLinks + if not isinstance(v, JsonApiAttributeOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAttributeOutWithLinks`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiAttributeHierarchyOutIncludes with oneOf schemas: JsonApiAttributeOutWithLinks, JsonApiUserIdentifierOutWithLinks. 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 + + # deserialize data into JsonApiUserIdentifierOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiUserIdentifierOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiAttributeOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAttributeOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiAttributeHierarchyOutIncludes with oneOf schemas: JsonApiAttributeOutWithLinks, JsonApiUserIdentifierOutWithLinks. 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], JsonApiAttributeOutWithLinks, JsonApiUserIdentifierOutWithLinks]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_list.py new file mode 100644 index 000000000..be5d8a0d0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_attribute_hierarchy_out_includes import JsonApiAttributeHierarchyOutIncludes +from gooddata_api_client.models.json_api_attribute_hierarchy_out_with_links import JsonApiAttributeHierarchyOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeHierarchyOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiAttributeHierarchyOutWithLinks] + included: Optional[List[JsonApiAttributeHierarchyOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiAttributeHierarchyOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeHierarchyOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiAttributeHierarchyOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiAttributeHierarchyOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_relationships.py new file mode 100644 index 000000000..c32c6024d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_relationships.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_certified_by import JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy +from gooddata_api_client.models.json_api_attribute_hierarchy_out_relationships_attributes import JsonApiAttributeHierarchyOutRelationshipsAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeHierarchyOutRelationships(BaseModel): + """ + JsonApiAttributeHierarchyOutRelationships + """ # noqa: E501 + attributes: Optional[JsonApiAttributeHierarchyOutRelationshipsAttributes] = None + created_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="createdBy") + modified_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="modifiedBy") + __properties: ClassVar[List[str]] = ["attributes", "createdBy", "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 JsonApiAttributeHierarchyOutRelationships 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeHierarchyOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAttributeHierarchyOutRelationshipsAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "createdBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "modifiedBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_relationships_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_relationships_attributes.py new file mode 100644 index 000000000..16be58701 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_relationships_attributes.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_attribute_linkage import JsonApiAttributeLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeHierarchyOutRelationshipsAttributes(BaseModel): + """ + JsonApiAttributeHierarchyOutRelationshipsAttributes + """ # noqa: E501 + data: List[JsonApiAttributeLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAttributeHierarchyOutRelationshipsAttributes 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeHierarchyOutRelationshipsAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiAttributeLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_with_links.py new file mode 100644 index 000000000..6ba6dae70 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_attribute_hierarchy_out_attributes import JsonApiAttributeHierarchyOutAttributes +from gooddata_api_client.models.json_api_attribute_hierarchy_out_relationships import JsonApiAttributeHierarchyOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeHierarchyOutWithLinks(BaseModel): + """ + JsonApiAttributeHierarchyOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiAttributeHierarchyOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiAttributeHierarchyOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attributeHierarchy']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attributeHierarchy')") + 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 JsonApiAttributeHierarchyOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeHierarchyOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAttributeHierarchyOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiAttributeHierarchyOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_patch.py new file mode 100644 index 000000000..5bd40d12d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_attribute_hierarchy_in_attributes import JsonApiAttributeHierarchyInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeHierarchyPatch(BaseModel): + """ + JSON:API representation of patching attributeHierarchy entity. + """ # noqa: E501 + attributes: Optional[JsonApiAttributeHierarchyInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attributeHierarchy']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attributeHierarchy')") + 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 JsonApiAttributeHierarchyPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeHierarchyPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAttributeHierarchyInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_patch_document.py new file mode 100644 index 000000000..9dece1580 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_hierarchy_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_attribute_hierarchy_patch import JsonApiAttributeHierarchyPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeHierarchyPatchDocument(BaseModel): + """ + JsonApiAttributeHierarchyPatchDocument + """ # noqa: E501 + data: JsonApiAttributeHierarchyPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAttributeHierarchyPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeHierarchyPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAttributeHierarchyPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_linkage.py new file mode 100644 index 000000000..433aa7878 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiAttributeLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attribute']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attribute')") + 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 JsonApiAttributeLinkage 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 JsonApiAttributeLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out.py new file mode 100644 index 000000000..1fc6e69ca --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_attribute_out_attributes import JsonApiAttributeOutAttributes +from gooddata_api_client.models.json_api_attribute_out_relationships import JsonApiAttributeOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeOut(BaseModel): + """ + JSON:API representation of attribute entity. + """ # noqa: E501 + attributes: Optional[JsonApiAttributeOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiAttributeOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attribute']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attribute')") + 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 JsonApiAttributeOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAttributeOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiAttributeOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_attributes.py new file mode 100644 index 000000000..4f4ee1da1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_attributes.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, 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 JsonApiAttributeOutAttributes(BaseModel): + """ + JsonApiAttributeOutAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + granularity: Optional[StrictStr] = None + is_hidden: Optional[StrictBool] = Field(default=None, alias="isHidden") + is_nullable: Optional[StrictBool] = Field(default=None, alias="isNullable") + locale: Optional[StrictStr] = None + null_value: Optional[StrictStr] = Field(default=None, alias="nullValue") + sort_column: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, alias="sortColumn") + sort_direction: Optional[StrictStr] = Field(default=None, alias="sortDirection") + source_column: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, alias="sourceColumn") + source_column_data_type: Optional[StrictStr] = Field(default=None, alias="sourceColumnDataType") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "description", "granularity", "isHidden", "isNullable", "locale", "nullValue", "sortColumn", "sortDirection", "sourceColumn", "sourceColumnDataType", "tags", "title"] + + @field_validator('granularity') + def granularity_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR')") + return value + + @field_validator('sort_direction') + def sort_direction_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ASC', 'DESC']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ASC', 'DESC')") + return value + + @field_validator('source_column_data_type') + def source_column_data_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 JsonApiAttributeOutAttributes 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 JsonApiAttributeOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "description": obj.get("description"), + "granularity": obj.get("granularity"), + "isHidden": obj.get("isHidden"), + "isNullable": obj.get("isNullable"), + "locale": obj.get("locale"), + "nullValue": obj.get("nullValue"), + "sortColumn": obj.get("sortColumn"), + "sortDirection": obj.get("sortDirection"), + "sourceColumn": obj.get("sourceColumn"), + "sourceColumnDataType": obj.get("sourceColumnDataType"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_document.py new file mode 100644 index 000000000..e1fc379eb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_attribute_out import JsonApiAttributeOut +from gooddata_api_client.models.json_api_attribute_out_includes import JsonApiAttributeOutIncludes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeOutDocument(BaseModel): + """ + JsonApiAttributeOutDocument + """ # noqa: E501 + data: JsonApiAttributeOut + included: Optional[List[JsonApiAttributeOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiAttributeOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAttributeOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiAttributeOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_includes.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_includes.py new file mode 100644 index 000000000..09b4f9ecc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_includes.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_attribute_hierarchy_out_with_links import JsonApiAttributeHierarchyOutWithLinks +from gooddata_api_client.models.json_api_dataset_out_with_links import JsonApiDatasetOutWithLinks +from gooddata_api_client.models.json_api_label_out_with_links import JsonApiLabelOutWithLinks +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIATTRIBUTEOUTINCLUDES_ONE_OF_SCHEMAS = ["JsonApiAttributeHierarchyOutWithLinks", "JsonApiDatasetOutWithLinks", "JsonApiLabelOutWithLinks"] + +class JsonApiAttributeOutIncludes(BaseModel): + """ + JsonApiAttributeOutIncludes + """ + # data type: JsonApiDatasetOutWithLinks + oneof_schema_1_validator: Optional[JsonApiDatasetOutWithLinks] = None + # data type: JsonApiLabelOutWithLinks + oneof_schema_2_validator: Optional[JsonApiLabelOutWithLinks] = None + # data type: JsonApiAttributeHierarchyOutWithLinks + oneof_schema_3_validator: Optional[JsonApiAttributeHierarchyOutWithLinks] = None + actual_instance: Optional[Union[JsonApiAttributeHierarchyOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiLabelOutWithLinks]] = None + one_of_schemas: Set[str] = { "JsonApiAttributeHierarchyOutWithLinks", "JsonApiDatasetOutWithLinks", "JsonApiLabelOutWithLinks" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiAttributeOutIncludes.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiDatasetOutWithLinks + if not isinstance(v, JsonApiDatasetOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiDatasetOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiLabelOutWithLinks + if not isinstance(v, JsonApiLabelOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiLabelOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiAttributeHierarchyOutWithLinks + if not isinstance(v, JsonApiAttributeHierarchyOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAttributeHierarchyOutWithLinks`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiAttributeOutIncludes with oneOf schemas: JsonApiAttributeHierarchyOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiLabelOutWithLinks. 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 + + # deserialize data into JsonApiDatasetOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiDatasetOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiLabelOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiLabelOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiAttributeHierarchyOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAttributeHierarchyOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiAttributeOutIncludes with oneOf schemas: JsonApiAttributeHierarchyOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiLabelOutWithLinks. 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], JsonApiAttributeHierarchyOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiLabelOutWithLinks]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_list.py new file mode 100644 index 000000000..d7cd39461 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_attribute_out_includes import JsonApiAttributeOutIncludes +from gooddata_api_client.models.json_api_attribute_out_with_links import JsonApiAttributeOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiAttributeOutWithLinks] + included: Optional[List[JsonApiAttributeOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiAttributeOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiAttributeOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiAttributeOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_relationships.py new file mode 100644 index 000000000..7de4a28ab --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_relationships.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_relationships_dataset import JsonApiAggregatedFactOutRelationshipsDataset +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_labels import JsonApiAnalyticalDashboardOutRelationshipsLabels +from gooddata_api_client.models.json_api_attribute_out_relationships_attribute_hierarchies import JsonApiAttributeOutRelationshipsAttributeHierarchies +from gooddata_api_client.models.json_api_attribute_out_relationships_default_view import JsonApiAttributeOutRelationshipsDefaultView +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeOutRelationships(BaseModel): + """ + JsonApiAttributeOutRelationships + """ # noqa: E501 + attribute_hierarchies: Optional[JsonApiAttributeOutRelationshipsAttributeHierarchies] = Field(default=None, alias="attributeHierarchies") + dataset: Optional[JsonApiAggregatedFactOutRelationshipsDataset] = None + default_view: Optional[JsonApiAttributeOutRelationshipsDefaultView] = Field(default=None, alias="defaultView") + labels: Optional[JsonApiAnalyticalDashboardOutRelationshipsLabels] = None + __properties: ClassVar[List[str]] = ["attributeHierarchies", "dataset", "defaultView", "labels"] + + 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 JsonApiAttributeOutRelationships 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 attribute_hierarchies + if self.attribute_hierarchies: + _dict['attributeHierarchies'] = self.attribute_hierarchies.to_dict() + # override the default output from pydantic by calling `to_dict()` of dataset + if self.dataset: + _dict['dataset'] = self.dataset.to_dict() + # override the default output from pydantic by calling `to_dict()` of default_view + if self.default_view: + _dict['defaultView'] = self.default_view.to_dict() + # override the default output from pydantic by calling `to_dict()` of labels + if self.labels: + _dict['labels'] = self.labels.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributeHierarchies": JsonApiAttributeOutRelationshipsAttributeHierarchies.from_dict(obj["attributeHierarchies"]) if obj.get("attributeHierarchies") is not None else None, + "dataset": JsonApiAggregatedFactOutRelationshipsDataset.from_dict(obj["dataset"]) if obj.get("dataset") is not None else None, + "defaultView": JsonApiAttributeOutRelationshipsDefaultView.from_dict(obj["defaultView"]) if obj.get("defaultView") is not None else None, + "labels": JsonApiAnalyticalDashboardOutRelationshipsLabels.from_dict(obj["labels"]) if obj.get("labels") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_relationships_attribute_hierarchies.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_relationships_attribute_hierarchies.py new file mode 100644 index 000000000..46efbca3f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_relationships_attribute_hierarchies.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_attribute_hierarchy_linkage import JsonApiAttributeHierarchyLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeOutRelationshipsAttributeHierarchies(BaseModel): + """ + JsonApiAttributeOutRelationshipsAttributeHierarchies + """ # noqa: E501 + data: List[JsonApiAttributeHierarchyLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAttributeOutRelationshipsAttributeHierarchies 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeOutRelationshipsAttributeHierarchies from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiAttributeHierarchyLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_relationships_default_view.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_relationships_default_view.py new file mode 100644 index 000000000..816513d92 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_relationships_default_view.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_label_to_one_linkage import JsonApiLabelToOneLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeOutRelationshipsDefaultView(BaseModel): + """ + JsonApiAttributeOutRelationshipsDefaultView + """ # noqa: E501 + data: Optional[JsonApiLabelToOneLinkage] + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAttributeOutRelationshipsDefaultView 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeOutRelationshipsDefaultView from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiLabelToOneLinkage.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_with_links.py new file mode 100644 index 000000000..1ec839b42 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_attribute_out_attributes import JsonApiAttributeOutAttributes +from gooddata_api_client.models.json_api_attribute_out_relationships import JsonApiAttributeOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributeOutWithLinks(BaseModel): + """ + JsonApiAttributeOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiAttributeOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiAttributeOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attribute']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attribute')") + 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 JsonApiAttributeOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributeOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAttributeOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiAttributeOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch.py new file mode 100644 index 000000000..329751808 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_attribute_patch_attributes import JsonApiAttributePatchAttributes +from gooddata_api_client.models.json_api_attribute_patch_relationships import JsonApiAttributePatchRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributePatch(BaseModel): + """ + JSON:API representation of patching attribute entity. + """ # noqa: E501 + attributes: Optional[JsonApiAttributePatchAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiAttributePatchRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attribute']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attribute')") + 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 JsonApiAttributePatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributePatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAttributePatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiAttributePatchRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch_attributes.py new file mode 100644 index 000000000..bec450448 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch_attributes.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributePatchAttributes(BaseModel): + """ + JsonApiAttributePatchAttributes + """ # noqa: E501 + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["description", "tags", "title"] + + 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 JsonApiAttributePatchAttributes 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 JsonApiAttributePatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch_document.py new file mode 100644 index 000000000..8de3d5bff --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_attribute_patch import JsonApiAttributePatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributePatchDocument(BaseModel): + """ + JsonApiAttributePatchDocument + """ # noqa: E501 + data: JsonApiAttributePatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAttributePatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributePatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAttributePatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch_relationships.py new file mode 100644 index 000000000..1bc6586ec --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_patch_relationships.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_attribute_out_relationships_default_view import JsonApiAttributeOutRelationshipsDefaultView +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAttributePatchRelationships(BaseModel): + """ + JsonApiAttributePatchRelationships + """ # noqa: E501 + default_view: Optional[JsonApiAttributeOutRelationshipsDefaultView] = Field(default=None, alias="defaultView") + __properties: ClassVar[List[str]] = ["defaultView"] + + 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 JsonApiAttributePatchRelationships 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 default_view + if self.default_view: + _dict['defaultView'] = self.default_view.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAttributePatchRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "defaultView": JsonApiAttributeOutRelationshipsDefaultView.from_dict(obj["defaultView"]) if obj.get("defaultView") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_attribute_to_one_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_to_one_linkage.py new file mode 100644 index 000000000..8ac463f66 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_attribute_to_one_linkage.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_attribute_linkage import JsonApiAttributeLinkage +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIATTRIBUTETOONELINKAGE_ONE_OF_SCHEMAS = ["JsonApiAttributeLinkage"] + +class JsonApiAttributeToOneLinkage(BaseModel): + """ + References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + """ + # data type: JsonApiAttributeLinkage + oneof_schema_1_validator: Optional[JsonApiAttributeLinkage] = None + actual_instance: Optional[Union[JsonApiAttributeLinkage]] = None + one_of_schemas: Set[str] = { "JsonApiAttributeLinkage" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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): + if v is None: + return v + + instance = JsonApiAttributeToOneLinkage.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiAttributeLinkage + if not isinstance(v, JsonApiAttributeLinkage): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAttributeLinkage`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiAttributeToOneLinkage with oneOf schemas: JsonApiAttributeLinkage. 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: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into JsonApiAttributeLinkage + try: + if match == 0: + instance.actual_instance = JsonApiAttributeLinkage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiAttributeToOneLinkage with oneOf schemas: JsonApiAttributeLinkage. 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], JsonApiAttributeLinkage]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_automation_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in.py new file mode 100644 index 000000000..3c5e39075 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_automation_in_attributes import JsonApiAutomationInAttributes +from gooddata_api_client.models.json_api_automation_in_relationships import JsonApiAutomationInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationIn(BaseModel): + """ + JSON:API representation of automation entity. + """ # noqa: E501 + attributes: Optional[JsonApiAutomationInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiAutomationInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['automation']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('automation')") + 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 JsonApiAutomationIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAutomationInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiAutomationInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes.py new file mode 100644 index 000000000..a972ab707 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_automation_in_attributes_alert import JsonApiAutomationInAttributesAlert +from gooddata_api_client.models.json_api_automation_in_attributes_dashboard_tabular_exports_inner import JsonApiAutomationInAttributesDashboardTabularExportsInner +from gooddata_api_client.models.json_api_automation_in_attributes_external_recipients_inner import JsonApiAutomationInAttributesExternalRecipientsInner +from gooddata_api_client.models.json_api_automation_in_attributes_image_exports_inner import JsonApiAutomationInAttributesImageExportsInner +from gooddata_api_client.models.json_api_automation_in_attributes_metadata import JsonApiAutomationInAttributesMetadata +from gooddata_api_client.models.json_api_automation_in_attributes_raw_exports_inner import JsonApiAutomationInAttributesRawExportsInner +from gooddata_api_client.models.json_api_automation_in_attributes_schedule import JsonApiAutomationInAttributesSchedule +from gooddata_api_client.models.json_api_automation_in_attributes_slides_exports_inner import JsonApiAutomationInAttributesSlidesExportsInner +from gooddata_api_client.models.json_api_automation_in_attributes_tabular_exports_inner import JsonApiAutomationInAttributesTabularExportsInner +from gooddata_api_client.models.json_api_automation_in_attributes_visual_exports_inner import JsonApiAutomationInAttributesVisualExportsInner +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInAttributes(BaseModel): + """ + JsonApiAutomationInAttributes + """ # noqa: E501 + alert: Optional[JsonApiAutomationInAttributesAlert] = None + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + dashboard_tabular_exports: Optional[List[JsonApiAutomationInAttributesDashboardTabularExportsInner]] = Field(default=None, alias="dashboardTabularExports") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + details: Optional[Dict[str, Any]] = Field(default=None, description="Additional details to be included in the automated message.") + evaluation_mode: Optional[StrictStr] = Field(default=None, description="Specify automation evaluation mode.", alias="evaluationMode") + external_recipients: Optional[List[JsonApiAutomationInAttributesExternalRecipientsInner]] = Field(default=None, description="External recipients of the automation action results.", alias="externalRecipients") + image_exports: Optional[List[JsonApiAutomationInAttributesImageExportsInner]] = Field(default=None, alias="imageExports") + metadata: Optional[JsonApiAutomationInAttributesMetadata] = None + raw_exports: Optional[List[JsonApiAutomationInAttributesRawExportsInner]] = Field(default=None, alias="rawExports") + schedule: Optional[JsonApiAutomationInAttributesSchedule] = None + slides_exports: Optional[List[JsonApiAutomationInAttributesSlidesExportsInner]] = Field(default=None, alias="slidesExports") + state: Optional[StrictStr] = Field(default=None, description="Current state of the automation.") + tabular_exports: Optional[List[JsonApiAutomationInAttributesTabularExportsInner]] = Field(default=None, alias="tabularExports") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + visual_exports: Optional[List[JsonApiAutomationInAttributesVisualExportsInner]] = Field(default=None, alias="visualExports") + __properties: ClassVar[List[str]] = ["alert", "areRelationsValid", "dashboardTabularExports", "description", "details", "evaluationMode", "externalRecipients", "imageExports", "metadata", "rawExports", "schedule", "slidesExports", "state", "tabularExports", "tags", "title", "visualExports"] + + @field_validator('evaluation_mode') + def evaluation_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['SHARED', 'PER_RECIPIENT']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SHARED', 'PER_RECIPIENT')") + return value + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ACTIVE', 'PAUSED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ACTIVE', 'PAUSED')") + 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 JsonApiAutomationInAttributes 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 alert + if self.alert: + _dict['alert'] = self.alert.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in dashboard_tabular_exports (list) + _items = [] + if self.dashboard_tabular_exports: + for _item_dashboard_tabular_exports in self.dashboard_tabular_exports: + if _item_dashboard_tabular_exports: + _items.append(_item_dashboard_tabular_exports.to_dict()) + _dict['dashboardTabularExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in external_recipients (list) + _items = [] + if self.external_recipients: + for _item_external_recipients in self.external_recipients: + if _item_external_recipients: + _items.append(_item_external_recipients.to_dict()) + _dict['externalRecipients'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in image_exports (list) + _items = [] + if self.image_exports: + for _item_image_exports in self.image_exports: + if _item_image_exports: + _items.append(_item_image_exports.to_dict()) + _dict['imageExports'] = _items + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in raw_exports (list) + _items = [] + if self.raw_exports: + for _item_raw_exports in self.raw_exports: + if _item_raw_exports: + _items.append(_item_raw_exports.to_dict()) + _dict['rawExports'] = _items + # override the default output from pydantic by calling `to_dict()` of schedule + if self.schedule: + _dict['schedule'] = self.schedule.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in slides_exports (list) + _items = [] + if self.slides_exports: + for _item_slides_exports in self.slides_exports: + if _item_slides_exports: + _items.append(_item_slides_exports.to_dict()) + _dict['slidesExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in tabular_exports (list) + _items = [] + if self.tabular_exports: + for _item_tabular_exports in self.tabular_exports: + if _item_tabular_exports: + _items.append(_item_tabular_exports.to_dict()) + _dict['tabularExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in visual_exports (list) + _items = [] + if self.visual_exports: + for _item_visual_exports in self.visual_exports: + if _item_visual_exports: + _items.append(_item_visual_exports.to_dict()) + _dict['visualExports'] = _items + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alert": JsonApiAutomationInAttributesAlert.from_dict(obj["alert"]) if obj.get("alert") is not None else None, + "areRelationsValid": obj.get("areRelationsValid"), + "dashboardTabularExports": [JsonApiAutomationInAttributesDashboardTabularExportsInner.from_dict(_item) for _item in obj["dashboardTabularExports"]] if obj.get("dashboardTabularExports") is not None else None, + "description": obj.get("description"), + "details": obj.get("details"), + "evaluationMode": obj.get("evaluationMode"), + "externalRecipients": [JsonApiAutomationInAttributesExternalRecipientsInner.from_dict(_item) for _item in obj["externalRecipients"]] if obj.get("externalRecipients") is not None else None, + "imageExports": [JsonApiAutomationInAttributesImageExportsInner.from_dict(_item) for _item in obj["imageExports"]] if obj.get("imageExports") is not None else None, + "metadata": JsonApiAutomationInAttributesMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "rawExports": [JsonApiAutomationInAttributesRawExportsInner.from_dict(_item) for _item in obj["rawExports"]] if obj.get("rawExports") is not None else None, + "schedule": JsonApiAutomationInAttributesSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None, + "slidesExports": [JsonApiAutomationInAttributesSlidesExportsInner.from_dict(_item) for _item in obj["slidesExports"]] if obj.get("slidesExports") is not None else None, + "state": obj.get("state"), + "tabularExports": [JsonApiAutomationInAttributesTabularExportsInner.from_dict(_item) for _item in obj["tabularExports"]] if obj.get("tabularExports") is not None else None, + "tags": obj.get("tags"), + "title": obj.get("title"), + "visualExports": [JsonApiAutomationInAttributesVisualExportsInner.from_dict(_item) for _item in obj["visualExports"]] if obj.get("visualExports") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_alert.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_alert.py new file mode 100644 index 000000000..516ec802e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_alert.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.alert_afm import AlertAfm +from gooddata_api_client.models.alert_condition import AlertCondition +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInAttributesAlert(BaseModel): + """ + JsonApiAutomationInAttributesAlert + """ # noqa: E501 + condition: AlertCondition + execution: AlertAfm + interval: Optional[StrictStr] = Field(default=None, description="Date granularity for the interval of ONCE_PER_INTERVAL trigger. Supported granularities: DAY, WEEK, MONTH, QUARTER, YEAR.") + trigger: Optional[StrictStr] = Field(default='ALWAYS', description="Trigger behavior for the alert. ALWAYS - alert is triggered every time the condition is met. ONCE - alert is triggered only once when the condition is met. ONCE_PER_INTERVAL - alert is triggered when the condition is met, then suppressed for the interval. If no interval is specified, it behaves as ALWAYS. ") + __properties: ClassVar[List[str]] = ["condition", "execution", "interval", "trigger"] + + @field_validator('interval') + def interval_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR')") + return value + + @field_validator('trigger') + def trigger_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ALWAYS', 'ONCE', 'ONCE_PER_INTERVAL']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ALWAYS', 'ONCE', 'ONCE_PER_INTERVAL')") + 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 JsonApiAutomationInAttributesAlert 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 condition + if self.condition: + _dict['condition'] = self.condition.to_dict() + # override the default output from pydantic by calling `to_dict()` of execution + if self.execution: + _dict['execution'] = self.execution.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationInAttributesAlert from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "condition": AlertCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, + "execution": AlertAfm.from_dict(obj["execution"]) if obj.get("execution") is not None else None, + "interval": obj.get("interval"), + "trigger": obj.get("trigger") if obj.get("trigger") is not None else 'ALWAYS' + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_dashboard_tabular_exports_inner.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_dashboard_tabular_exports_inner.py new file mode 100644 index 000000000..e14742fbc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_dashboard_tabular_exports_inner.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.dashboard_tabular_export_request_v2 import DashboardTabularExportRequestV2 +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInAttributesDashboardTabularExportsInner(BaseModel): + """ + JsonApiAutomationInAttributesDashboardTabularExportsInner + """ # noqa: E501 + request_payload: DashboardTabularExportRequestV2 = Field(alias="requestPayload") + __properties: ClassVar[List[str]] = ["requestPayload"] + + 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 JsonApiAutomationInAttributesDashboardTabularExportsInner 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 request_payload + if self.request_payload: + _dict['requestPayload'] = self.request_payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationInAttributesDashboardTabularExportsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestPayload": DashboardTabularExportRequestV2.from_dict(obj["requestPayload"]) if obj.get("requestPayload") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_external_recipients_inner.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_external_recipients_inner.py new file mode 100644 index 000000000..af5a91146 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_external_recipients_inner.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInAttributesExternalRecipientsInner(BaseModel): + """ + JsonApiAutomationInAttributesExternalRecipientsInner + """ # noqa: E501 + email: StrictStr = Field(description="E-mail address to send notifications from.") + __properties: ClassVar[List[str]] = ["email"] + + 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 JsonApiAutomationInAttributesExternalRecipientsInner 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 JsonApiAutomationInAttributesExternalRecipientsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_image_exports_inner.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_image_exports_inner.py new file mode 100644 index 000000000..d4206337f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_image_exports_inner.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.image_export_request import ImageExportRequest +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInAttributesImageExportsInner(BaseModel): + """ + JsonApiAutomationInAttributesImageExportsInner + """ # noqa: E501 + request_payload: ImageExportRequest = Field(alias="requestPayload") + __properties: ClassVar[List[str]] = ["requestPayload"] + + 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 JsonApiAutomationInAttributesImageExportsInner 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 request_payload + if self.request_payload: + _dict['requestPayload'] = self.request_payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationInAttributesImageExportsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestPayload": ImageExportRequest.from_dict(obj["requestPayload"]) if obj.get("requestPayload") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_metadata.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_metadata.py new file mode 100644 index 000000000..7795751a1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_metadata.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.visible_filter import VisibleFilter +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInAttributesMetadata(BaseModel): + """ + Additional information for the automation. + """ # noqa: E501 + visible_filters: Optional[List[VisibleFilter]] = Field(default=None, alias="visibleFilters") + widget: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["visibleFilters", "widget"] + + 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 JsonApiAutomationInAttributesMetadata 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. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in visible_filters (list) + _items = [] + if self.visible_filters: + for _item_visible_filters in self.visible_filters: + if _item_visible_filters: + _items.append(_item_visible_filters.to_dict()) + _dict['visibleFilters'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationInAttributesMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "visibleFilters": [VisibleFilter.from_dict(_item) for _item in obj["visibleFilters"]] if obj.get("visibleFilters") is not None else None, + "widget": obj.get("widget") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_raw_exports_inner.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_raw_exports_inner.py new file mode 100644 index 000000000..66982168c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_raw_exports_inner.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.raw_export_automation_request import RawExportAutomationRequest +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInAttributesRawExportsInner(BaseModel): + """ + JsonApiAutomationInAttributesRawExportsInner + """ # noqa: E501 + request_payload: RawExportAutomationRequest = Field(alias="requestPayload") + __properties: ClassVar[List[str]] = ["requestPayload"] + + 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 JsonApiAutomationInAttributesRawExportsInner 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 request_payload + if self.request_payload: + _dict['requestPayload'] = self.request_payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationInAttributesRawExportsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestPayload": RawExportAutomationRequest.from_dict(obj["requestPayload"]) if obj.get("requestPayload") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_schedule.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_schedule.py new file mode 100644 index 000000000..fc87dcd68 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_schedule.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInAttributesSchedule(BaseModel): + """ + JsonApiAutomationInAttributesSchedule + """ # noqa: E501 + cron: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Cron expression defining the schedule of the automation. The format is SECOND MINUTE HOUR DAY-OF-MONTH MONTH DAY-OF-WEEK (YEAR). The example expression signifies an action every 30 minutes from 9:00 to 17:00 on workdays.") + cron_description: Optional[StrictStr] = Field(default=None, description="Human-readable description of the cron expression.", alias="cronDescription") + first_run: Optional[datetime] = Field(default=None, description="Timestamp of the first scheduled action. If not provided default to the next scheduled time.", alias="firstRun") + timezone: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Timezone in which the schedule is defined.") + __properties: ClassVar[List[str]] = ["cron", "cronDescription", "firstRun", "timezone"] + + 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 JsonApiAutomationInAttributesSchedule 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. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "cron_description", + ]) + + _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 JsonApiAutomationInAttributesSchedule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cron": obj.get("cron"), + "cronDescription": obj.get("cronDescription"), + "firstRun": obj.get("firstRun"), + "timezone": obj.get("timezone") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_slides_exports_inner.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_slides_exports_inner.py new file mode 100644 index 000000000..d66f90693 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_slides_exports_inner.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.slides_export_request import SlidesExportRequest +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInAttributesSlidesExportsInner(BaseModel): + """ + JsonApiAutomationInAttributesSlidesExportsInner + """ # noqa: E501 + request_payload: SlidesExportRequest = Field(alias="requestPayload") + __properties: ClassVar[List[str]] = ["requestPayload"] + + 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 JsonApiAutomationInAttributesSlidesExportsInner 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 request_payload + if self.request_payload: + _dict['requestPayload'] = self.request_payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationInAttributesSlidesExportsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestPayload": SlidesExportRequest.from_dict(obj["requestPayload"]) if obj.get("requestPayload") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_tabular_exports_inner.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_tabular_exports_inner.py new file mode 100644 index 000000000..29571ba3e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_tabular_exports_inner.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.tabular_export_request import TabularExportRequest +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInAttributesTabularExportsInner(BaseModel): + """ + JsonApiAutomationInAttributesTabularExportsInner + """ # noqa: E501 + request_payload: TabularExportRequest = Field(alias="requestPayload") + __properties: ClassVar[List[str]] = ["requestPayload"] + + 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 JsonApiAutomationInAttributesTabularExportsInner 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 request_payload + if self.request_payload: + _dict['requestPayload'] = self.request_payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationInAttributesTabularExportsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestPayload": TabularExportRequest.from_dict(obj["requestPayload"]) if obj.get("requestPayload") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_visual_exports_inner.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_visual_exports_inner.py new file mode 100644 index 000000000..b5654836b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_attributes_visual_exports_inner.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.visual_export_request import VisualExportRequest +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInAttributesVisualExportsInner(BaseModel): + """ + JsonApiAutomationInAttributesVisualExportsInner + """ # noqa: E501 + request_payload: VisualExportRequest = Field(alias="requestPayload") + __properties: ClassVar[List[str]] = ["requestPayload"] + + 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 JsonApiAutomationInAttributesVisualExportsInner 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 request_payload + if self.request_payload: + _dict['requestPayload'] = self.request_payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationInAttributesVisualExportsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestPayload": VisualExportRequest.from_dict(obj["requestPayload"]) if obj.get("requestPayload") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_document.py new file mode 100644 index 000000000..21dd37a60 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_automation_in import JsonApiAutomationIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInDocument(BaseModel): + """ + JsonApiAutomationInDocument + """ # noqa: E501 + data: JsonApiAutomationIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAutomationInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAutomationIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships.py new file mode 100644 index 000000000..eec38d842 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_automation_in_relationships_analytical_dashboard import JsonApiAutomationInRelationshipsAnalyticalDashboard +from gooddata_api_client.models.json_api_automation_in_relationships_export_definitions import JsonApiAutomationInRelationshipsExportDefinitions +from gooddata_api_client.models.json_api_automation_in_relationships_notification_channel import JsonApiAutomationInRelationshipsNotificationChannel +from gooddata_api_client.models.json_api_automation_in_relationships_recipients import JsonApiAutomationInRelationshipsRecipients +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInRelationships(BaseModel): + """ + JsonApiAutomationInRelationships + """ # noqa: E501 + analytical_dashboard: Optional[JsonApiAutomationInRelationshipsAnalyticalDashboard] = Field(default=None, alias="analyticalDashboard") + export_definitions: Optional[JsonApiAutomationInRelationshipsExportDefinitions] = Field(default=None, alias="exportDefinitions") + notification_channel: Optional[JsonApiAutomationInRelationshipsNotificationChannel] = Field(default=None, alias="notificationChannel") + recipients: Optional[JsonApiAutomationInRelationshipsRecipients] = None + __properties: ClassVar[List[str]] = ["analyticalDashboard", "exportDefinitions", "notificationChannel", "recipients"] + + 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 JsonApiAutomationInRelationships 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 analytical_dashboard + if self.analytical_dashboard: + _dict['analyticalDashboard'] = self.analytical_dashboard.to_dict() + # override the default output from pydantic by calling `to_dict()` of export_definitions + if self.export_definitions: + _dict['exportDefinitions'] = self.export_definitions.to_dict() + # override the default output from pydantic by calling `to_dict()` of notification_channel + if self.notification_channel: + _dict['notificationChannel'] = self.notification_channel.to_dict() + # override the default output from pydantic by calling `to_dict()` of recipients + if self.recipients: + _dict['recipients'] = self.recipients.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationInRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyticalDashboard": JsonApiAutomationInRelationshipsAnalyticalDashboard.from_dict(obj["analyticalDashboard"]) if obj.get("analyticalDashboard") is not None else None, + "exportDefinitions": JsonApiAutomationInRelationshipsExportDefinitions.from_dict(obj["exportDefinitions"]) if obj.get("exportDefinitions") is not None else None, + "notificationChannel": JsonApiAutomationInRelationshipsNotificationChannel.from_dict(obj["notificationChannel"]) if obj.get("notificationChannel") is not None else None, + "recipients": JsonApiAutomationInRelationshipsRecipients.from_dict(obj["recipients"]) if obj.get("recipients") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_analytical_dashboard.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_analytical_dashboard.py new file mode 100644 index 000000000..790fe683a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_analytical_dashboard.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_analytical_dashboard_to_one_linkage import JsonApiAnalyticalDashboardToOneLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInRelationshipsAnalyticalDashboard(BaseModel): + """ + JsonApiAutomationInRelationshipsAnalyticalDashboard + """ # noqa: E501 + data: Optional[JsonApiAnalyticalDashboardToOneLinkage] + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAutomationInRelationshipsAnalyticalDashboard 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationInRelationshipsAnalyticalDashboard from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAnalyticalDashboardToOneLinkage.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_export_definitions.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_export_definitions.py new file mode 100644 index 000000000..b78cc47ff --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_export_definitions.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_export_definition_linkage import JsonApiExportDefinitionLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInRelationshipsExportDefinitions(BaseModel): + """ + JsonApiAutomationInRelationshipsExportDefinitions + """ # noqa: E501 + data: List[JsonApiExportDefinitionLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAutomationInRelationshipsExportDefinitions 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationInRelationshipsExportDefinitions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiExportDefinitionLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_notification_channel.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_notification_channel.py new file mode 100644 index 000000000..9b7a0931e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_notification_channel.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_notification_channel_to_one_linkage import JsonApiNotificationChannelToOneLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInRelationshipsNotificationChannel(BaseModel): + """ + JsonApiAutomationInRelationshipsNotificationChannel + """ # noqa: E501 + data: Optional[JsonApiNotificationChannelToOneLinkage] + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAutomationInRelationshipsNotificationChannel 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationInRelationshipsNotificationChannel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiNotificationChannelToOneLinkage.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_recipients.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_recipients.py new file mode 100644 index 000000000..811013ddf --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_in_relationships_recipients.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_user_linkage import JsonApiUserLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationInRelationshipsRecipients(BaseModel): + """ + JsonApiAutomationInRelationshipsRecipients + """ # noqa: E501 + data: List[JsonApiUserLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAutomationInRelationshipsRecipients 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationInRelationshipsRecipients from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiUserLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_linkage.py new file mode 100644 index 000000000..bdf5eb5ab --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiAutomationLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['automation']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('automation')") + 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 JsonApiAutomationLinkage 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 JsonApiAutomationLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out.py new file mode 100644 index 000000000..3d84cd6da --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_automation_out_attributes import JsonApiAutomationOutAttributes +from gooddata_api_client.models.json_api_automation_out_relationships import JsonApiAutomationOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationOut(BaseModel): + """ + JSON:API representation of automation entity. + """ # noqa: E501 + attributes: Optional[JsonApiAutomationOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiAutomationOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['automation']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('automation')") + 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 JsonApiAutomationOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAutomationOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiAutomationOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_attributes.py new file mode 100644 index 000000000..cd05b5006 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_attributes.py @@ -0,0 +1,255 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_automation_in_attributes_alert import JsonApiAutomationInAttributesAlert +from gooddata_api_client.models.json_api_automation_in_attributes_dashboard_tabular_exports_inner import JsonApiAutomationInAttributesDashboardTabularExportsInner +from gooddata_api_client.models.json_api_automation_in_attributes_external_recipients_inner import JsonApiAutomationInAttributesExternalRecipientsInner +from gooddata_api_client.models.json_api_automation_in_attributes_image_exports_inner import JsonApiAutomationInAttributesImageExportsInner +from gooddata_api_client.models.json_api_automation_in_attributes_metadata import JsonApiAutomationInAttributesMetadata +from gooddata_api_client.models.json_api_automation_in_attributes_raw_exports_inner import JsonApiAutomationInAttributesRawExportsInner +from gooddata_api_client.models.json_api_automation_in_attributes_schedule import JsonApiAutomationInAttributesSchedule +from gooddata_api_client.models.json_api_automation_in_attributes_slides_exports_inner import JsonApiAutomationInAttributesSlidesExportsInner +from gooddata_api_client.models.json_api_automation_in_attributes_tabular_exports_inner import JsonApiAutomationInAttributesTabularExportsInner +from gooddata_api_client.models.json_api_automation_in_attributes_visual_exports_inner import JsonApiAutomationInAttributesVisualExportsInner +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationOutAttributes(BaseModel): + """ + JsonApiAutomationOutAttributes + """ # noqa: E501 + alert: Optional[JsonApiAutomationInAttributesAlert] = None + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + created_at: Optional[datetime] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + dashboard_tabular_exports: Optional[List[JsonApiAutomationInAttributesDashboardTabularExportsInner]] = Field(default=None, alias="dashboardTabularExports") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + details: Optional[Dict[str, Any]] = Field(default=None, description="Additional details to be included in the automated message.") + evaluation_mode: Optional[StrictStr] = Field(default=None, description="Specify automation evaluation mode.", alias="evaluationMode") + external_recipients: Optional[List[JsonApiAutomationInAttributesExternalRecipientsInner]] = Field(default=None, description="External recipients of the automation action results.", alias="externalRecipients") + image_exports: Optional[List[JsonApiAutomationInAttributesImageExportsInner]] = Field(default=None, alias="imageExports") + metadata: Optional[JsonApiAutomationInAttributesMetadata] = None + modified_at: Optional[datetime] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + raw_exports: Optional[List[JsonApiAutomationInAttributesRawExportsInner]] = Field(default=None, alias="rawExports") + schedule: Optional[JsonApiAutomationInAttributesSchedule] = None + slides_exports: Optional[List[JsonApiAutomationInAttributesSlidesExportsInner]] = Field(default=None, alias="slidesExports") + state: Optional[StrictStr] = Field(default=None, description="Current state of the automation.") + tabular_exports: Optional[List[JsonApiAutomationInAttributesTabularExportsInner]] = Field(default=None, alias="tabularExports") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + visual_exports: Optional[List[JsonApiAutomationInAttributesVisualExportsInner]] = Field(default=None, alias="visualExports") + __properties: ClassVar[List[str]] = ["alert", "areRelationsValid", "createdAt", "dashboardTabularExports", "description", "details", "evaluationMode", "externalRecipients", "imageExports", "metadata", "modifiedAt", "rawExports", "schedule", "slidesExports", "state", "tabularExports", "tags", "title", "visualExports"] + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('evaluation_mode') + def evaluation_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['SHARED', 'PER_RECIPIENT']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SHARED', 'PER_RECIPIENT')") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ACTIVE', 'PAUSED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ACTIVE', 'PAUSED')") + 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 JsonApiAutomationOutAttributes 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 alert + if self.alert: + _dict['alert'] = self.alert.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in dashboard_tabular_exports (list) + _items = [] + if self.dashboard_tabular_exports: + for _item_dashboard_tabular_exports in self.dashboard_tabular_exports: + if _item_dashboard_tabular_exports: + _items.append(_item_dashboard_tabular_exports.to_dict()) + _dict['dashboardTabularExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in external_recipients (list) + _items = [] + if self.external_recipients: + for _item_external_recipients in self.external_recipients: + if _item_external_recipients: + _items.append(_item_external_recipients.to_dict()) + _dict['externalRecipients'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in image_exports (list) + _items = [] + if self.image_exports: + for _item_image_exports in self.image_exports: + if _item_image_exports: + _items.append(_item_image_exports.to_dict()) + _dict['imageExports'] = _items + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in raw_exports (list) + _items = [] + if self.raw_exports: + for _item_raw_exports in self.raw_exports: + if _item_raw_exports: + _items.append(_item_raw_exports.to_dict()) + _dict['rawExports'] = _items + # override the default output from pydantic by calling `to_dict()` of schedule + if self.schedule: + _dict['schedule'] = self.schedule.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in slides_exports (list) + _items = [] + if self.slides_exports: + for _item_slides_exports in self.slides_exports: + if _item_slides_exports: + _items.append(_item_slides_exports.to_dict()) + _dict['slidesExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in tabular_exports (list) + _items = [] + if self.tabular_exports: + for _item_tabular_exports in self.tabular_exports: + if _item_tabular_exports: + _items.append(_item_tabular_exports.to_dict()) + _dict['tabularExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in visual_exports (list) + _items = [] + if self.visual_exports: + for _item_visual_exports in self.visual_exports: + if _item_visual_exports: + _items.append(_item_visual_exports.to_dict()) + _dict['visualExports'] = _items + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alert": JsonApiAutomationInAttributesAlert.from_dict(obj["alert"]) if obj.get("alert") is not None else None, + "areRelationsValid": obj.get("areRelationsValid"), + "createdAt": obj.get("createdAt"), + "dashboardTabularExports": [JsonApiAutomationInAttributesDashboardTabularExportsInner.from_dict(_item) for _item in obj["dashboardTabularExports"]] if obj.get("dashboardTabularExports") is not None else None, + "description": obj.get("description"), + "details": obj.get("details"), + "evaluationMode": obj.get("evaluationMode"), + "externalRecipients": [JsonApiAutomationInAttributesExternalRecipientsInner.from_dict(_item) for _item in obj["externalRecipients"]] if obj.get("externalRecipients") is not None else None, + "imageExports": [JsonApiAutomationInAttributesImageExportsInner.from_dict(_item) for _item in obj["imageExports"]] if obj.get("imageExports") is not None else None, + "metadata": JsonApiAutomationInAttributesMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "modifiedAt": obj.get("modifiedAt"), + "rawExports": [JsonApiAutomationInAttributesRawExportsInner.from_dict(_item) for _item in obj["rawExports"]] if obj.get("rawExports") is not None else None, + "schedule": JsonApiAutomationInAttributesSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None, + "slidesExports": [JsonApiAutomationInAttributesSlidesExportsInner.from_dict(_item) for _item in obj["slidesExports"]] if obj.get("slidesExports") is not None else None, + "state": obj.get("state"), + "tabularExports": [JsonApiAutomationInAttributesTabularExportsInner.from_dict(_item) for _item in obj["tabularExports"]] if obj.get("tabularExports") is not None else None, + "tags": obj.get("tags"), + "title": obj.get("title"), + "visualExports": [JsonApiAutomationInAttributesVisualExportsInner.from_dict(_item) for _item in obj["visualExports"]] if obj.get("visualExports") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_document.py new file mode 100644 index 000000000..4857b944c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_automation_out import JsonApiAutomationOut +from gooddata_api_client.models.json_api_automation_out_includes import JsonApiAutomationOutIncludes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationOutDocument(BaseModel): + """ + JsonApiAutomationOutDocument + """ # noqa: E501 + data: JsonApiAutomationOut + included: Optional[List[JsonApiAutomationOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiAutomationOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAutomationOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiAutomationOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_includes.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_includes.py new file mode 100644 index 000000000..bc63fb861 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_includes.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_analytical_dashboard_out_with_links import JsonApiAnalyticalDashboardOutWithLinks +from gooddata_api_client.models.json_api_automation_result_out_with_links import JsonApiAutomationResultOutWithLinks +from gooddata_api_client.models.json_api_export_definition_out_with_links import JsonApiExportDefinitionOutWithLinks +from gooddata_api_client.models.json_api_notification_channel_out_with_links import JsonApiNotificationChannelOutWithLinks +from gooddata_api_client.models.json_api_user_identifier_out_with_links import JsonApiUserIdentifierOutWithLinks +from gooddata_api_client.models.json_api_user_out_with_links import JsonApiUserOutWithLinks +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIAUTOMATIONOUTINCLUDES_ONE_OF_SCHEMAS = ["JsonApiAnalyticalDashboardOutWithLinks", "JsonApiAutomationResultOutWithLinks", "JsonApiExportDefinitionOutWithLinks", "JsonApiNotificationChannelOutWithLinks", "JsonApiUserIdentifierOutWithLinks", "JsonApiUserOutWithLinks"] + +class JsonApiAutomationOutIncludes(BaseModel): + """ + JsonApiAutomationOutIncludes + """ + # data type: JsonApiNotificationChannelOutWithLinks + oneof_schema_1_validator: Optional[JsonApiNotificationChannelOutWithLinks] = None + # data type: JsonApiAnalyticalDashboardOutWithLinks + oneof_schema_2_validator: Optional[JsonApiAnalyticalDashboardOutWithLinks] = None + # data type: JsonApiUserIdentifierOutWithLinks + oneof_schema_3_validator: Optional[JsonApiUserIdentifierOutWithLinks] = None + # data type: JsonApiExportDefinitionOutWithLinks + oneof_schema_4_validator: Optional[JsonApiExportDefinitionOutWithLinks] = None + # data type: JsonApiUserOutWithLinks + oneof_schema_5_validator: Optional[JsonApiUserOutWithLinks] = None + # data type: JsonApiAutomationResultOutWithLinks + oneof_schema_6_validator: Optional[JsonApiAutomationResultOutWithLinks] = None + actual_instance: Optional[Union[JsonApiAnalyticalDashboardOutWithLinks, JsonApiAutomationResultOutWithLinks, JsonApiExportDefinitionOutWithLinks, JsonApiNotificationChannelOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiUserOutWithLinks]] = None + one_of_schemas: Set[str] = { "JsonApiAnalyticalDashboardOutWithLinks", "JsonApiAutomationResultOutWithLinks", "JsonApiExportDefinitionOutWithLinks", "JsonApiNotificationChannelOutWithLinks", "JsonApiUserIdentifierOutWithLinks", "JsonApiUserOutWithLinks" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiAutomationOutIncludes.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiNotificationChannelOutWithLinks + if not isinstance(v, JsonApiNotificationChannelOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiNotificationChannelOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiAnalyticalDashboardOutWithLinks + if not isinstance(v, JsonApiAnalyticalDashboardOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAnalyticalDashboardOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiUserIdentifierOutWithLinks + if not isinstance(v, JsonApiUserIdentifierOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserIdentifierOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiExportDefinitionOutWithLinks + if not isinstance(v, JsonApiExportDefinitionOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiExportDefinitionOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiUserOutWithLinks + if not isinstance(v, JsonApiUserOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiAutomationResultOutWithLinks + if not isinstance(v, JsonApiAutomationResultOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAutomationResultOutWithLinks`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiAutomationOutIncludes with oneOf schemas: JsonApiAnalyticalDashboardOutWithLinks, JsonApiAutomationResultOutWithLinks, JsonApiExportDefinitionOutWithLinks, JsonApiNotificationChannelOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiUserOutWithLinks. 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 + + # deserialize data into JsonApiNotificationChannelOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiNotificationChannelOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiAnalyticalDashboardOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAnalyticalDashboardOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiUserIdentifierOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiUserIdentifierOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiExportDefinitionOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiExportDefinitionOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiUserOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiUserOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiAutomationResultOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAutomationResultOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiAutomationOutIncludes with oneOf schemas: JsonApiAnalyticalDashboardOutWithLinks, JsonApiAutomationResultOutWithLinks, JsonApiExportDefinitionOutWithLinks, JsonApiNotificationChannelOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiUserOutWithLinks. 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], JsonApiAnalyticalDashboardOutWithLinks, JsonApiAutomationResultOutWithLinks, JsonApiExportDefinitionOutWithLinks, JsonApiNotificationChannelOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiUserOutWithLinks]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_list.py new file mode 100644 index 000000000..588c27c63 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_automation_out_includes import JsonApiAutomationOutIncludes +from gooddata_api_client.models.json_api_automation_out_with_links import JsonApiAutomationOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiAutomationOutWithLinks] + included: Optional[List[JsonApiAutomationOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiAutomationOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiAutomationOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiAutomationOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_relationships.py new file mode 100644 index 000000000..1f5511259 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_relationships.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_certified_by import JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy +from gooddata_api_client.models.json_api_automation_in_relationships_analytical_dashboard import JsonApiAutomationInRelationshipsAnalyticalDashboard +from gooddata_api_client.models.json_api_automation_in_relationships_export_definitions import JsonApiAutomationInRelationshipsExportDefinitions +from gooddata_api_client.models.json_api_automation_in_relationships_notification_channel import JsonApiAutomationInRelationshipsNotificationChannel +from gooddata_api_client.models.json_api_automation_in_relationships_recipients import JsonApiAutomationInRelationshipsRecipients +from gooddata_api_client.models.json_api_automation_out_relationships_automation_results import JsonApiAutomationOutRelationshipsAutomationResults +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationOutRelationships(BaseModel): + """ + JsonApiAutomationOutRelationships + """ # noqa: E501 + analytical_dashboard: Optional[JsonApiAutomationInRelationshipsAnalyticalDashboard] = Field(default=None, alias="analyticalDashboard") + automation_results: Optional[JsonApiAutomationOutRelationshipsAutomationResults] = Field(default=None, alias="automationResults") + created_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="createdBy") + export_definitions: Optional[JsonApiAutomationInRelationshipsExportDefinitions] = Field(default=None, alias="exportDefinitions") + modified_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="modifiedBy") + notification_channel: Optional[JsonApiAutomationInRelationshipsNotificationChannel] = Field(default=None, alias="notificationChannel") + recipients: Optional[JsonApiAutomationInRelationshipsRecipients] = None + __properties: ClassVar[List[str]] = ["analyticalDashboard", "automationResults", "createdBy", "exportDefinitions", "modifiedBy", "notificationChannel", "recipients"] + + 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 JsonApiAutomationOutRelationships 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 analytical_dashboard + if self.analytical_dashboard: + _dict['analyticalDashboard'] = self.analytical_dashboard.to_dict() + # override the default output from pydantic by calling `to_dict()` of automation_results + if self.automation_results: + _dict['automationResults'] = self.automation_results.to_dict() + # override the default output from pydantic by calling `to_dict()` of created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of export_definitions + if self.export_definitions: + _dict['exportDefinitions'] = self.export_definitions.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of notification_channel + if self.notification_channel: + _dict['notificationChannel'] = self.notification_channel.to_dict() + # override the default output from pydantic by calling `to_dict()` of recipients + if self.recipients: + _dict['recipients'] = self.recipients.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyticalDashboard": JsonApiAutomationInRelationshipsAnalyticalDashboard.from_dict(obj["analyticalDashboard"]) if obj.get("analyticalDashboard") is not None else None, + "automationResults": JsonApiAutomationOutRelationshipsAutomationResults.from_dict(obj["automationResults"]) if obj.get("automationResults") is not None else None, + "createdBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "exportDefinitions": JsonApiAutomationInRelationshipsExportDefinitions.from_dict(obj["exportDefinitions"]) if obj.get("exportDefinitions") is not None else None, + "modifiedBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None, + "notificationChannel": JsonApiAutomationInRelationshipsNotificationChannel.from_dict(obj["notificationChannel"]) if obj.get("notificationChannel") is not None else None, + "recipients": JsonApiAutomationInRelationshipsRecipients.from_dict(obj["recipients"]) if obj.get("recipients") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_relationships_automation_results.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_relationships_automation_results.py new file mode 100644 index 000000000..8383487fe --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_relationships_automation_results.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_automation_result_linkage import JsonApiAutomationResultLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationOutRelationshipsAutomationResults(BaseModel): + """ + JsonApiAutomationOutRelationshipsAutomationResults + """ # noqa: E501 + data: List[JsonApiAutomationResultLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAutomationOutRelationshipsAutomationResults 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationOutRelationshipsAutomationResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiAutomationResultLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_with_links.py new file mode 100644 index 000000000..e88fcb351 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_automation_out_attributes import JsonApiAutomationOutAttributes +from gooddata_api_client.models.json_api_automation_out_relationships import JsonApiAutomationOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationOutWithLinks(BaseModel): + """ + JsonApiAutomationOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiAutomationOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiAutomationOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['automation']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('automation')") + 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 JsonApiAutomationOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAutomationOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiAutomationOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_patch.py new file mode 100644 index 000000000..f718f6fe2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_patch.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_automation_in_attributes import JsonApiAutomationInAttributes +from gooddata_api_client.models.json_api_automation_in_relationships import JsonApiAutomationInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationPatch(BaseModel): + """ + JSON:API representation of patching automation entity. + """ # noqa: E501 + attributes: Optional[JsonApiAutomationInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiAutomationInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['automation']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('automation')") + 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 JsonApiAutomationPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAutomationInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiAutomationInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_patch_document.py new file mode 100644 index 000000000..9ba09e4e1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_automation_patch import JsonApiAutomationPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationPatchDocument(BaseModel): + """ + JsonApiAutomationPatchDocument + """ # noqa: E501 + data: JsonApiAutomationPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAutomationPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAutomationPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_linkage.py new file mode 100644 index 000000000..1482f9a17 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiAutomationResultLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['automationResult']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('automationResult')") + 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 JsonApiAutomationResultLinkage 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 JsonApiAutomationResultLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out.py new file mode 100644 index 000000000..198125849 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_automation_result_out_attributes import JsonApiAutomationResultOutAttributes +from gooddata_api_client.models.json_api_automation_result_out_relationships import JsonApiAutomationResultOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationResultOut(BaseModel): + """ + JSON:API representation of automationResult entity. + """ # noqa: E501 + attributes: JsonApiAutomationResultOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiAutomationResultOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['automationResult']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('automationResult')") + 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 JsonApiAutomationResultOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationResultOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAutomationResultOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiAutomationResultOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_attributes.py new file mode 100644 index 000000000..23e533e61 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_attributes.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +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 JsonApiAutomationResultOutAttributes(BaseModel): + """ + JsonApiAutomationResultOutAttributes + """ # noqa: E501 + error_message: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, alias="errorMessage") + executed_at: datetime = Field(description="Timestamp of the last automation run.", alias="executedAt") + status: StrictStr = Field(description="Status of the last automation run.") + trace_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, alias="traceId") + __properties: ClassVar[List[str]] = ["errorMessage", "executedAt", "status", "traceId"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['SUCCESS', 'FAILED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SUCCESS', 'FAILED')") + 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 JsonApiAutomationResultOutAttributes 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 JsonApiAutomationResultOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "errorMessage": obj.get("errorMessage"), + "executedAt": obj.get("executedAt"), + "status": obj.get("status"), + "traceId": obj.get("traceId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_list.py new file mode 100644 index 000000000..29463426a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_automation_out_with_links import JsonApiAutomationOutWithLinks +from gooddata_api_client.models.json_api_automation_result_out_with_links import JsonApiAutomationResultOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationResultOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiAutomationResultOutWithLinks] + included: Optional[List[JsonApiAutomationOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiAutomationResultOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationResultOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiAutomationResultOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiAutomationOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_relationships.py new file mode 100644 index 000000000..1535ee80e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_relationships.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_automation_result_out_relationships_automation import JsonApiAutomationResultOutRelationshipsAutomation +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationResultOutRelationships(BaseModel): + """ + JsonApiAutomationResultOutRelationships + """ # noqa: E501 + automation: Optional[JsonApiAutomationResultOutRelationshipsAutomation] = None + __properties: ClassVar[List[str]] = ["automation"] + + 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 JsonApiAutomationResultOutRelationships 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 automation + if self.automation: + _dict['automation'] = self.automation.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationResultOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "automation": JsonApiAutomationResultOutRelationshipsAutomation.from_dict(obj["automation"]) if obj.get("automation") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_relationships_automation.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_relationships_automation.py new file mode 100644 index 000000000..e3ed8d761 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_relationships_automation.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_automation_to_one_linkage import JsonApiAutomationToOneLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationResultOutRelationshipsAutomation(BaseModel): + """ + JsonApiAutomationResultOutRelationshipsAutomation + """ # noqa: E501 + data: Optional[JsonApiAutomationToOneLinkage] + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiAutomationResultOutRelationshipsAutomation 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationResultOutRelationshipsAutomation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAutomationToOneLinkage.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_with_links.py new file mode 100644 index 000000000..d914780a2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_result_out_with_links.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_automation_result_out_attributes import JsonApiAutomationResultOutAttributes +from gooddata_api_client.models.json_api_automation_result_out_relationships import JsonApiAutomationResultOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiAutomationResultOutWithLinks(BaseModel): + """ + JsonApiAutomationResultOutWithLinks + """ # noqa: E501 + attributes: JsonApiAutomationResultOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiAutomationResultOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['automationResult']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('automationResult')") + 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 JsonApiAutomationResultOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiAutomationResultOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAutomationResultOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiAutomationResultOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_automation_to_one_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_automation_to_one_linkage.py new file mode 100644 index 000000000..3ae609da2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_automation_to_one_linkage.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_automation_linkage import JsonApiAutomationLinkage +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIAUTOMATIONTOONELINKAGE_ONE_OF_SCHEMAS = ["JsonApiAutomationLinkage"] + +class JsonApiAutomationToOneLinkage(BaseModel): + """ + References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + """ + # data type: JsonApiAutomationLinkage + oneof_schema_1_validator: Optional[JsonApiAutomationLinkage] = None + actual_instance: Optional[Union[JsonApiAutomationLinkage]] = None + one_of_schemas: Set[str] = { "JsonApiAutomationLinkage" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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): + if v is None: + return v + + instance = JsonApiAutomationToOneLinkage.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiAutomationLinkage + if not isinstance(v, JsonApiAutomationLinkage): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAutomationLinkage`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiAutomationToOneLinkage with oneOf schemas: JsonApiAutomationLinkage. 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: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into JsonApiAutomationLinkage + try: + if match == 0: + instance.actual_instance = JsonApiAutomationLinkage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiAutomationToOneLinkage with oneOf schemas: JsonApiAutomationLinkage. 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], JsonApiAutomationLinkage]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_in.py new file mode 100644 index 000000000..d5a3d01ef --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_color_palette_in_attributes import JsonApiColorPaletteInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiColorPaletteIn(BaseModel): + """ + JSON:API representation of colorPalette entity. + """ # noqa: E501 + attributes: JsonApiColorPaletteInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['colorPalette']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('colorPalette')") + 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 JsonApiColorPaletteIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiColorPaletteIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiColorPaletteInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_in_attributes.py new file mode 100644 index 000000000..fa7b66f96 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_in_attributes.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiColorPaletteInAttributes(BaseModel): + """ + JsonApiColorPaletteInAttributes + """ # noqa: E501 + content: Dict[str, Any] = Field(description="Free-form JSON content. Maximum supported length is 15000 characters.") + name: Annotated[str, Field(strict=True, max_length=255)] + __properties: ClassVar[List[str]] = ["content", "name"] + + 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 JsonApiColorPaletteInAttributes 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 JsonApiColorPaletteInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_in_document.py new file mode 100644 index 000000000..eeeaf4d13 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_color_palette_in import JsonApiColorPaletteIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiColorPaletteInDocument(BaseModel): + """ + JsonApiColorPaletteInDocument + """ # noqa: E501 + data: JsonApiColorPaletteIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiColorPaletteInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiColorPaletteInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiColorPaletteIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out.py new file mode 100644 index 000000000..d6a57b91e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_color_palette_in_attributes import JsonApiColorPaletteInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiColorPaletteOut(BaseModel): + """ + JSON:API representation of colorPalette entity. + """ # noqa: E501 + attributes: JsonApiColorPaletteInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['colorPalette']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('colorPalette')") + 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 JsonApiColorPaletteOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiColorPaletteOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiColorPaletteInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out_document.py new file mode 100644 index 000000000..3ad6f9502 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_color_palette_out import JsonApiColorPaletteOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiColorPaletteOutDocument(BaseModel): + """ + JsonApiColorPaletteOutDocument + """ # noqa: E501 + data: JsonApiColorPaletteOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiColorPaletteOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiColorPaletteOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiColorPaletteOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out_list.py new file mode 100644 index 000000000..ad82cdb98 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_color_palette_out_with_links import JsonApiColorPaletteOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiColorPaletteOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiColorPaletteOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiColorPaletteOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiColorPaletteOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiColorPaletteOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out_with_links.py new file mode 100644 index 000000000..829e020df --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_color_palette_in_attributes import JsonApiColorPaletteInAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiColorPaletteOutWithLinks(BaseModel): + """ + JsonApiColorPaletteOutWithLinks + """ # noqa: E501 + attributes: JsonApiColorPaletteInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['colorPalette']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('colorPalette')") + 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 JsonApiColorPaletteOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiColorPaletteOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiColorPaletteInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_patch.py new file mode 100644 index 000000000..71c82a88d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_color_palette_patch_attributes import JsonApiColorPalettePatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiColorPalettePatch(BaseModel): + """ + JSON:API representation of patching colorPalette entity. + """ # noqa: E501 + attributes: JsonApiColorPalettePatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['colorPalette']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('colorPalette')") + 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 JsonApiColorPalettePatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiColorPalettePatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiColorPalettePatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_patch_attributes.py new file mode 100644 index 000000000..072d294d5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_patch_attributes.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiColorPalettePatchAttributes(BaseModel): + """ + JsonApiColorPalettePatchAttributes + """ # noqa: E501 + content: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON content. Maximum supported length is 15000 characters.") + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["content", "name"] + + 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 JsonApiColorPalettePatchAttributes 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 JsonApiColorPalettePatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_patch_document.py new file mode 100644 index 000000000..09448a903 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_color_palette_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_color_palette_patch import JsonApiColorPalettePatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiColorPalettePatchDocument(BaseModel): + """ + JsonApiColorPalettePatchDocument + """ # noqa: E501 + data: JsonApiColorPalettePatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiColorPalettePatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiColorPalettePatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiColorPalettePatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_in.py new file mode 100644 index 000000000..6acfb2985 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_cookie_security_configuration_in_attributes import JsonApiCookieSecurityConfigurationInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCookieSecurityConfigurationIn(BaseModel): + """ + JSON:API representation of cookieSecurityConfiguration entity. + """ # noqa: E501 + attributes: Optional[JsonApiCookieSecurityConfigurationInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['cookieSecurityConfiguration']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('cookieSecurityConfiguration')") + 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 JsonApiCookieSecurityConfigurationIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCookieSecurityConfigurationIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCookieSecurityConfigurationInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_in_attributes.py new file mode 100644 index 000000000..3b410659d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_in_attributes.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +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 JsonApiCookieSecurityConfigurationInAttributes(BaseModel): + """ + JsonApiCookieSecurityConfigurationInAttributes + """ # noqa: E501 + last_rotation: Optional[datetime] = Field(default=None, alias="lastRotation") + rotation_interval: Optional[StrictStr] = Field(default=None, description="Length of interval between automatic rotations expressed in format of ISO 8601 duration", alias="rotationInterval") + __properties: ClassVar[List[str]] = ["lastRotation", "rotationInterval"] + + 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 JsonApiCookieSecurityConfigurationInAttributes 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 JsonApiCookieSecurityConfigurationInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "lastRotation": obj.get("lastRotation"), + "rotationInterval": obj.get("rotationInterval") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_in_document.py new file mode 100644 index 000000000..dd60793ab --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_cookie_security_configuration_in import JsonApiCookieSecurityConfigurationIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCookieSecurityConfigurationInDocument(BaseModel): + """ + JsonApiCookieSecurityConfigurationInDocument + """ # noqa: E501 + data: JsonApiCookieSecurityConfigurationIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiCookieSecurityConfigurationInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCookieSecurityConfigurationInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiCookieSecurityConfigurationIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_out.py new file mode 100644 index 000000000..7056d4598 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_cookie_security_configuration_in_attributes import JsonApiCookieSecurityConfigurationInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCookieSecurityConfigurationOut(BaseModel): + """ + JSON:API representation of cookieSecurityConfiguration entity. + """ # noqa: E501 + attributes: Optional[JsonApiCookieSecurityConfigurationInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['cookieSecurityConfiguration']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('cookieSecurityConfiguration')") + 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 JsonApiCookieSecurityConfigurationOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCookieSecurityConfigurationOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCookieSecurityConfigurationInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_out_document.py new file mode 100644 index 000000000..ff43c696c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_cookie_security_configuration_out import JsonApiCookieSecurityConfigurationOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCookieSecurityConfigurationOutDocument(BaseModel): + """ + JsonApiCookieSecurityConfigurationOutDocument + """ # noqa: E501 + data: JsonApiCookieSecurityConfigurationOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiCookieSecurityConfigurationOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCookieSecurityConfigurationOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiCookieSecurityConfigurationOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_patch.py new file mode 100644 index 000000000..ca1755f49 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_cookie_security_configuration_in_attributes import JsonApiCookieSecurityConfigurationInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCookieSecurityConfigurationPatch(BaseModel): + """ + JSON:API representation of patching cookieSecurityConfiguration entity. + """ # noqa: E501 + attributes: Optional[JsonApiCookieSecurityConfigurationInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['cookieSecurityConfiguration']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('cookieSecurityConfiguration')") + 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 JsonApiCookieSecurityConfigurationPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCookieSecurityConfigurationPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCookieSecurityConfigurationInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_patch_document.py new file mode 100644 index 000000000..65505eaf6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_cookie_security_configuration_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_cookie_security_configuration_patch import JsonApiCookieSecurityConfigurationPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCookieSecurityConfigurationPatchDocument(BaseModel): + """ + JsonApiCookieSecurityConfigurationPatchDocument + """ # noqa: E501 + data: JsonApiCookieSecurityConfigurationPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiCookieSecurityConfigurationPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCookieSecurityConfigurationPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiCookieSecurityConfigurationPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_in.py new file mode 100644 index 000000000..66fe64ac4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_csp_directive_in_attributes import JsonApiCspDirectiveInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCspDirectiveIn(BaseModel): + """ + JSON:API representation of cspDirective entity. + """ # noqa: E501 + attributes: JsonApiCspDirectiveInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['cspDirective']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('cspDirective')") + 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 JsonApiCspDirectiveIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCspDirectiveIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCspDirectiveInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_in_attributes.py new file mode 100644 index 000000000..452b324fb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_in_attributes.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCspDirectiveInAttributes(BaseModel): + """ + JsonApiCspDirectiveInAttributes + """ # noqa: E501 + sources: List[StrictStr] + __properties: ClassVar[List[str]] = ["sources"] + + 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 JsonApiCspDirectiveInAttributes 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 JsonApiCspDirectiveInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sources": obj.get("sources") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_in_document.py new file mode 100644 index 000000000..4cbaf9e2f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_csp_directive_in import JsonApiCspDirectiveIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCspDirectiveInDocument(BaseModel): + """ + JsonApiCspDirectiveInDocument + """ # noqa: E501 + data: JsonApiCspDirectiveIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiCspDirectiveInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCspDirectiveInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiCspDirectiveIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out.py new file mode 100644 index 000000000..ddd2aa210 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_csp_directive_in_attributes import JsonApiCspDirectiveInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCspDirectiveOut(BaseModel): + """ + JSON:API representation of cspDirective entity. + """ # noqa: E501 + attributes: JsonApiCspDirectiveInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['cspDirective']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('cspDirective')") + 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 JsonApiCspDirectiveOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCspDirectiveOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCspDirectiveInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out_document.py new file mode 100644 index 000000000..bb4539062 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_csp_directive_out import JsonApiCspDirectiveOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCspDirectiveOutDocument(BaseModel): + """ + JsonApiCspDirectiveOutDocument + """ # noqa: E501 + data: JsonApiCspDirectiveOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiCspDirectiveOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCspDirectiveOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiCspDirectiveOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out_list.py new file mode 100644 index 000000000..0f7735af7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_csp_directive_out_with_links import JsonApiCspDirectiveOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCspDirectiveOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiCspDirectiveOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiCspDirectiveOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCspDirectiveOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiCspDirectiveOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out_with_links.py new file mode 100644 index 000000000..f0c864266 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_csp_directive_in_attributes import JsonApiCspDirectiveInAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCspDirectiveOutWithLinks(BaseModel): + """ + JsonApiCspDirectiveOutWithLinks + """ # noqa: E501 + attributes: JsonApiCspDirectiveInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['cspDirective']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('cspDirective')") + 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 JsonApiCspDirectiveOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCspDirectiveOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCspDirectiveInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_patch.py new file mode 100644 index 000000000..89d21f635 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_csp_directive_patch_attributes import JsonApiCspDirectivePatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCspDirectivePatch(BaseModel): + """ + JSON:API representation of patching cspDirective entity. + """ # noqa: E501 + attributes: JsonApiCspDirectivePatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['cspDirective']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('cspDirective')") + 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 JsonApiCspDirectivePatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCspDirectivePatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCspDirectivePatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_patch_attributes.py new file mode 100644 index 000000000..41a2ffd61 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_patch_attributes.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiCspDirectivePatchAttributes(BaseModel): + """ + JsonApiCspDirectivePatchAttributes + """ # noqa: E501 + sources: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["sources"] + + 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 JsonApiCspDirectivePatchAttributes 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 JsonApiCspDirectivePatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sources": obj.get("sources") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_patch_document.py new file mode 100644 index 000000000..1628d1e6c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_csp_directive_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_csp_directive_patch import JsonApiCspDirectivePatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCspDirectivePatchDocument(BaseModel): + """ + JsonApiCspDirectivePatchDocument + """ # noqa: E501 + data: JsonApiCspDirectivePatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiCspDirectivePatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCspDirectivePatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiCspDirectivePatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_in.py new file mode 100644 index 000000000..4b201be6c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_custom_application_setting_in_attributes import JsonApiCustomApplicationSettingInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomApplicationSettingIn(BaseModel): + """ + JSON:API representation of customApplicationSetting entity. + """ # noqa: E501 + attributes: JsonApiCustomApplicationSettingInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['customApplicationSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('customApplicationSetting')") + 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 JsonApiCustomApplicationSettingIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomApplicationSettingIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCustomApplicationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_in_attributes.py new file mode 100644 index 000000000..009549521 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_in_attributes.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomApplicationSettingInAttributes(BaseModel): + """ + JsonApiCustomApplicationSettingInAttributes + """ # noqa: E501 + application_name: Annotated[str, Field(strict=True, max_length=255)] = Field(alias="applicationName") + content: Dict[str, Any] = Field(description="Free-form JSON content. Maximum supported length is 250000 characters.") + __properties: ClassVar[List[str]] = ["applicationName", "content"] + + 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 JsonApiCustomApplicationSettingInAttributes 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 JsonApiCustomApplicationSettingInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applicationName": obj.get("applicationName"), + "content": obj.get("content") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_in_document.py new file mode 100644 index 000000000..eaa452c32 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_custom_application_setting_in import JsonApiCustomApplicationSettingIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomApplicationSettingInDocument(BaseModel): + """ + JsonApiCustomApplicationSettingInDocument + """ # noqa: E501 + data: JsonApiCustomApplicationSettingIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiCustomApplicationSettingInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomApplicationSettingInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiCustomApplicationSettingIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out.py new file mode 100644 index 000000000..60d22b9b0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_custom_application_setting_in_attributes import JsonApiCustomApplicationSettingInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomApplicationSettingOut(BaseModel): + """ + JSON:API representation of customApplicationSetting entity. + """ # noqa: E501 + attributes: JsonApiCustomApplicationSettingInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['customApplicationSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('customApplicationSetting')") + 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 JsonApiCustomApplicationSettingOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomApplicationSettingOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCustomApplicationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out_document.py new file mode 100644 index 000000000..bd0f21358 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_custom_application_setting_out import JsonApiCustomApplicationSettingOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomApplicationSettingOutDocument(BaseModel): + """ + JsonApiCustomApplicationSettingOutDocument + """ # noqa: E501 + data: JsonApiCustomApplicationSettingOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiCustomApplicationSettingOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomApplicationSettingOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiCustomApplicationSettingOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out_list.py new file mode 100644 index 000000000..a68ba29bc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_custom_application_setting_out_with_links import JsonApiCustomApplicationSettingOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomApplicationSettingOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiCustomApplicationSettingOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiCustomApplicationSettingOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomApplicationSettingOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiCustomApplicationSettingOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out_with_links.py new file mode 100644 index 000000000..f9f141fd8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_out_with_links.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_custom_application_setting_in_attributes import JsonApiCustomApplicationSettingInAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomApplicationSettingOutWithLinks(BaseModel): + """ + JsonApiCustomApplicationSettingOutWithLinks + """ # noqa: E501 + attributes: JsonApiCustomApplicationSettingInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['customApplicationSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('customApplicationSetting')") + 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 JsonApiCustomApplicationSettingOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomApplicationSettingOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCustomApplicationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_patch.py new file mode 100644 index 000000000..ed7515079 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_custom_application_setting_patch_attributes import JsonApiCustomApplicationSettingPatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomApplicationSettingPatch(BaseModel): + """ + JSON:API representation of patching customApplicationSetting entity. + """ # noqa: E501 + attributes: JsonApiCustomApplicationSettingPatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['customApplicationSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('customApplicationSetting')") + 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 JsonApiCustomApplicationSettingPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomApplicationSettingPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCustomApplicationSettingPatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_patch_attributes.py new file mode 100644 index 000000000..74e279b34 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_patch_attributes.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomApplicationSettingPatchAttributes(BaseModel): + """ + JsonApiCustomApplicationSettingPatchAttributes + """ # noqa: E501 + application_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, alias="applicationName") + content: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON content. Maximum supported length is 250000 characters.") + __properties: ClassVar[List[str]] = ["applicationName", "content"] + + 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 JsonApiCustomApplicationSettingPatchAttributes 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 JsonApiCustomApplicationSettingPatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applicationName": obj.get("applicationName"), + "content": obj.get("content") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_patch_document.py new file mode 100644 index 000000000..4700c853f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_custom_application_setting_patch import JsonApiCustomApplicationSettingPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomApplicationSettingPatchDocument(BaseModel): + """ + JsonApiCustomApplicationSettingPatchDocument + """ # noqa: E501 + data: JsonApiCustomApplicationSettingPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiCustomApplicationSettingPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomApplicationSettingPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiCustomApplicationSettingPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_post_optional_id.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_post_optional_id.py new file mode 100644 index 000000000..296ea54f7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_post_optional_id.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_custom_application_setting_in_attributes import JsonApiCustomApplicationSettingInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomApplicationSettingPostOptionalId(BaseModel): + """ + JSON:API representation of customApplicationSetting entity. + """ # noqa: E501 + attributes: JsonApiCustomApplicationSettingInAttributes + id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @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"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['customApplicationSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('customApplicationSetting')") + 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 JsonApiCustomApplicationSettingPostOptionalId 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomApplicationSettingPostOptionalId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCustomApplicationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_post_optional_id_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_post_optional_id_document.py new file mode 100644 index 000000000..a2f5688ca --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_application_setting_post_optional_id_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_custom_application_setting_post_optional_id import JsonApiCustomApplicationSettingPostOptionalId +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomApplicationSettingPostOptionalIdDocument(BaseModel): + """ + JsonApiCustomApplicationSettingPostOptionalIdDocument + """ # noqa: E501 + data: JsonApiCustomApplicationSettingPostOptionalId + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiCustomApplicationSettingPostOptionalIdDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomApplicationSettingPostOptionalIdDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiCustomApplicationSettingPostOptionalId.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_in.py new file mode 100644 index 000000000..4c873b0fe --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_custom_geo_collection_in_attributes import JsonApiCustomGeoCollectionInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomGeoCollectionIn(BaseModel): + """ + JSON:API representation of customGeoCollection entity. + """ # noqa: E501 + attributes: Optional[JsonApiCustomGeoCollectionInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['customGeoCollection']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('customGeoCollection')") + 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 JsonApiCustomGeoCollectionIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomGeoCollectionIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCustomGeoCollectionInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_in_attributes.py new file mode 100644 index 000000000..53576c5fb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_in_attributes.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomGeoCollectionInAttributes(BaseModel): + """ + JsonApiCustomGeoCollectionInAttributes + """ # noqa: E501 + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["description", "name"] + + 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 JsonApiCustomGeoCollectionInAttributes 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 description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomGeoCollectionInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_in_document.py new file mode 100644 index 000000000..9fc793701 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_custom_geo_collection_in import JsonApiCustomGeoCollectionIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomGeoCollectionInDocument(BaseModel): + """ + JsonApiCustomGeoCollectionInDocument + """ # noqa: E501 + data: JsonApiCustomGeoCollectionIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiCustomGeoCollectionInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomGeoCollectionInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiCustomGeoCollectionIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out.py new file mode 100644 index 000000000..e589caffb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_custom_geo_collection_in_attributes import JsonApiCustomGeoCollectionInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomGeoCollectionOut(BaseModel): + """ + JSON:API representation of customGeoCollection entity. + """ # noqa: E501 + attributes: Optional[JsonApiCustomGeoCollectionInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['customGeoCollection']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('customGeoCollection')") + 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 JsonApiCustomGeoCollectionOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomGeoCollectionOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCustomGeoCollectionInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out_document.py new file mode 100644 index 000000000..53b1272f9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_custom_geo_collection_out import JsonApiCustomGeoCollectionOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomGeoCollectionOutDocument(BaseModel): + """ + JsonApiCustomGeoCollectionOutDocument + """ # noqa: E501 + data: JsonApiCustomGeoCollectionOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiCustomGeoCollectionOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomGeoCollectionOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiCustomGeoCollectionOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out_list.py new file mode 100644 index 000000000..99c973fa7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_custom_geo_collection_out_with_links import JsonApiCustomGeoCollectionOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomGeoCollectionOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiCustomGeoCollectionOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiCustomGeoCollectionOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomGeoCollectionOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiCustomGeoCollectionOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out_with_links.py new file mode 100644 index 000000000..9313572a0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_custom_geo_collection_in_attributes import JsonApiCustomGeoCollectionInAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomGeoCollectionOutWithLinks(BaseModel): + """ + JsonApiCustomGeoCollectionOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiCustomGeoCollectionInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['customGeoCollection']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('customGeoCollection')") + 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 JsonApiCustomGeoCollectionOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomGeoCollectionOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCustomGeoCollectionInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_patch.py new file mode 100644 index 000000000..2d635e318 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_custom_geo_collection_in_attributes import JsonApiCustomGeoCollectionInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomGeoCollectionPatch(BaseModel): + """ + JSON:API representation of patching customGeoCollection entity. + """ # noqa: E501 + attributes: Optional[JsonApiCustomGeoCollectionInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['customGeoCollection']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('customGeoCollection')") + 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 JsonApiCustomGeoCollectionPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomGeoCollectionPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiCustomGeoCollectionInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_patch_document.py new file mode 100644 index 000000000..b06d067b9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_custom_geo_collection_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_custom_geo_collection_patch import JsonApiCustomGeoCollectionPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiCustomGeoCollectionPatchDocument(BaseModel): + """ + JsonApiCustomGeoCollectionPatchDocument + """ # noqa: E501 + data: JsonApiCustomGeoCollectionPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiCustomGeoCollectionPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiCustomGeoCollectionPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiCustomGeoCollectionPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_in.py new file mode 100644 index 000000000..e60f8cb29 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_dashboard_plugin_in_attributes import JsonApiDashboardPluginInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDashboardPluginIn(BaseModel): + """ + JSON:API representation of dashboardPlugin entity. + """ # noqa: E501 + attributes: Optional[JsonApiDashboardPluginInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dashboardPlugin']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dashboardPlugin')") + 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 JsonApiDashboardPluginIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDashboardPluginIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiDashboardPluginInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_in_attributes.py new file mode 100644 index 000000000..be01a93dc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_in_attributes.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDashboardPluginInAttributes(BaseModel): + """ + JsonApiDashboardPluginInAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + content: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON content. Maximum supported length is 250000 characters.") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "content", "description", "tags", "title"] + + 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 JsonApiDashboardPluginInAttributes 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 JsonApiDashboardPluginInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "content": obj.get("content"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_in_document.py new file mode 100644 index 000000000..b2cae9d98 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_dashboard_plugin_in import JsonApiDashboardPluginIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDashboardPluginInDocument(BaseModel): + """ + JsonApiDashboardPluginInDocument + """ # noqa: E501 + data: JsonApiDashboardPluginIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiDashboardPluginInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDashboardPluginInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiDashboardPluginIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_linkage.py new file mode 100644 index 000000000..7dd299b26 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiDashboardPluginLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dashboardPlugin']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dashboardPlugin')") + 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 JsonApiDashboardPluginLinkage 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 JsonApiDashboardPluginLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out.py new file mode 100644 index 000000000..02003582b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_dashboard_plugin_out_attributes import JsonApiDashboardPluginOutAttributes +from gooddata_api_client.models.json_api_dashboard_plugin_out_relationships import JsonApiDashboardPluginOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDashboardPluginOut(BaseModel): + """ + JSON:API representation of dashboardPlugin entity. + """ # noqa: E501 + attributes: Optional[JsonApiDashboardPluginOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiDashboardPluginOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dashboardPlugin']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dashboardPlugin')") + 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 JsonApiDashboardPluginOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDashboardPluginOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiDashboardPluginOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiDashboardPluginOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_attributes.py new file mode 100644 index 000000000..c6c497023 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_attributes.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, 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 JsonApiDashboardPluginOutAttributes(BaseModel): + """ + JsonApiDashboardPluginOutAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + content: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON content. Maximum supported length is 250000 characters.") + created_at: Optional[datetime] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + modified_at: Optional[datetime] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "content", "createdAt", "description", "modifiedAt", "tags", "title"] + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + 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 JsonApiDashboardPluginOutAttributes 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 created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDashboardPluginOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "content": obj.get("content"), + "createdAt": obj.get("createdAt"), + "description": obj.get("description"), + "modifiedAt": obj.get("modifiedAt"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_document.py new file mode 100644 index 000000000..a774cffdd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_dashboard_plugin_out import JsonApiDashboardPluginOut +from gooddata_api_client.models.json_api_user_identifier_out_with_links import JsonApiUserIdentifierOutWithLinks +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDashboardPluginOutDocument(BaseModel): + """ + JsonApiDashboardPluginOutDocument + """ # noqa: E501 + data: JsonApiDashboardPluginOut + included: Optional[List[JsonApiUserIdentifierOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiDashboardPluginOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDashboardPluginOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiDashboardPluginOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiUserIdentifierOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_list.py new file mode 100644 index 000000000..d106eecf4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_dashboard_plugin_out_with_links import JsonApiDashboardPluginOutWithLinks +from gooddata_api_client.models.json_api_user_identifier_out_with_links import JsonApiUserIdentifierOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDashboardPluginOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiDashboardPluginOutWithLinks] + included: Optional[List[JsonApiUserIdentifierOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiDashboardPluginOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDashboardPluginOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiDashboardPluginOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiUserIdentifierOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_relationships.py new file mode 100644 index 000000000..cbaf6f0b5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_relationships.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_certified_by import JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDashboardPluginOutRelationships(BaseModel): + """ + JsonApiDashboardPluginOutRelationships + """ # noqa: E501 + created_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="createdBy") + modified_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="modifiedBy") + __properties: ClassVar[List[str]] = ["createdBy", "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 JsonApiDashboardPluginOutRelationships 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 created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDashboardPluginOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "modifiedBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_with_links.py new file mode 100644 index 000000000..0264145ac --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_dashboard_plugin_out_attributes import JsonApiDashboardPluginOutAttributes +from gooddata_api_client.models.json_api_dashboard_plugin_out_relationships import JsonApiDashboardPluginOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDashboardPluginOutWithLinks(BaseModel): + """ + JsonApiDashboardPluginOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiDashboardPluginOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiDashboardPluginOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dashboardPlugin']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dashboardPlugin')") + 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 JsonApiDashboardPluginOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDashboardPluginOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiDashboardPluginOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiDashboardPluginOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_patch.py new file mode 100644 index 000000000..9f26ecba6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_dashboard_plugin_in_attributes import JsonApiDashboardPluginInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDashboardPluginPatch(BaseModel): + """ + JSON:API representation of patching dashboardPlugin entity. + """ # noqa: E501 + attributes: Optional[JsonApiDashboardPluginInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dashboardPlugin']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dashboardPlugin')") + 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 JsonApiDashboardPluginPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDashboardPluginPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiDashboardPluginInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_patch_document.py new file mode 100644 index 000000000..896a184b7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_dashboard_plugin_patch import JsonApiDashboardPluginPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDashboardPluginPatchDocument(BaseModel): + """ + JsonApiDashboardPluginPatchDocument + """ # noqa: E501 + data: JsonApiDashboardPluginPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiDashboardPluginPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDashboardPluginPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiDashboardPluginPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_post_optional_id.py b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_post_optional_id.py new file mode 100644 index 000000000..a344265e4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_post_optional_id.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_dashboard_plugin_in_attributes import JsonApiDashboardPluginInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDashboardPluginPostOptionalId(BaseModel): + """ + JSON:API representation of dashboardPlugin entity. + """ # noqa: E501 + attributes: Optional[JsonApiDashboardPluginInAttributes] = None + id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @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"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dashboardPlugin']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dashboardPlugin')") + 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 JsonApiDashboardPluginPostOptionalId 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDashboardPluginPostOptionalId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiDashboardPluginInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_post_optional_id_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_post_optional_id_document.py new file mode 100644 index 000000000..ad18721cf --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dashboard_plugin_post_optional_id_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_dashboard_plugin_post_optional_id import JsonApiDashboardPluginPostOptionalId +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDashboardPluginPostOptionalIdDocument(BaseModel): + """ + JsonApiDashboardPluginPostOptionalIdDocument + """ # noqa: E501 + data: JsonApiDashboardPluginPostOptionalId + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiDashboardPluginPostOptionalIdDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDashboardPluginPostOptionalIdDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiDashboardPluginPostOptionalId.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out.py new file mode 100644 index 000000000..d3497bb27 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_data_source_identifier_out_attributes import JsonApiDataSourceIdentifierOutAttributes +from gooddata_api_client.models.json_api_data_source_identifier_out_meta import JsonApiDataSourceIdentifierOutMeta +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourceIdentifierOut(BaseModel): + """ + JSON:API representation of dataSourceIdentifier entity. + """ # noqa: E501 + attributes: JsonApiDataSourceIdentifierOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiDataSourceIdentifierOutMeta] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dataSourceIdentifier']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dataSourceIdentifier')") + 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 JsonApiDataSourceIdentifierOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDataSourceIdentifierOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiDataSourceIdentifierOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiDataSourceIdentifierOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_attributes.py new file mode 100644 index 000000000..1de9bca59 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_attributes.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourceIdentifierOutAttributes(BaseModel): + """ + JsonApiDataSourceIdentifierOutAttributes + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=255)] + var_schema: Annotated[str, Field(strict=True, max_length=255)] = Field(alias="schema") + type: StrictStr + __properties: ClassVar[List[str]] = ["name", "schema", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['POSTGRESQL', 'REDSHIFT', 'VERTICA', 'SNOWFLAKE', 'ADS', 'BIGQUERY', 'MSSQL', 'PRESTO', 'DREMIO', 'DRILL', 'GREENPLUM', 'AZURESQL', 'SYNAPSESQL', 'DATABRICKS', 'GDSTORAGE', 'CLICKHOUSE', 'MYSQL', 'MARIADB', 'ORACLE', 'PINOT', 'SINGLESTORE', 'MOTHERDUCK', 'FLEXCONNECT', 'STARROCKS', 'ATHENA', 'MONGODB', 'CRATEDB', 'AILAKEHOUSE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('POSTGRESQL', 'REDSHIFT', 'VERTICA', 'SNOWFLAKE', 'ADS', 'BIGQUERY', 'MSSQL', 'PRESTO', 'DREMIO', 'DRILL', 'GREENPLUM', 'AZURESQL', 'SYNAPSESQL', 'DATABRICKS', 'GDSTORAGE', 'CLICKHOUSE', 'MYSQL', 'MARIADB', 'ORACLE', 'PINOT', 'SINGLESTORE', 'MOTHERDUCK', 'FLEXCONNECT', 'STARROCKS', 'ATHENA', 'MONGODB', 'CRATEDB', 'AILAKEHOUSE')") + 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 JsonApiDataSourceIdentifierOutAttributes 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 JsonApiDataSourceIdentifierOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "schema": obj.get("schema"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_document.py new file mode 100644 index 000000000..29991b064 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_data_source_identifier_out import JsonApiDataSourceIdentifierOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourceIdentifierOutDocument(BaseModel): + """ + JsonApiDataSourceIdentifierOutDocument + """ # noqa: E501 + data: JsonApiDataSourceIdentifierOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiDataSourceIdentifierOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDataSourceIdentifierOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiDataSourceIdentifierOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_list.py new file mode 100644 index 000000000..a83719a4f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_data_source_identifier_out_with_links import JsonApiDataSourceIdentifierOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourceIdentifierOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiDataSourceIdentifierOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiDataSourceIdentifierOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDataSourceIdentifierOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiDataSourceIdentifierOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_meta.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_meta.py new file mode 100644 index 000000000..afd74565e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_meta.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourceIdentifierOutMeta(BaseModel): + """ + JsonApiDataSourceIdentifierOutMeta + """ # noqa: E501 + permissions: Optional[List[StrictStr]] = Field(default=None, description="List of valid permissions for a logged-in user.") + __properties: ClassVar[List[str]] = ["permissions"] + + @field_validator('permissions') + def permissions_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['MANAGE', 'USE']): + raise ValueError("each list item must be one of ('MANAGE', 'USE')") + 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 JsonApiDataSourceIdentifierOutMeta 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 JsonApiDataSourceIdentifierOutMeta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "permissions": obj.get("permissions") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_with_links.py new file mode 100644 index 000000000..4eb1b7ee1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_identifier_out_with_links.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_data_source_identifier_out_attributes import JsonApiDataSourceIdentifierOutAttributes +from gooddata_api_client.models.json_api_data_source_identifier_out_meta import JsonApiDataSourceIdentifierOutMeta +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourceIdentifierOutWithLinks(BaseModel): + """ + JsonApiDataSourceIdentifierOutWithLinks + """ # noqa: E501 + attributes: JsonApiDataSourceIdentifierOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiDataSourceIdentifierOutMeta] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dataSourceIdentifier']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dataSourceIdentifier')") + 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 JsonApiDataSourceIdentifierOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDataSourceIdentifierOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiDataSourceIdentifierOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiDataSourceIdentifierOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_in.py new file mode 100644 index 000000000..df90429ad --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_data_source_in_attributes import JsonApiDataSourceInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourceIn(BaseModel): + """ + JSON:API representation of dataSource entity. + """ # noqa: E501 + attributes: JsonApiDataSourceInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dataSource']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dataSource')") + 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 JsonApiDataSourceIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDataSourceIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiDataSourceInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_in_attributes.py new file mode 100644 index 000000000..2c7b7ea33 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_in_attributes.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_data_source_in_attributes_parameters_inner import JsonApiDataSourceInAttributesParametersInner +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourceInAttributes(BaseModel): + """ + JsonApiDataSourceInAttributes + """ # noqa: E501 + alternative_data_source_id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Alternative data source ID. It is a weak reference meaning data source does not have to exist. All the entities (e.g. tables) from the data source must be available also in the alternative data source. It must be present in the same organization as the data source.", alias="alternativeDataSourceId") + cache_strategy: Optional[StrictStr] = Field(default=None, description="Determines how the results coming from a particular datasource should be cached.", alias="cacheStrategy") + client_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The client id to use to connect to the database providing the data for the data source (for example a Databricks Service Account).", alias="clientId") + client_secret: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The client secret to use to connect to the database providing the data for the data source (for example a Databricks Service Account).", alias="clientSecret") + name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="User-facing name of the data source.") + parameters: Optional[List[JsonApiDataSourceInAttributesParametersInner]] = Field(default=None, description="Additional parameters to be used when connecting to the database providing the data for the data source.") + password: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The password to use to connect to the database providing the data for the data source.") + private_key: Optional[Annotated[str, Field(strict=True, max_length=15000)]] = Field(default=None, description="The private key to use to connect to the database providing the data for the data source.", alias="privateKey") + private_key_passphrase: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The passphrase used to encrypt the private key.", alias="privateKeyPassphrase") + var_schema: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The schema to use as the root of the data for the data source.", alias="schema") + token: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="The token to use to connect to the database providing the data for the data source (for example a BigQuery Service Account).") + type: StrictStr = Field(description="Type of the database providing the data for the data source.") + url: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The URL of the database providing the data for the data source.") + username: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The username to use to connect to the database providing the data for the data source.") + __properties: ClassVar[List[str]] = ["alternativeDataSourceId", "cacheStrategy", "clientId", "clientSecret", "name", "parameters", "password", "privateKey", "privateKeyPassphrase", "schema", "token", "type", "url", "username"] + + @field_validator('alternative_data_source_id') + def alternative_data_source_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('cache_strategy') + def cache_strategy_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ALWAYS', 'NEVER']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ALWAYS', 'NEVER')") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['POSTGRESQL', 'REDSHIFT', 'VERTICA', 'SNOWFLAKE', 'ADS', 'BIGQUERY', 'MSSQL', 'PRESTO', 'DREMIO', 'DRILL', 'GREENPLUM', 'AZURESQL', 'SYNAPSESQL', 'DATABRICKS', 'GDSTORAGE', 'CLICKHOUSE', 'MYSQL', 'MARIADB', 'ORACLE', 'PINOT', 'SINGLESTORE', 'MOTHERDUCK', 'FLEXCONNECT', 'STARROCKS', 'ATHENA', 'MONGODB', 'CRATEDB', 'AILAKEHOUSE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('POSTGRESQL', 'REDSHIFT', 'VERTICA', 'SNOWFLAKE', 'ADS', 'BIGQUERY', 'MSSQL', 'PRESTO', 'DREMIO', 'DRILL', 'GREENPLUM', 'AZURESQL', 'SYNAPSESQL', 'DATABRICKS', 'GDSTORAGE', 'CLICKHOUSE', 'MYSQL', 'MARIADB', 'ORACLE', 'PINOT', 'SINGLESTORE', 'MOTHERDUCK', 'FLEXCONNECT', 'STARROCKS', 'ATHENA', 'MONGODB', 'CRATEDB', 'AILAKEHOUSE')") + 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 JsonApiDataSourceInAttributes 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 each item in parameters (list) + _items = [] + if self.parameters: + for _item_parameters in self.parameters: + if _item_parameters: + _items.append(_item_parameters.to_dict()) + _dict['parameters'] = _items + # set to None if alternative_data_source_id (nullable) is None + # and model_fields_set contains the field + if self.alternative_data_source_id is None and "alternative_data_source_id" in self.model_fields_set: + _dict['alternativeDataSourceId'] = None + + # set to None if cache_strategy (nullable) is None + # and model_fields_set contains the field + if self.cache_strategy is None and "cache_strategy" in self.model_fields_set: + _dict['cacheStrategy'] = None + + # set to None if client_id (nullable) is None + # and model_fields_set contains the field + if self.client_id is None and "client_id" in self.model_fields_set: + _dict['clientId'] = None + + # set to None if client_secret (nullable) is None + # and model_fields_set contains the field + if self.client_secret is None and "client_secret" in self.model_fields_set: + _dict['clientSecret'] = None + + # set to None if parameters (nullable) is None + # and model_fields_set contains the field + if self.parameters is None and "parameters" in self.model_fields_set: + _dict['parameters'] = None + + # set to None if password (nullable) is None + # and model_fields_set contains the field + if self.password is None and "password" in self.model_fields_set: + _dict['password'] = None + + # set to None if private_key (nullable) is None + # and model_fields_set contains the field + if self.private_key is None and "private_key" in self.model_fields_set: + _dict['privateKey'] = None + + # set to None if private_key_passphrase (nullable) is None + # and model_fields_set contains the field + if self.private_key_passphrase is None and "private_key_passphrase" in self.model_fields_set: + _dict['privateKeyPassphrase'] = None + + # set to None if token (nullable) is None + # and model_fields_set contains the field + if self.token is None and "token" in self.model_fields_set: + _dict['token'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDataSourceInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alternativeDataSourceId": obj.get("alternativeDataSourceId"), + "cacheStrategy": obj.get("cacheStrategy"), + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret"), + "name": obj.get("name"), + "parameters": [JsonApiDataSourceInAttributesParametersInner.from_dict(_item) for _item in obj["parameters"]] if obj.get("parameters") is not None else None, + "password": obj.get("password"), + "privateKey": obj.get("privateKey"), + "privateKeyPassphrase": obj.get("privateKeyPassphrase"), + "schema": obj.get("schema"), + "token": obj.get("token"), + "type": obj.get("type"), + "url": obj.get("url"), + "username": obj.get("username") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_in_attributes_parameters_inner.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_in_attributes_parameters_inner.py new file mode 100644 index 000000000..d0bd7f856 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_in_attributes_parameters_inner.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourceInAttributesParametersInner(BaseModel): + """ + JsonApiDataSourceInAttributesParametersInner + """ # noqa: E501 + name: StrictStr + value: StrictStr + __properties: ClassVar[List[str]] = ["name", "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 JsonApiDataSourceInAttributesParametersInner 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 JsonApiDataSourceInAttributesParametersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "value": obj.get("value") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_in_document.py new file mode 100644 index 000000000..54341a0da --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_data_source_in import JsonApiDataSourceIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourceInDocument(BaseModel): + """ + JsonApiDataSourceInDocument + """ # noqa: E501 + data: JsonApiDataSourceIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiDataSourceInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDataSourceInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiDataSourceIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_out.py new file mode 100644 index 000000000..06b2fe064 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_out.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_data_source_identifier_out_meta import JsonApiDataSourceIdentifierOutMeta +from gooddata_api_client.models.json_api_data_source_out_attributes import JsonApiDataSourceOutAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourceOut(BaseModel): + """ + JSON:API representation of dataSource entity. + """ # noqa: E501 + attributes: JsonApiDataSourceOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiDataSourceIdentifierOutMeta] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dataSource']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dataSource')") + 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 JsonApiDataSourceOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDataSourceOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiDataSourceOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiDataSourceIdentifierOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_attributes.py new file mode 100644 index 000000000..ba592059b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_attributes.py @@ -0,0 +1,204 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_data_source_in_attributes_parameters_inner import JsonApiDataSourceInAttributesParametersInner +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourceOutAttributes(BaseModel): + """ + JsonApiDataSourceOutAttributes + """ # noqa: E501 + alternative_data_source_id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Alternative data source ID. It is a weak reference meaning data source does not have to exist. All the entities (e.g. tables) from the data source must be available also in the alternative data source. It must be present in the same organization as the data source.", alias="alternativeDataSourceId") + authentication_type: Optional[StrictStr] = Field(default=None, description="Type of authentication used to connect to the database.", alias="authenticationType") + cache_strategy: Optional[StrictStr] = Field(default=None, description="Determines how the results coming from a particular datasource should be cached.", alias="cacheStrategy") + client_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The client id to use to connect to the database providing the data for the data source (for example a Databricks Service Account).", alias="clientId") + decoded_parameters: Optional[List[JsonApiDataSourceInAttributesParametersInner]] = Field(default=None, description="Decoded parameters to be used when connecting to the database providing the data for the data source.", alias="decodedParameters") + name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="User-facing name of the data source.") + parameters: Optional[List[JsonApiDataSourceInAttributesParametersInner]] = Field(default=None, description="Additional parameters to be used when connecting to the database providing the data for the data source.") + var_schema: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The schema to use as the root of the data for the data source.", alias="schema") + type: StrictStr = Field(description="Type of the database providing the data for the data source.") + url: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The URL of the database providing the data for the data source.") + username: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The username to use to connect to the database providing the data for the data source.") + __properties: ClassVar[List[str]] = ["alternativeDataSourceId", "authenticationType", "cacheStrategy", "clientId", "decodedParameters", "name", "parameters", "schema", "type", "url", "username"] + + @field_validator('alternative_data_source_id') + def alternative_data_source_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('authentication_type') + def authentication_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['USERNAME_PASSWORD', 'TOKEN', 'KEY_PAIR', 'CLIENT_SECRET', 'ACCESS_TOKEN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('USERNAME_PASSWORD', 'TOKEN', 'KEY_PAIR', 'CLIENT_SECRET', 'ACCESS_TOKEN')") + return value + + @field_validator('cache_strategy') + def cache_strategy_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ALWAYS', 'NEVER']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ALWAYS', 'NEVER')") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['POSTGRESQL', 'REDSHIFT', 'VERTICA', 'SNOWFLAKE', 'ADS', 'BIGQUERY', 'MSSQL', 'PRESTO', 'DREMIO', 'DRILL', 'GREENPLUM', 'AZURESQL', 'SYNAPSESQL', 'DATABRICKS', 'GDSTORAGE', 'CLICKHOUSE', 'MYSQL', 'MARIADB', 'ORACLE', 'PINOT', 'SINGLESTORE', 'MOTHERDUCK', 'FLEXCONNECT', 'STARROCKS', 'ATHENA', 'MONGODB', 'CRATEDB', 'AILAKEHOUSE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('POSTGRESQL', 'REDSHIFT', 'VERTICA', 'SNOWFLAKE', 'ADS', 'BIGQUERY', 'MSSQL', 'PRESTO', 'DREMIO', 'DRILL', 'GREENPLUM', 'AZURESQL', 'SYNAPSESQL', 'DATABRICKS', 'GDSTORAGE', 'CLICKHOUSE', 'MYSQL', 'MARIADB', 'ORACLE', 'PINOT', 'SINGLESTORE', 'MOTHERDUCK', 'FLEXCONNECT', 'STARROCKS', 'ATHENA', 'MONGODB', 'CRATEDB', 'AILAKEHOUSE')") + 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 JsonApiDataSourceOutAttributes 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 each item in decoded_parameters (list) + _items = [] + if self.decoded_parameters: + for _item_decoded_parameters in self.decoded_parameters: + if _item_decoded_parameters: + _items.append(_item_decoded_parameters.to_dict()) + _dict['decodedParameters'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in parameters (list) + _items = [] + if self.parameters: + for _item_parameters in self.parameters: + if _item_parameters: + _items.append(_item_parameters.to_dict()) + _dict['parameters'] = _items + # set to None if alternative_data_source_id (nullable) is None + # and model_fields_set contains the field + if self.alternative_data_source_id is None and "alternative_data_source_id" in self.model_fields_set: + _dict['alternativeDataSourceId'] = None + + # set to None if authentication_type (nullable) is None + # and model_fields_set contains the field + if self.authentication_type is None and "authentication_type" in self.model_fields_set: + _dict['authenticationType'] = None + + # set to None if cache_strategy (nullable) is None + # and model_fields_set contains the field + if self.cache_strategy is None and "cache_strategy" in self.model_fields_set: + _dict['cacheStrategy'] = None + + # set to None if client_id (nullable) is None + # and model_fields_set contains the field + if self.client_id is None and "client_id" in self.model_fields_set: + _dict['clientId'] = None + + # set to None if decoded_parameters (nullable) is None + # and model_fields_set contains the field + if self.decoded_parameters is None and "decoded_parameters" in self.model_fields_set: + _dict['decodedParameters'] = None + + # set to None if parameters (nullable) is None + # and model_fields_set contains the field + if self.parameters is None and "parameters" in self.model_fields_set: + _dict['parameters'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDataSourceOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alternativeDataSourceId": obj.get("alternativeDataSourceId"), + "authenticationType": obj.get("authenticationType"), + "cacheStrategy": obj.get("cacheStrategy"), + "clientId": obj.get("clientId"), + "decodedParameters": [JsonApiDataSourceInAttributesParametersInner.from_dict(_item) for _item in obj["decodedParameters"]] if obj.get("decodedParameters") is not None else None, + "name": obj.get("name"), + "parameters": [JsonApiDataSourceInAttributesParametersInner.from_dict(_item) for _item in obj["parameters"]] if obj.get("parameters") is not None else None, + "schema": obj.get("schema"), + "type": obj.get("type"), + "url": obj.get("url"), + "username": obj.get("username") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_document.py new file mode 100644 index 000000000..8f3888f55 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_data_source_out import JsonApiDataSourceOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourceOutDocument(BaseModel): + """ + JsonApiDataSourceOutDocument + """ # noqa: E501 + data: JsonApiDataSourceOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiDataSourceOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDataSourceOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiDataSourceOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_list.py new file mode 100644 index 000000000..facf8b513 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_data_source_out_with_links import JsonApiDataSourceOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourceOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiDataSourceOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiDataSourceOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDataSourceOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiDataSourceOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_with_links.py new file mode 100644 index 000000000..467972173 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_out_with_links.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_data_source_identifier_out_meta import JsonApiDataSourceIdentifierOutMeta +from gooddata_api_client.models.json_api_data_source_out_attributes import JsonApiDataSourceOutAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourceOutWithLinks(BaseModel): + """ + JsonApiDataSourceOutWithLinks + """ # noqa: E501 + attributes: JsonApiDataSourceOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiDataSourceIdentifierOutMeta] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dataSource']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dataSource')") + 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 JsonApiDataSourceOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDataSourceOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiDataSourceOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiDataSourceIdentifierOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_patch.py new file mode 100644 index 000000000..7a988effc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_data_source_patch_attributes import JsonApiDataSourcePatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourcePatch(BaseModel): + """ + JSON:API representation of patching dataSource entity. + """ # noqa: E501 + attributes: JsonApiDataSourcePatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dataSource']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dataSource')") + 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 JsonApiDataSourcePatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDataSourcePatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiDataSourcePatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_patch_attributes.py new file mode 100644 index 000000000..dbc44bc6f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_patch_attributes.py @@ -0,0 +1,210 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_data_source_in_attributes_parameters_inner import JsonApiDataSourceInAttributesParametersInner +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourcePatchAttributes(BaseModel): + """ + JsonApiDataSourcePatchAttributes + """ # noqa: E501 + alternative_data_source_id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Alternative data source ID. It is a weak reference meaning data source does not have to exist. All the entities (e.g. tables) from the data source must be available also in the alternative data source. It must be present in the same organization as the data source.", alias="alternativeDataSourceId") + cache_strategy: Optional[StrictStr] = Field(default=None, description="Determines how the results coming from a particular datasource should be cached.", alias="cacheStrategy") + client_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The client id to use to connect to the database providing the data for the data source (for example a Databricks Service Account).", alias="clientId") + client_secret: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The client secret to use to connect to the database providing the data for the data source (for example a Databricks Service Account).", alias="clientSecret") + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="User-facing name of the data source.") + parameters: Optional[List[JsonApiDataSourceInAttributesParametersInner]] = Field(default=None, description="Additional parameters to be used when connecting to the database providing the data for the data source.") + password: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The password to use to connect to the database providing the data for the data source.") + private_key: Optional[Annotated[str, Field(strict=True, max_length=15000)]] = Field(default=None, description="The private key to use to connect to the database providing the data for the data source.", alias="privateKey") + private_key_passphrase: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The passphrase used to encrypt the private key.", alias="privateKeyPassphrase") + var_schema: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The schema to use as the root of the data for the data source.", alias="schema") + token: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="The token to use to connect to the database providing the data for the data source (for example a BigQuery Service Account).") + type: Optional[StrictStr] = Field(default=None, description="Type of the database providing the data for the data source.") + url: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The URL of the database providing the data for the data source.") + username: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The username to use to connect to the database providing the data for the data source.") + __properties: ClassVar[List[str]] = ["alternativeDataSourceId", "cacheStrategy", "clientId", "clientSecret", "name", "parameters", "password", "privateKey", "privateKeyPassphrase", "schema", "token", "type", "url", "username"] + + @field_validator('alternative_data_source_id') + def alternative_data_source_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('cache_strategy') + def cache_strategy_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ALWAYS', 'NEVER']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ALWAYS', 'NEVER')") + 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(['POSTGRESQL', 'REDSHIFT', 'VERTICA', 'SNOWFLAKE', 'ADS', 'BIGQUERY', 'MSSQL', 'PRESTO', 'DREMIO', 'DRILL', 'GREENPLUM', 'AZURESQL', 'SYNAPSESQL', 'DATABRICKS', 'GDSTORAGE', 'CLICKHOUSE', 'MYSQL', 'MARIADB', 'ORACLE', 'PINOT', 'SINGLESTORE', 'MOTHERDUCK', 'FLEXCONNECT', 'STARROCKS', 'ATHENA', 'MONGODB', 'CRATEDB', 'AILAKEHOUSE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('POSTGRESQL', 'REDSHIFT', 'VERTICA', 'SNOWFLAKE', 'ADS', 'BIGQUERY', 'MSSQL', 'PRESTO', 'DREMIO', 'DRILL', 'GREENPLUM', 'AZURESQL', 'SYNAPSESQL', 'DATABRICKS', 'GDSTORAGE', 'CLICKHOUSE', 'MYSQL', 'MARIADB', 'ORACLE', 'PINOT', 'SINGLESTORE', 'MOTHERDUCK', 'FLEXCONNECT', 'STARROCKS', 'ATHENA', 'MONGODB', 'CRATEDB', 'AILAKEHOUSE')") + 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 JsonApiDataSourcePatchAttributes 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 each item in parameters (list) + _items = [] + if self.parameters: + for _item_parameters in self.parameters: + if _item_parameters: + _items.append(_item_parameters.to_dict()) + _dict['parameters'] = _items + # set to None if alternative_data_source_id (nullable) is None + # and model_fields_set contains the field + if self.alternative_data_source_id is None and "alternative_data_source_id" in self.model_fields_set: + _dict['alternativeDataSourceId'] = None + + # set to None if cache_strategy (nullable) is None + # and model_fields_set contains the field + if self.cache_strategy is None and "cache_strategy" in self.model_fields_set: + _dict['cacheStrategy'] = None + + # set to None if client_id (nullable) is None + # and model_fields_set contains the field + if self.client_id is None and "client_id" in self.model_fields_set: + _dict['clientId'] = None + + # set to None if client_secret (nullable) is None + # and model_fields_set contains the field + if self.client_secret is None and "client_secret" in self.model_fields_set: + _dict['clientSecret'] = None + + # set to None if parameters (nullable) is None + # and model_fields_set contains the field + if self.parameters is None and "parameters" in self.model_fields_set: + _dict['parameters'] = None + + # set to None if password (nullable) is None + # and model_fields_set contains the field + if self.password is None and "password" in self.model_fields_set: + _dict['password'] = None + + # set to None if private_key (nullable) is None + # and model_fields_set contains the field + if self.private_key is None and "private_key" in self.model_fields_set: + _dict['privateKey'] = None + + # set to None if private_key_passphrase (nullable) is None + # and model_fields_set contains the field + if self.private_key_passphrase is None and "private_key_passphrase" in self.model_fields_set: + _dict['privateKeyPassphrase'] = None + + # set to None if token (nullable) is None + # and model_fields_set contains the field + if self.token is None and "token" in self.model_fields_set: + _dict['token'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDataSourcePatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alternativeDataSourceId": obj.get("alternativeDataSourceId"), + "cacheStrategy": obj.get("cacheStrategy"), + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret"), + "name": obj.get("name"), + "parameters": [JsonApiDataSourceInAttributesParametersInner.from_dict(_item) for _item in obj["parameters"]] if obj.get("parameters") is not None else None, + "password": obj.get("password"), + "privateKey": obj.get("privateKey"), + "privateKeyPassphrase": obj.get("privateKeyPassphrase"), + "schema": obj.get("schema"), + "token": obj.get("token"), + "type": obj.get("type"), + "url": obj.get("url"), + "username": obj.get("username") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_data_source_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_patch_document.py new file mode 100644 index 000000000..9e234fed3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_data_source_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_data_source_patch import JsonApiDataSourcePatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDataSourcePatchDocument(BaseModel): + """ + JsonApiDataSourcePatchDocument + """ # noqa: E501 + data: JsonApiDataSourcePatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiDataSourcePatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDataSourcePatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiDataSourcePatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_linkage.py new file mode 100644 index 000000000..e8d459f1a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiDatasetLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dataset']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dataset')") + 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 JsonApiDatasetLinkage 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 JsonApiDatasetLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out.py new file mode 100644 index 000000000..2d9419fb2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_dataset_out_attributes import JsonApiDatasetOutAttributes +from gooddata_api_client.models.json_api_dataset_out_relationships import JsonApiDatasetOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDatasetOut(BaseModel): + """ + JSON:API representation of dataset entity. + """ # noqa: E501 + attributes: JsonApiDatasetOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiDatasetOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dataset']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dataset')") + 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 JsonApiDatasetOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDatasetOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiDatasetOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiDatasetOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes.py new file mode 100644 index 000000000..a64642ecb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_dataset_out_attributes_grain_inner import JsonApiDatasetOutAttributesGrainInner +from gooddata_api_client.models.json_api_dataset_out_attributes_reference_properties_inner import JsonApiDatasetOutAttributesReferencePropertiesInner +from gooddata_api_client.models.json_api_dataset_out_attributes_sql import JsonApiDatasetOutAttributesSql +from gooddata_api_client.models.json_api_dataset_out_attributes_workspace_data_filter_columns_inner import JsonApiDatasetOutAttributesWorkspaceDataFilterColumnsInner +from gooddata_api_client.models.json_api_dataset_out_attributes_workspace_data_filter_references_inner import JsonApiDatasetOutAttributesWorkspaceDataFilterReferencesInner +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDatasetOutAttributes(BaseModel): + """ + JsonApiDatasetOutAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + data_source_table_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, alias="dataSourceTableId") + data_source_table_path: Optional[List[Annotated[str, Field(strict=True, max_length=255)]]] = Field(default=None, description="Path to database table.", alias="dataSourceTablePath") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + grain: Optional[List[JsonApiDatasetOutAttributesGrainInner]] = None + precedence: Optional[StrictInt] = None + reference_properties: Optional[List[JsonApiDatasetOutAttributesReferencePropertiesInner]] = Field(default=None, alias="referenceProperties") + sql: Optional[JsonApiDatasetOutAttributesSql] = None + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + type: StrictStr + workspace_data_filter_columns: Optional[List[JsonApiDatasetOutAttributesWorkspaceDataFilterColumnsInner]] = Field(default=None, alias="workspaceDataFilterColumns") + workspace_data_filter_references: Optional[List[JsonApiDatasetOutAttributesWorkspaceDataFilterReferencesInner]] = Field(default=None, alias="workspaceDataFilterReferences") + __properties: ClassVar[List[str]] = ["areRelationsValid", "dataSourceTableId", "dataSourceTablePath", "description", "grain", "precedence", "referenceProperties", "sql", "tags", "title", "type", "workspaceDataFilterColumns", "workspaceDataFilterReferences"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['NORMAL', 'DATE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('NORMAL', 'DATE')") + 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 JsonApiDatasetOutAttributes 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 each item in grain (list) + _items = [] + if self.grain: + for _item_grain in self.grain: + if _item_grain: + _items.append(_item_grain.to_dict()) + _dict['grain'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in reference_properties (list) + _items = [] + if self.reference_properties: + for _item_reference_properties in self.reference_properties: + if _item_reference_properties: + _items.append(_item_reference_properties.to_dict()) + _dict['referenceProperties'] = _items + # override the default output from pydantic by calling `to_dict()` of sql + if self.sql: + _dict['sql'] = self.sql.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in workspace_data_filter_columns (list) + _items = [] + if self.workspace_data_filter_columns: + for _item_workspace_data_filter_columns in self.workspace_data_filter_columns: + if _item_workspace_data_filter_columns: + _items.append(_item_workspace_data_filter_columns.to_dict()) + _dict['workspaceDataFilterColumns'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in workspace_data_filter_references (list) + _items = [] + if self.workspace_data_filter_references: + for _item_workspace_data_filter_references in self.workspace_data_filter_references: + if _item_workspace_data_filter_references: + _items.append(_item_workspace_data_filter_references.to_dict()) + _dict['workspaceDataFilterReferences'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDatasetOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "dataSourceTableId": obj.get("dataSourceTableId"), + "dataSourceTablePath": obj.get("dataSourceTablePath"), + "description": obj.get("description"), + "grain": [JsonApiDatasetOutAttributesGrainInner.from_dict(_item) for _item in obj["grain"]] if obj.get("grain") is not None else None, + "precedence": obj.get("precedence"), + "referenceProperties": [JsonApiDatasetOutAttributesReferencePropertiesInner.from_dict(_item) for _item in obj["referenceProperties"]] if obj.get("referenceProperties") is not None else None, + "sql": JsonApiDatasetOutAttributesSql.from_dict(obj["sql"]) if obj.get("sql") is not None else None, + "tags": obj.get("tags"), + "title": obj.get("title"), + "type": obj.get("type"), + "workspaceDataFilterColumns": [JsonApiDatasetOutAttributesWorkspaceDataFilterColumnsInner.from_dict(_item) for _item in obj["workspaceDataFilterColumns"]] if obj.get("workspaceDataFilterColumns") is not None else None, + "workspaceDataFilterReferences": [JsonApiDatasetOutAttributesWorkspaceDataFilterReferencesInner.from_dict(_item) for _item in obj["workspaceDataFilterReferences"]] if obj.get("workspaceDataFilterReferences") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_grain_inner.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_grain_inner.py new file mode 100644 index 000000000..f69a2dee6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_grain_inner.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiDatasetOutAttributesGrainInner(BaseModel): + """ + JsonApiDatasetOutAttributesGrainInner + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attribute', 'date']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('attribute', 'date')") + 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 JsonApiDatasetOutAttributesGrainInner 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 JsonApiDatasetOutAttributesGrainInner 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_reference_properties_inner.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_reference_properties_inner.py new file mode 100644 index 000000000..1578fccec --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_reference_properties_inner.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.dataset_reference_identifier import DatasetReferenceIdentifier +from gooddata_api_client.models.reference_source_column import ReferenceSourceColumn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDatasetOutAttributesReferencePropertiesInner(BaseModel): + """ + JsonApiDatasetOutAttributesReferencePropertiesInner + """ # noqa: E501 + identifier: DatasetReferenceIdentifier + multivalue: StrictBool + source_column_data_types: Optional[List[StrictStr]] = Field(default=None, alias="sourceColumnDataTypes") + source_columns: Optional[List[StrictStr]] = Field(default=None, alias="sourceColumns") + sources: Optional[List[ReferenceSourceColumn]] = None + __properties: ClassVar[List[str]] = ["identifier", "multivalue", "sourceColumnDataTypes", "sourceColumns", "sources"] + + @field_validator('source_column_data_types') + def source_column_data_types_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + raise ValueError("each list item must be one of ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 JsonApiDatasetOutAttributesReferencePropertiesInner 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 identifier + if self.identifier: + _dict['identifier'] = self.identifier.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in sources (list) + _items = [] + if self.sources: + for _item_sources in self.sources: + if _item_sources: + _items.append(_item_sources.to_dict()) + _dict['sources'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDatasetOutAttributesReferencePropertiesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": DatasetReferenceIdentifier.from_dict(obj["identifier"]) if obj.get("identifier") is not None else None, + "multivalue": obj.get("multivalue"), + "sourceColumnDataTypes": obj.get("sourceColumnDataTypes"), + "sourceColumns": obj.get("sourceColumns"), + "sources": [ReferenceSourceColumn.from_dict(_item) for _item in obj["sources"]] if obj.get("sources") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_sql.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_sql.py new file mode 100644 index 000000000..768245f7d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_sql.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDatasetOutAttributesSql(BaseModel): + """ + JsonApiDatasetOutAttributesSql + """ # noqa: E501 + data_source_id: StrictStr = Field(alias="dataSourceId") + statement: StrictStr + __properties: ClassVar[List[str]] = ["dataSourceId", "statement"] + + 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 JsonApiDatasetOutAttributesSql 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 JsonApiDatasetOutAttributesSql from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataSourceId": obj.get("dataSourceId"), + "statement": obj.get("statement") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_workspace_data_filter_columns_inner.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_workspace_data_filter_columns_inner.py new file mode 100644 index 000000000..48d5daba3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_workspace_data_filter_columns_inner.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDatasetOutAttributesWorkspaceDataFilterColumnsInner(BaseModel): + """ + JsonApiDatasetOutAttributesWorkspaceDataFilterColumnsInner + """ # noqa: E501 + data_type: StrictStr = Field(alias="dataType") + name: StrictStr + __properties: ClassVar[List[str]] = ["dataType", "name"] + + @field_validator('data_type') + def data_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 JsonApiDatasetOutAttributesWorkspaceDataFilterColumnsInner 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 JsonApiDatasetOutAttributesWorkspaceDataFilterColumnsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataType": obj.get("dataType"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_workspace_data_filter_references_inner.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_workspace_data_filter_references_inner.py new file mode 100644 index 000000000..af3bb1797 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_attributes_workspace_data_filter_references_inner.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.dataset_workspace_data_filter_identifier import DatasetWorkspaceDataFilterIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDatasetOutAttributesWorkspaceDataFilterReferencesInner(BaseModel): + """ + Workspace data filter reference. + """ # noqa: E501 + filter_column: StrictStr = Field(alias="filterColumn") + filter_column_data_type: StrictStr = Field(alias="filterColumnDataType") + filter_id: DatasetWorkspaceDataFilterIdentifier = Field(alias="filterId") + __properties: ClassVar[List[str]] = ["filterColumn", "filterColumnDataType", "filterId"] + + @field_validator('filter_column_data_type') + def filter_column_data_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 JsonApiDatasetOutAttributesWorkspaceDataFilterReferencesInner 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 filter_id + if self.filter_id: + _dict['filterId'] = self.filter_id.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDatasetOutAttributesWorkspaceDataFilterReferencesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filterColumn": obj.get("filterColumn"), + "filterColumnDataType": obj.get("filterColumnDataType"), + "filterId": DatasetWorkspaceDataFilterIdentifier.from_dict(obj["filterId"]) if obj.get("filterId") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_document.py new file mode 100644 index 000000000..f175859aa --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_dataset_out import JsonApiDatasetOut +from gooddata_api_client.models.json_api_dataset_out_includes import JsonApiDatasetOutIncludes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDatasetOutDocument(BaseModel): + """ + JsonApiDatasetOutDocument + """ # noqa: E501 + data: JsonApiDatasetOut + included: Optional[List[JsonApiDatasetOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiDatasetOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDatasetOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiDatasetOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiDatasetOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_includes.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_includes.py new file mode 100644 index 000000000..ee608c7df --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_includes.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_with_links import JsonApiAggregatedFactOutWithLinks +from gooddata_api_client.models.json_api_attribute_out_with_links import JsonApiAttributeOutWithLinks +from gooddata_api_client.models.json_api_dataset_out_with_links import JsonApiDatasetOutWithLinks +from gooddata_api_client.models.json_api_fact_out_with_links import JsonApiFactOutWithLinks +from gooddata_api_client.models.json_api_workspace_data_filter_out_with_links import JsonApiWorkspaceDataFilterOutWithLinks +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIDATASETOUTINCLUDES_ONE_OF_SCHEMAS = ["JsonApiAggregatedFactOutWithLinks", "JsonApiAttributeOutWithLinks", "JsonApiDatasetOutWithLinks", "JsonApiFactOutWithLinks", "JsonApiWorkspaceDataFilterOutWithLinks"] + +class JsonApiDatasetOutIncludes(BaseModel): + """ + JsonApiDatasetOutIncludes + """ + # data type: JsonApiAttributeOutWithLinks + oneof_schema_1_validator: Optional[JsonApiAttributeOutWithLinks] = None + # data type: JsonApiFactOutWithLinks + oneof_schema_2_validator: Optional[JsonApiFactOutWithLinks] = None + # data type: JsonApiAggregatedFactOutWithLinks + oneof_schema_3_validator: Optional[JsonApiAggregatedFactOutWithLinks] = None + # data type: JsonApiDatasetOutWithLinks + oneof_schema_4_validator: Optional[JsonApiDatasetOutWithLinks] = None + # data type: JsonApiWorkspaceDataFilterOutWithLinks + oneof_schema_5_validator: Optional[JsonApiWorkspaceDataFilterOutWithLinks] = None + actual_instance: Optional[Union[JsonApiAggregatedFactOutWithLinks, JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks, JsonApiWorkspaceDataFilterOutWithLinks]] = None + one_of_schemas: Set[str] = { "JsonApiAggregatedFactOutWithLinks", "JsonApiAttributeOutWithLinks", "JsonApiDatasetOutWithLinks", "JsonApiFactOutWithLinks", "JsonApiWorkspaceDataFilterOutWithLinks" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiDatasetOutIncludes.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiAttributeOutWithLinks + if not isinstance(v, JsonApiAttributeOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAttributeOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiFactOutWithLinks + if not isinstance(v, JsonApiFactOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiFactOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiAggregatedFactOutWithLinks + if not isinstance(v, JsonApiAggregatedFactOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAggregatedFactOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiDatasetOutWithLinks + if not isinstance(v, JsonApiDatasetOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiDatasetOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiWorkspaceDataFilterOutWithLinks + if not isinstance(v, JsonApiWorkspaceDataFilterOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiWorkspaceDataFilterOutWithLinks`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiDatasetOutIncludes with oneOf schemas: JsonApiAggregatedFactOutWithLinks, JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks, JsonApiWorkspaceDataFilterOutWithLinks. 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 + + # deserialize data into JsonApiAttributeOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAttributeOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiFactOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiFactOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiAggregatedFactOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAggregatedFactOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiDatasetOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiDatasetOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiWorkspaceDataFilterOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiWorkspaceDataFilterOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiDatasetOutIncludes with oneOf schemas: JsonApiAggregatedFactOutWithLinks, JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks, JsonApiWorkspaceDataFilterOutWithLinks. 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], JsonApiAggregatedFactOutWithLinks, JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks, JsonApiWorkspaceDataFilterOutWithLinks]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_list.py new file mode 100644 index 000000000..3b857324a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_dataset_out_includes import JsonApiDatasetOutIncludes +from gooddata_api_client.models.json_api_dataset_out_with_links import JsonApiDatasetOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDatasetOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiDatasetOutWithLinks] + included: Optional[List[JsonApiDatasetOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiDatasetOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDatasetOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiDatasetOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiDatasetOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships.py new file mode 100644 index 000000000..45cfa1303 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_datasets import JsonApiAnalyticalDashboardOutRelationshipsDatasets +from gooddata_api_client.models.json_api_attribute_hierarchy_out_relationships_attributes import JsonApiAttributeHierarchyOutRelationshipsAttributes +from gooddata_api_client.models.json_api_dataset_out_relationships_aggregated_facts import JsonApiDatasetOutRelationshipsAggregatedFacts +from gooddata_api_client.models.json_api_dataset_out_relationships_facts import JsonApiDatasetOutRelationshipsFacts +from gooddata_api_client.models.json_api_dataset_out_relationships_workspace_data_filters import JsonApiDatasetOutRelationshipsWorkspaceDataFilters +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDatasetOutRelationships(BaseModel): + """ + JsonApiDatasetOutRelationships + """ # noqa: E501 + aggregated_facts: Optional[JsonApiDatasetOutRelationshipsAggregatedFacts] = Field(default=None, alias="aggregatedFacts") + attributes: Optional[JsonApiAttributeHierarchyOutRelationshipsAttributes] = None + facts: Optional[JsonApiDatasetOutRelationshipsFacts] = None + references: Optional[JsonApiAnalyticalDashboardOutRelationshipsDatasets] = None + workspace_data_filters: Optional[JsonApiDatasetOutRelationshipsWorkspaceDataFilters] = Field(default=None, alias="workspaceDataFilters") + __properties: ClassVar[List[str]] = ["aggregatedFacts", "attributes", "facts", "references", "workspaceDataFilters"] + + 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 JsonApiDatasetOutRelationships 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 aggregated_facts + if self.aggregated_facts: + _dict['aggregatedFacts'] = self.aggregated_facts.to_dict() + # override the default output from pydantic by calling `to_dict()` of attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of facts + if self.facts: + _dict['facts'] = self.facts.to_dict() + # override the default output from pydantic by calling `to_dict()` of references + if self.references: + _dict['references'] = self.references.to_dict() + # override the default output from pydantic by calling `to_dict()` of workspace_data_filters + if self.workspace_data_filters: + _dict['workspaceDataFilters'] = self.workspace_data_filters.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDatasetOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aggregatedFacts": JsonApiDatasetOutRelationshipsAggregatedFacts.from_dict(obj["aggregatedFacts"]) if obj.get("aggregatedFacts") is not None else None, + "attributes": JsonApiAttributeHierarchyOutRelationshipsAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "facts": JsonApiDatasetOutRelationshipsFacts.from_dict(obj["facts"]) if obj.get("facts") is not None else None, + "references": JsonApiAnalyticalDashboardOutRelationshipsDatasets.from_dict(obj["references"]) if obj.get("references") is not None else None, + "workspaceDataFilters": JsonApiDatasetOutRelationshipsWorkspaceDataFilters.from_dict(obj["workspaceDataFilters"]) if obj.get("workspaceDataFilters") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships_aggregated_facts.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships_aggregated_facts.py new file mode 100644 index 000000000..03df8778b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships_aggregated_facts.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_aggregated_fact_linkage import JsonApiAggregatedFactLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDatasetOutRelationshipsAggregatedFacts(BaseModel): + """ + JsonApiDatasetOutRelationshipsAggregatedFacts + """ # noqa: E501 + data: List[JsonApiAggregatedFactLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiDatasetOutRelationshipsAggregatedFacts 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDatasetOutRelationshipsAggregatedFacts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiAggregatedFactLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships_facts.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships_facts.py new file mode 100644 index 000000000..d4286188f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships_facts.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_fact_linkage import JsonApiFactLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDatasetOutRelationshipsFacts(BaseModel): + """ + JsonApiDatasetOutRelationshipsFacts + """ # noqa: E501 + data: List[JsonApiFactLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiDatasetOutRelationshipsFacts 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDatasetOutRelationshipsFacts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiFactLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships_workspace_data_filters.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships_workspace_data_filters.py new file mode 100644 index 000000000..c5358f611 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_relationships_workspace_data_filters.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_workspace_data_filter_linkage import JsonApiWorkspaceDataFilterLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDatasetOutRelationshipsWorkspaceDataFilters(BaseModel): + """ + JsonApiDatasetOutRelationshipsWorkspaceDataFilters + """ # noqa: E501 + data: List[JsonApiWorkspaceDataFilterLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiDatasetOutRelationshipsWorkspaceDataFilters 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDatasetOutRelationshipsWorkspaceDataFilters from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiWorkspaceDataFilterLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_with_links.py new file mode 100644 index 000000000..45376f728 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_dataset_out_attributes import JsonApiDatasetOutAttributes +from gooddata_api_client.models.json_api_dataset_out_relationships import JsonApiDatasetOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDatasetOutWithLinks(BaseModel): + """ + JsonApiDatasetOutWithLinks + """ # noqa: E501 + attributes: JsonApiDatasetOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiDatasetOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dataset']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dataset')") + 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 JsonApiDatasetOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDatasetOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiDatasetOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiDatasetOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_patch.py new file mode 100644 index 000000000..b9a47e24d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_attribute_patch_attributes import JsonApiAttributePatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDatasetPatch(BaseModel): + """ + JSON:API representation of patching dataset entity. + """ # noqa: E501 + attributes: Optional[JsonApiAttributePatchAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dataset']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dataset')") + 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 JsonApiDatasetPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDatasetPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAttributePatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_patch_document.py new file mode 100644 index 000000000..78739cc1b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_dataset_patch import JsonApiDatasetPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiDatasetPatchDocument(BaseModel): + """ + JsonApiDatasetPatchDocument + """ # noqa: E501 + data: JsonApiDatasetPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiDatasetPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiDatasetPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiDatasetPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_dataset_to_one_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_to_one_linkage.py new file mode 100644 index 000000000..e0b8657bf --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_dataset_to_one_linkage.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_dataset_linkage import JsonApiDatasetLinkage +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIDATASETTOONELINKAGE_ONE_OF_SCHEMAS = ["JsonApiDatasetLinkage"] + +class JsonApiDatasetToOneLinkage(BaseModel): + """ + References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + """ + # data type: JsonApiDatasetLinkage + oneof_schema_1_validator: Optional[JsonApiDatasetLinkage] = None + actual_instance: Optional[Union[JsonApiDatasetLinkage]] = None + one_of_schemas: Set[str] = { "JsonApiDatasetLinkage" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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): + if v is None: + return v + + instance = JsonApiDatasetToOneLinkage.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiDatasetLinkage + if not isinstance(v, JsonApiDatasetLinkage): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiDatasetLinkage`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiDatasetToOneLinkage with oneOf schemas: JsonApiDatasetLinkage. 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: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into JsonApiDatasetLinkage + try: + if match == 0: + instance.actual_instance = JsonApiDatasetLinkage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiDatasetToOneLinkage with oneOf schemas: JsonApiDatasetLinkage. 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], JsonApiDatasetLinkage]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out.py new file mode 100644 index 000000000..e7d5e3683 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_entitlement_out_attributes import JsonApiEntitlementOutAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiEntitlementOut(BaseModel): + """ + JSON:API representation of entitlement entity. + """ # noqa: E501 + attributes: Optional[JsonApiEntitlementOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['entitlement']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('entitlement')") + 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 JsonApiEntitlementOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiEntitlementOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiEntitlementOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_attributes.py new file mode 100644 index 000000000..bd1b7a8eb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_attributes.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import date +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiEntitlementOutAttributes(BaseModel): + """ + JsonApiEntitlementOutAttributes + """ # noqa: E501 + expiry: Optional[date] = None + value: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["expiry", "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 JsonApiEntitlementOutAttributes 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 JsonApiEntitlementOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "expiry": obj.get("expiry"), + "value": obj.get("value") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_document.py new file mode 100644 index 000000000..04e3b9921 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_entitlement_out import JsonApiEntitlementOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiEntitlementOutDocument(BaseModel): + """ + JsonApiEntitlementOutDocument + """ # noqa: E501 + data: JsonApiEntitlementOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiEntitlementOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiEntitlementOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiEntitlementOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_list.py new file mode 100644 index 000000000..a385f0869 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_entitlement_out_with_links import JsonApiEntitlementOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiEntitlementOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiEntitlementOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiEntitlementOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiEntitlementOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiEntitlementOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_with_links.py new file mode 100644 index 000000000..b86ea1937 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_entitlement_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_entitlement_out_attributes import JsonApiEntitlementOutAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiEntitlementOutWithLinks(BaseModel): + """ + JsonApiEntitlementOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiEntitlementOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['entitlement']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('entitlement')") + 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 JsonApiEntitlementOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiEntitlementOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiEntitlementOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in.py new file mode 100644 index 000000000..e7443c632 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_export_definition_in_attributes import JsonApiExportDefinitionInAttributes +from gooddata_api_client.models.json_api_export_definition_in_relationships import JsonApiExportDefinitionInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportDefinitionIn(BaseModel): + """ + JSON:API representation of exportDefinition entity. + """ # noqa: E501 + attributes: Optional[JsonApiExportDefinitionInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiExportDefinitionInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['exportDefinition']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('exportDefinition')") + 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 JsonApiExportDefinitionIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportDefinitionIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiExportDefinitionInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiExportDefinitionInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_attributes.py new file mode 100644 index 000000000..5870308d9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_attributes.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_export_definition_in_attributes_request_payload import JsonApiExportDefinitionInAttributesRequestPayload +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportDefinitionInAttributes(BaseModel): + """ + JsonApiExportDefinitionInAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + request_payload: Optional[JsonApiExportDefinitionInAttributesRequestPayload] = Field(default=None, alias="requestPayload") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "description", "requestPayload", "tags", "title"] + + 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 JsonApiExportDefinitionInAttributes 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 request_payload + if self.request_payload: + _dict['requestPayload'] = self.request_payload.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportDefinitionInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "description": obj.get("description"), + "requestPayload": JsonApiExportDefinitionInAttributesRequestPayload.from_dict(obj["requestPayload"]) if obj.get("requestPayload") is not None else None, + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_attributes_request_payload.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_attributes_request_payload.py new file mode 100644 index 000000000..e810d1ea1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_attributes_request_payload.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.tabular_export_request import TabularExportRequest +from gooddata_api_client.models.visual_export_request import VisualExportRequest +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIEXPORTDEFINITIONINATTRIBUTESREQUESTPAYLOAD_ONE_OF_SCHEMAS = ["TabularExportRequest", "VisualExportRequest"] + +class JsonApiExportDefinitionInAttributesRequestPayload(BaseModel): + """ + JSON content to be used as export request payload for /export/tabular and /export/visual endpoints. + """ + # data type: VisualExportRequest + oneof_schema_1_validator: Optional[VisualExportRequest] = None + # data type: TabularExportRequest + oneof_schema_2_validator: Optional[TabularExportRequest] = None + actual_instance: Optional[Union[TabularExportRequest, VisualExportRequest]] = None + one_of_schemas: Set[str] = { "TabularExportRequest", "VisualExportRequest" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiExportDefinitionInAttributesRequestPayload.model_construct() + error_messages = [] + match = 0 + # validate data type: VisualExportRequest + if not isinstance(v, VisualExportRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `VisualExportRequest`") + else: + match += 1 + # validate data type: TabularExportRequest + if not isinstance(v, TabularExportRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `TabularExportRequest`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiExportDefinitionInAttributesRequestPayload with oneOf schemas: TabularExportRequest, VisualExportRequest. 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 + + # deserialize data into VisualExportRequest + try: + if match == 0: + instance.actual_instance = VisualExportRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TabularExportRequest + try: + if match == 0: + instance.actual_instance = TabularExportRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiExportDefinitionInAttributesRequestPayload with oneOf schemas: TabularExportRequest, VisualExportRequest. 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], TabularExportRequest, VisualExportRequest]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_document.py new file mode 100644 index 000000000..2956c19d3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_export_definition_in import JsonApiExportDefinitionIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportDefinitionInDocument(BaseModel): + """ + JsonApiExportDefinitionInDocument + """ # noqa: E501 + data: JsonApiExportDefinitionIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiExportDefinitionInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportDefinitionInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiExportDefinitionIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_relationships.py new file mode 100644 index 000000000..f23efc1f4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_relationships.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_automation_in_relationships_analytical_dashboard import JsonApiAutomationInRelationshipsAnalyticalDashboard +from gooddata_api_client.models.json_api_export_definition_in_relationships_visualization_object import JsonApiExportDefinitionInRelationshipsVisualizationObject +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportDefinitionInRelationships(BaseModel): + """ + JsonApiExportDefinitionInRelationships + """ # noqa: E501 + analytical_dashboard: Optional[JsonApiAutomationInRelationshipsAnalyticalDashboard] = Field(default=None, alias="analyticalDashboard") + visualization_object: Optional[JsonApiExportDefinitionInRelationshipsVisualizationObject] = Field(default=None, alias="visualizationObject") + __properties: ClassVar[List[str]] = ["analyticalDashboard", "visualizationObject"] + + 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 JsonApiExportDefinitionInRelationships 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 analytical_dashboard + if self.analytical_dashboard: + _dict['analyticalDashboard'] = self.analytical_dashboard.to_dict() + # override the default output from pydantic by calling `to_dict()` of visualization_object + if self.visualization_object: + _dict['visualizationObject'] = self.visualization_object.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportDefinitionInRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyticalDashboard": JsonApiAutomationInRelationshipsAnalyticalDashboard.from_dict(obj["analyticalDashboard"]) if obj.get("analyticalDashboard") is not None else None, + "visualizationObject": JsonApiExportDefinitionInRelationshipsVisualizationObject.from_dict(obj["visualizationObject"]) if obj.get("visualizationObject") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_relationships_visualization_object.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_relationships_visualization_object.py new file mode 100644 index 000000000..9eeb2458b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_in_relationships_visualization_object.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_visualization_object_to_one_linkage import JsonApiVisualizationObjectToOneLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportDefinitionInRelationshipsVisualizationObject(BaseModel): + """ + JsonApiExportDefinitionInRelationshipsVisualizationObject + """ # noqa: E501 + data: Optional[JsonApiVisualizationObjectToOneLinkage] + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiExportDefinitionInRelationshipsVisualizationObject 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportDefinitionInRelationshipsVisualizationObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiVisualizationObjectToOneLinkage.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_linkage.py new file mode 100644 index 000000000..250519d5b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiExportDefinitionLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['exportDefinition']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('exportDefinition')") + 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 JsonApiExportDefinitionLinkage 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 JsonApiExportDefinitionLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out.py new file mode 100644 index 000000000..eda89f9ae --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_export_definition_out_attributes import JsonApiExportDefinitionOutAttributes +from gooddata_api_client.models.json_api_export_definition_out_relationships import JsonApiExportDefinitionOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportDefinitionOut(BaseModel): + """ + JSON:API representation of exportDefinition entity. + """ # noqa: E501 + attributes: Optional[JsonApiExportDefinitionOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiExportDefinitionOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['exportDefinition']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('exportDefinition')") + 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 JsonApiExportDefinitionOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportDefinitionOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiExportDefinitionOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiExportDefinitionOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_attributes.py new file mode 100644 index 000000000..af94da1ef --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_attributes.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_export_definition_in_attributes_request_payload import JsonApiExportDefinitionInAttributesRequestPayload +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportDefinitionOutAttributes(BaseModel): + """ + JsonApiExportDefinitionOutAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + created_at: Optional[datetime] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + modified_at: Optional[datetime] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + request_payload: Optional[JsonApiExportDefinitionInAttributesRequestPayload] = Field(default=None, alias="requestPayload") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "createdAt", "description", "modifiedAt", "requestPayload", "tags", "title"] + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + 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 JsonApiExportDefinitionOutAttributes 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 request_payload + if self.request_payload: + _dict['requestPayload'] = self.request_payload.to_dict() + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportDefinitionOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "createdAt": obj.get("createdAt"), + "description": obj.get("description"), + "modifiedAt": obj.get("modifiedAt"), + "requestPayload": JsonApiExportDefinitionInAttributesRequestPayload.from_dict(obj["requestPayload"]) if obj.get("requestPayload") is not None else None, + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_document.py new file mode 100644 index 000000000..bce845d7e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_export_definition_out import JsonApiExportDefinitionOut +from gooddata_api_client.models.json_api_export_definition_out_includes import JsonApiExportDefinitionOutIncludes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportDefinitionOutDocument(BaseModel): + """ + JsonApiExportDefinitionOutDocument + """ # noqa: E501 + data: JsonApiExportDefinitionOut + included: Optional[List[JsonApiExportDefinitionOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiExportDefinitionOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportDefinitionOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiExportDefinitionOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiExportDefinitionOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_includes.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_includes.py new file mode 100644 index 000000000..5040b1ff3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_includes.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_analytical_dashboard_out_with_links import JsonApiAnalyticalDashboardOutWithLinks +from gooddata_api_client.models.json_api_automation_out_with_links import JsonApiAutomationOutWithLinks +from gooddata_api_client.models.json_api_user_identifier_out_with_links import JsonApiUserIdentifierOutWithLinks +from gooddata_api_client.models.json_api_visualization_object_out_with_links import JsonApiVisualizationObjectOutWithLinks +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIEXPORTDEFINITIONOUTINCLUDES_ONE_OF_SCHEMAS = ["JsonApiAnalyticalDashboardOutWithLinks", "JsonApiAutomationOutWithLinks", "JsonApiUserIdentifierOutWithLinks", "JsonApiVisualizationObjectOutWithLinks"] + +class JsonApiExportDefinitionOutIncludes(BaseModel): + """ + JsonApiExportDefinitionOutIncludes + """ + # data type: JsonApiVisualizationObjectOutWithLinks + oneof_schema_1_validator: Optional[JsonApiVisualizationObjectOutWithLinks] = None + # data type: JsonApiAnalyticalDashboardOutWithLinks + oneof_schema_2_validator: Optional[JsonApiAnalyticalDashboardOutWithLinks] = None + # data type: JsonApiAutomationOutWithLinks + oneof_schema_3_validator: Optional[JsonApiAutomationOutWithLinks] = None + # data type: JsonApiUserIdentifierOutWithLinks + oneof_schema_4_validator: Optional[JsonApiUserIdentifierOutWithLinks] = None + actual_instance: Optional[Union[JsonApiAnalyticalDashboardOutWithLinks, JsonApiAutomationOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiVisualizationObjectOutWithLinks]] = None + one_of_schemas: Set[str] = { "JsonApiAnalyticalDashboardOutWithLinks", "JsonApiAutomationOutWithLinks", "JsonApiUserIdentifierOutWithLinks", "JsonApiVisualizationObjectOutWithLinks" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiExportDefinitionOutIncludes.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiVisualizationObjectOutWithLinks + if not isinstance(v, JsonApiVisualizationObjectOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiVisualizationObjectOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiAnalyticalDashboardOutWithLinks + if not isinstance(v, JsonApiAnalyticalDashboardOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAnalyticalDashboardOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiAutomationOutWithLinks + if not isinstance(v, JsonApiAutomationOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAutomationOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiUserIdentifierOutWithLinks + if not isinstance(v, JsonApiUserIdentifierOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserIdentifierOutWithLinks`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiExportDefinitionOutIncludes with oneOf schemas: JsonApiAnalyticalDashboardOutWithLinks, JsonApiAutomationOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiVisualizationObjectOutWithLinks. 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 + + # deserialize data into JsonApiVisualizationObjectOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiVisualizationObjectOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiAnalyticalDashboardOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAnalyticalDashboardOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiAutomationOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAutomationOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiUserIdentifierOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiUserIdentifierOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiExportDefinitionOutIncludes with oneOf schemas: JsonApiAnalyticalDashboardOutWithLinks, JsonApiAutomationOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiVisualizationObjectOutWithLinks. 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], JsonApiAnalyticalDashboardOutWithLinks, JsonApiAutomationOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiVisualizationObjectOutWithLinks]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_list.py new file mode 100644 index 000000000..877f4478b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_export_definition_out_includes import JsonApiExportDefinitionOutIncludes +from gooddata_api_client.models.json_api_export_definition_out_with_links import JsonApiExportDefinitionOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportDefinitionOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiExportDefinitionOutWithLinks] + included: Optional[List[JsonApiExportDefinitionOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiExportDefinitionOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportDefinitionOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiExportDefinitionOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiExportDefinitionOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_relationships.py new file mode 100644 index 000000000..c56ab3df9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_relationships.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_certified_by import JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy +from gooddata_api_client.models.json_api_automation_in_relationships_analytical_dashboard import JsonApiAutomationInRelationshipsAnalyticalDashboard +from gooddata_api_client.models.json_api_automation_result_out_relationships_automation import JsonApiAutomationResultOutRelationshipsAutomation +from gooddata_api_client.models.json_api_export_definition_in_relationships_visualization_object import JsonApiExportDefinitionInRelationshipsVisualizationObject +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportDefinitionOutRelationships(BaseModel): + """ + JsonApiExportDefinitionOutRelationships + """ # noqa: E501 + analytical_dashboard: Optional[JsonApiAutomationInRelationshipsAnalyticalDashboard] = Field(default=None, alias="analyticalDashboard") + automation: Optional[JsonApiAutomationResultOutRelationshipsAutomation] = None + created_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="createdBy") + modified_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="modifiedBy") + visualization_object: Optional[JsonApiExportDefinitionInRelationshipsVisualizationObject] = Field(default=None, alias="visualizationObject") + __properties: ClassVar[List[str]] = ["analyticalDashboard", "automation", "createdBy", "modifiedBy", "visualizationObject"] + + 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 JsonApiExportDefinitionOutRelationships 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 analytical_dashboard + if self.analytical_dashboard: + _dict['analyticalDashboard'] = self.analytical_dashboard.to_dict() + # override the default output from pydantic by calling `to_dict()` of automation + if self.automation: + _dict['automation'] = self.automation.to_dict() + # override the default output from pydantic by calling `to_dict()` of created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of visualization_object + if self.visualization_object: + _dict['visualizationObject'] = self.visualization_object.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportDefinitionOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyticalDashboard": JsonApiAutomationInRelationshipsAnalyticalDashboard.from_dict(obj["analyticalDashboard"]) if obj.get("analyticalDashboard") is not None else None, + "automation": JsonApiAutomationResultOutRelationshipsAutomation.from_dict(obj["automation"]) if obj.get("automation") is not None else None, + "createdBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "modifiedBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None, + "visualizationObject": JsonApiExportDefinitionInRelationshipsVisualizationObject.from_dict(obj["visualizationObject"]) if obj.get("visualizationObject") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_with_links.py new file mode 100644 index 000000000..0a21c4583 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_export_definition_out_attributes import JsonApiExportDefinitionOutAttributes +from gooddata_api_client.models.json_api_export_definition_out_relationships import JsonApiExportDefinitionOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportDefinitionOutWithLinks(BaseModel): + """ + JsonApiExportDefinitionOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiExportDefinitionOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiExportDefinitionOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['exportDefinition']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('exportDefinition')") + 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 JsonApiExportDefinitionOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportDefinitionOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiExportDefinitionOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiExportDefinitionOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_patch.py new file mode 100644 index 000000000..2b17e7d42 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_patch.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_export_definition_in_attributes import JsonApiExportDefinitionInAttributes +from gooddata_api_client.models.json_api_export_definition_in_relationships import JsonApiExportDefinitionInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportDefinitionPatch(BaseModel): + """ + JSON:API representation of patching exportDefinition entity. + """ # noqa: E501 + attributes: Optional[JsonApiExportDefinitionInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiExportDefinitionInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['exportDefinition']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('exportDefinition')") + 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 JsonApiExportDefinitionPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportDefinitionPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiExportDefinitionInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiExportDefinitionInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_patch_document.py new file mode 100644 index 000000000..8ecb6a454 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_export_definition_patch import JsonApiExportDefinitionPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportDefinitionPatchDocument(BaseModel): + """ + JsonApiExportDefinitionPatchDocument + """ # noqa: E501 + data: JsonApiExportDefinitionPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiExportDefinitionPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportDefinitionPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiExportDefinitionPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_post_optional_id.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_post_optional_id.py new file mode 100644 index 000000000..755279bbe --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_post_optional_id.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_export_definition_in_attributes import JsonApiExportDefinitionInAttributes +from gooddata_api_client.models.json_api_export_definition_in_relationships import JsonApiExportDefinitionInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportDefinitionPostOptionalId(BaseModel): + """ + JSON:API representation of exportDefinition entity. + """ # noqa: E501 + attributes: Optional[JsonApiExportDefinitionInAttributes] = None + id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="API identifier of an object") + relationships: Optional[JsonApiExportDefinitionInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @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"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['exportDefinition']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('exportDefinition')") + 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 JsonApiExportDefinitionPostOptionalId 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportDefinitionPostOptionalId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiExportDefinitionInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiExportDefinitionInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_post_optional_id_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_post_optional_id_document.py new file mode 100644 index 000000000..63b0156ee --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_definition_post_optional_id_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_export_definition_post_optional_id import JsonApiExportDefinitionPostOptionalId +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportDefinitionPostOptionalIdDocument(BaseModel): + """ + JsonApiExportDefinitionPostOptionalIdDocument + """ # noqa: E501 + data: JsonApiExportDefinitionPostOptionalId + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiExportDefinitionPostOptionalIdDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportDefinitionPostOptionalIdDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiExportDefinitionPostOptionalId.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_template_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_in.py new file mode 100644 index 000000000..61906d5c8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_export_template_in_attributes import JsonApiExportTemplateInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportTemplateIn(BaseModel): + """ + JSON:API representation of exportTemplate entity. + """ # noqa: E501 + attributes: JsonApiExportTemplateInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['exportTemplate']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('exportTemplate')") + 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 JsonApiExportTemplateIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportTemplateIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiExportTemplateInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_attributes.py new file mode 100644 index 000000000..e338e9ece --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_attributes.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_export_template_in_attributes_dashboard_slides_template import JsonApiExportTemplateInAttributesDashboardSlidesTemplate +from gooddata_api_client.models.json_api_export_template_in_attributes_widget_slides_template import JsonApiExportTemplateInAttributesWidgetSlidesTemplate +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportTemplateInAttributes(BaseModel): + """ + JsonApiExportTemplateInAttributes + """ # noqa: E501 + dashboard_slides_template: Optional[JsonApiExportTemplateInAttributesDashboardSlidesTemplate] = Field(default=None, alias="dashboardSlidesTemplate") + name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="User-facing name of the Slides template.") + widget_slides_template: Optional[JsonApiExportTemplateInAttributesWidgetSlidesTemplate] = Field(default=None, alias="widgetSlidesTemplate") + __properties: ClassVar[List[str]] = ["dashboardSlidesTemplate", "name", "widgetSlidesTemplate"] + + 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 JsonApiExportTemplateInAttributes 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 dashboard_slides_template + if self.dashboard_slides_template: + _dict['dashboardSlidesTemplate'] = self.dashboard_slides_template.to_dict() + # override the default output from pydantic by calling `to_dict()` of widget_slides_template + if self.widget_slides_template: + _dict['widgetSlidesTemplate'] = self.widget_slides_template.to_dict() + # set to None if dashboard_slides_template (nullable) is None + # and model_fields_set contains the field + if self.dashboard_slides_template is None and "dashboard_slides_template" in self.model_fields_set: + _dict['dashboardSlidesTemplate'] = None + + # set to None if widget_slides_template (nullable) is None + # and model_fields_set contains the field + if self.widget_slides_template is None and "widget_slides_template" in self.model_fields_set: + _dict['widgetSlidesTemplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportTemplateInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dashboardSlidesTemplate": JsonApiExportTemplateInAttributesDashboardSlidesTemplate.from_dict(obj["dashboardSlidesTemplate"]) if obj.get("dashboardSlidesTemplate") is not None else None, + "name": obj.get("name"), + "widgetSlidesTemplate": JsonApiExportTemplateInAttributesWidgetSlidesTemplate.from_dict(obj["widgetSlidesTemplate"]) if obj.get("widgetSlidesTemplate") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_attributes_dashboard_slides_template.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_attributes_dashboard_slides_template.py new file mode 100644 index 000000000..1f3a60c2c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_attributes_dashboard_slides_template.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.content_slide_template import ContentSlideTemplate +from gooddata_api_client.models.cover_slide_template import CoverSlideTemplate +from gooddata_api_client.models.intro_slide_template import IntroSlideTemplate +from gooddata_api_client.models.section_slide_template import SectionSlideTemplate +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportTemplateInAttributesDashboardSlidesTemplate(BaseModel): + """ + Template for dashboard slides export. Available variables: {{currentPageNumber}}, {{dashboardDateFilters}}, {{dashboardDescription}}, {{dashboardFilters}}, {{dashboardId}}, {{dashboardName}}, {{dashboardTags}}, {{dashboardUrl}}, {{exportedAt}}, {{exportedBy}}, {{logo}}, {{totalPages}}, {{workspaceId}}, {{workspaceName}} + """ # noqa: E501 + applied_on: Annotated[List[StrictStr], Field(min_length=1)] = Field(description="Export types this template applies to.", alias="appliedOn") + content_slide: Optional[ContentSlideTemplate] = Field(default=None, alias="contentSlide") + cover_slide: Optional[CoverSlideTemplate] = Field(default=None, alias="coverSlide") + intro_slide: Optional[IntroSlideTemplate] = Field(default=None, alias="introSlide") + section_slide: Optional[SectionSlideTemplate] = Field(default=None, alias="sectionSlide") + __properties: ClassVar[List[str]] = ["appliedOn", "contentSlide", "coverSlide", "introSlide", "sectionSlide"] + + @field_validator('applied_on') + def applied_on_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['PDF', 'PPTX']): + raise ValueError("each list item must be one of ('PDF', 'PPTX')") + 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 JsonApiExportTemplateInAttributesDashboardSlidesTemplate 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_slide + if self.content_slide: + _dict['contentSlide'] = self.content_slide.to_dict() + # override the default output from pydantic by calling `to_dict()` of cover_slide + if self.cover_slide: + _dict['coverSlide'] = self.cover_slide.to_dict() + # override the default output from pydantic by calling `to_dict()` of intro_slide + if self.intro_slide: + _dict['introSlide'] = self.intro_slide.to_dict() + # override the default output from pydantic by calling `to_dict()` of section_slide + if self.section_slide: + _dict['sectionSlide'] = self.section_slide.to_dict() + # set to None if content_slide (nullable) is None + # and model_fields_set contains the field + if self.content_slide is None and "content_slide" in self.model_fields_set: + _dict['contentSlide'] = None + + # set to None if cover_slide (nullable) is None + # and model_fields_set contains the field + if self.cover_slide is None and "cover_slide" in self.model_fields_set: + _dict['coverSlide'] = None + + # set to None if intro_slide (nullable) is None + # and model_fields_set contains the field + if self.intro_slide is None and "intro_slide" in self.model_fields_set: + _dict['introSlide'] = None + + # set to None if section_slide (nullable) is None + # and model_fields_set contains the field + if self.section_slide is None and "section_slide" in self.model_fields_set: + _dict['sectionSlide'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportTemplateInAttributesDashboardSlidesTemplate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "appliedOn": obj.get("appliedOn"), + "contentSlide": ContentSlideTemplate.from_dict(obj["contentSlide"]) if obj.get("contentSlide") is not None else None, + "coverSlide": CoverSlideTemplate.from_dict(obj["coverSlide"]) if obj.get("coverSlide") is not None else None, + "introSlide": IntroSlideTemplate.from_dict(obj["introSlide"]) if obj.get("introSlide") is not None else None, + "sectionSlide": SectionSlideTemplate.from_dict(obj["sectionSlide"]) if obj.get("sectionSlide") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_attributes_widget_slides_template.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_attributes_widget_slides_template.py new file mode 100644 index 000000000..5641c8cb2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_attributes_widget_slides_template.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.content_slide_template import ContentSlideTemplate +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportTemplateInAttributesWidgetSlidesTemplate(BaseModel): + """ + Template for widget slides export. Available variables: {{currentPageNumber}}, {{dashboardDateFilters}}, {{dashboardDescription}}, {{dashboardFilters}}, {{dashboardId}}, {{dashboardName}}, {{dashboardTags}}, {{dashboardUrl}}, {{exportedAt}}, {{exportedBy}}, {{logo}}, {{totalPages}}, {{workspaceId}}, {{workspaceName}} + """ # noqa: E501 + applied_on: Annotated[List[StrictStr], Field(min_length=1)] = Field(description="Export types this template applies to.", alias="appliedOn") + content_slide: Optional[ContentSlideTemplate] = Field(default=None, alias="contentSlide") + __properties: ClassVar[List[str]] = ["appliedOn", "contentSlide"] + + @field_validator('applied_on') + def applied_on_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['PDF', 'PPTX']): + raise ValueError("each list item must be one of ('PDF', 'PPTX')") + 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 JsonApiExportTemplateInAttributesWidgetSlidesTemplate 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_slide + if self.content_slide: + _dict['contentSlide'] = self.content_slide.to_dict() + # set to None if content_slide (nullable) is None + # and model_fields_set contains the field + if self.content_slide is None and "content_slide" in self.model_fields_set: + _dict['contentSlide'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportTemplateInAttributesWidgetSlidesTemplate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "appliedOn": obj.get("appliedOn"), + "contentSlide": ContentSlideTemplate.from_dict(obj["contentSlide"]) if obj.get("contentSlide") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_document.py new file mode 100644 index 000000000..1ea2e2cb3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_export_template_in import JsonApiExportTemplateIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportTemplateInDocument(BaseModel): + """ + JsonApiExportTemplateInDocument + """ # noqa: E501 + data: JsonApiExportTemplateIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiExportTemplateInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportTemplateInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiExportTemplateIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_template_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_out.py new file mode 100644 index 000000000..b466feb78 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_export_template_in_attributes import JsonApiExportTemplateInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportTemplateOut(BaseModel): + """ + JSON:API representation of exportTemplate entity. + """ # noqa: E501 + attributes: JsonApiExportTemplateInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['exportTemplate']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('exportTemplate')") + 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 JsonApiExportTemplateOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportTemplateOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiExportTemplateInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_template_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_out_document.py new file mode 100644 index 000000000..5e1382916 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_export_template_out import JsonApiExportTemplateOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportTemplateOutDocument(BaseModel): + """ + JsonApiExportTemplateOutDocument + """ # noqa: E501 + data: JsonApiExportTemplateOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiExportTemplateOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportTemplateOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiExportTemplateOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_template_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_out_list.py new file mode 100644 index 000000000..662c034d8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_export_template_out_with_links import JsonApiExportTemplateOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportTemplateOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiExportTemplateOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiExportTemplateOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportTemplateOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiExportTemplateOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_template_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_out_with_links.py new file mode 100644 index 000000000..c3a872191 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_export_template_in_attributes import JsonApiExportTemplateInAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportTemplateOutWithLinks(BaseModel): + """ + JsonApiExportTemplateOutWithLinks + """ # noqa: E501 + attributes: JsonApiExportTemplateInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['exportTemplate']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('exportTemplate')") + 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 JsonApiExportTemplateOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportTemplateOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiExportTemplateInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_template_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_patch.py new file mode 100644 index 000000000..685e2ed90 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_export_template_patch_attributes import JsonApiExportTemplatePatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportTemplatePatch(BaseModel): + """ + JSON:API representation of patching exportTemplate entity. + """ # noqa: E501 + attributes: JsonApiExportTemplatePatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['exportTemplate']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('exportTemplate')") + 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 JsonApiExportTemplatePatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportTemplatePatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiExportTemplatePatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_template_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_patch_attributes.py new file mode 100644 index 000000000..54d8bf52a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_patch_attributes.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_export_template_in_attributes_dashboard_slides_template import JsonApiExportTemplateInAttributesDashboardSlidesTemplate +from gooddata_api_client.models.json_api_export_template_in_attributes_widget_slides_template import JsonApiExportTemplateInAttributesWidgetSlidesTemplate +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportTemplatePatchAttributes(BaseModel): + """ + JsonApiExportTemplatePatchAttributes + """ # noqa: E501 + dashboard_slides_template: Optional[JsonApiExportTemplateInAttributesDashboardSlidesTemplate] = Field(default=None, alias="dashboardSlidesTemplate") + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="User-facing name of the Slides template.") + widget_slides_template: Optional[JsonApiExportTemplateInAttributesWidgetSlidesTemplate] = Field(default=None, alias="widgetSlidesTemplate") + __properties: ClassVar[List[str]] = ["dashboardSlidesTemplate", "name", "widgetSlidesTemplate"] + + 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 JsonApiExportTemplatePatchAttributes 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 dashboard_slides_template + if self.dashboard_slides_template: + _dict['dashboardSlidesTemplate'] = self.dashboard_slides_template.to_dict() + # override the default output from pydantic by calling `to_dict()` of widget_slides_template + if self.widget_slides_template: + _dict['widgetSlidesTemplate'] = self.widget_slides_template.to_dict() + # set to None if dashboard_slides_template (nullable) is None + # and model_fields_set contains the field + if self.dashboard_slides_template is None and "dashboard_slides_template" in self.model_fields_set: + _dict['dashboardSlidesTemplate'] = None + + # set to None if widget_slides_template (nullable) is None + # and model_fields_set contains the field + if self.widget_slides_template is None and "widget_slides_template" in self.model_fields_set: + _dict['widgetSlidesTemplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportTemplatePatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dashboardSlidesTemplate": JsonApiExportTemplateInAttributesDashboardSlidesTemplate.from_dict(obj["dashboardSlidesTemplate"]) if obj.get("dashboardSlidesTemplate") is not None else None, + "name": obj.get("name"), + "widgetSlidesTemplate": JsonApiExportTemplateInAttributesWidgetSlidesTemplate.from_dict(obj["widgetSlidesTemplate"]) if obj.get("widgetSlidesTemplate") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_template_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_patch_document.py new file mode 100644 index 000000000..d375f59f5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_export_template_patch import JsonApiExportTemplatePatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportTemplatePatchDocument(BaseModel): + """ + JsonApiExportTemplatePatchDocument + """ # noqa: E501 + data: JsonApiExportTemplatePatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiExportTemplatePatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportTemplatePatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiExportTemplatePatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_template_post_optional_id.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_post_optional_id.py new file mode 100644 index 000000000..440586929 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_post_optional_id.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_export_template_in_attributes import JsonApiExportTemplateInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportTemplatePostOptionalId(BaseModel): + """ + JSON:API representation of exportTemplate entity. + """ # noqa: E501 + attributes: JsonApiExportTemplateInAttributes + id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @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"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['exportTemplate']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('exportTemplate')") + 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 JsonApiExportTemplatePostOptionalId 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportTemplatePostOptionalId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiExportTemplateInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_export_template_post_optional_id_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_post_optional_id_document.py new file mode 100644 index 000000000..81cadeccb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_export_template_post_optional_id_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_export_template_post_optional_id import JsonApiExportTemplatePostOptionalId +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiExportTemplatePostOptionalIdDocument(BaseModel): + """ + JsonApiExportTemplatePostOptionalIdDocument + """ # noqa: E501 + data: JsonApiExportTemplatePostOptionalId + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiExportTemplatePostOptionalIdDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiExportTemplatePostOptionalIdDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiExportTemplatePostOptionalId.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_fact_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_fact_linkage.py new file mode 100644 index 000000000..1712328aa --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_fact_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiFactLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['fact']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('fact')") + 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 JsonApiFactLinkage 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 JsonApiFactLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_fact_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_fact_out.py new file mode 100644 index 000000000..5dd923bae --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_fact_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_fact_out_attributes import JsonApiFactOutAttributes +from gooddata_api_client.models.json_api_fact_out_relationships import JsonApiFactOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFactOut(BaseModel): + """ + JSON:API representation of fact entity. + """ # noqa: E501 + attributes: Optional[JsonApiFactOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiFactOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['fact']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('fact')") + 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 JsonApiFactOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFactOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiFactOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiFactOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_fact_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_fact_out_attributes.py new file mode 100644 index 000000000..160a05fbf --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_fact_out_attributes.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, 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 JsonApiFactOutAttributes(BaseModel): + """ + JsonApiFactOutAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + is_hidden: Optional[StrictBool] = Field(default=None, alias="isHidden") + is_nullable: Optional[StrictBool] = Field(default=None, alias="isNullable") + null_value: Optional[StrictStr] = Field(default=None, alias="nullValue") + source_column: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, alias="sourceColumn") + source_column_data_type: Optional[StrictStr] = Field(default=None, alias="sourceColumnDataType") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "description", "isHidden", "isNullable", "nullValue", "sourceColumn", "sourceColumnDataType", "tags", "title"] + + @field_validator('source_column_data_type') + def source_column_data_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 JsonApiFactOutAttributes 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 JsonApiFactOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "description": obj.get("description"), + "isHidden": obj.get("isHidden"), + "isNullable": obj.get("isNullable"), + "nullValue": obj.get("nullValue"), + "sourceColumn": obj.get("sourceColumn"), + "sourceColumnDataType": obj.get("sourceColumnDataType"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_fact_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_fact_out_document.py new file mode 100644 index 000000000..142a4dc85 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_fact_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_dataset_out_with_links import JsonApiDatasetOutWithLinks +from gooddata_api_client.models.json_api_fact_out import JsonApiFactOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFactOutDocument(BaseModel): + """ + JsonApiFactOutDocument + """ # noqa: E501 + data: JsonApiFactOut + included: Optional[List[JsonApiDatasetOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiFactOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFactOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiFactOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiDatasetOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_fact_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_fact_out_list.py new file mode 100644 index 000000000..5a6bafd73 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_fact_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_dataset_out_with_links import JsonApiDatasetOutWithLinks +from gooddata_api_client.models.json_api_fact_out_with_links import JsonApiFactOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFactOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiFactOutWithLinks] + included: Optional[List[JsonApiDatasetOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiFactOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFactOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiFactOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiDatasetOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_fact_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_fact_out_relationships.py new file mode 100644 index 000000000..4793075e5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_fact_out_relationships.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_relationships_dataset import JsonApiAggregatedFactOutRelationshipsDataset +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFactOutRelationships(BaseModel): + """ + JsonApiFactOutRelationships + """ # noqa: E501 + dataset: Optional[JsonApiAggregatedFactOutRelationshipsDataset] = None + __properties: ClassVar[List[str]] = ["dataset"] + + 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 JsonApiFactOutRelationships 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 dataset + if self.dataset: + _dict['dataset'] = self.dataset.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFactOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataset": JsonApiAggregatedFactOutRelationshipsDataset.from_dict(obj["dataset"]) if obj.get("dataset") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_fact_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_fact_out_with_links.py new file mode 100644 index 000000000..a64796fdb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_fact_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_fact_out_attributes import JsonApiFactOutAttributes +from gooddata_api_client.models.json_api_fact_out_relationships import JsonApiFactOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFactOutWithLinks(BaseModel): + """ + JsonApiFactOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiFactOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiFactOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['fact']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('fact')") + 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 JsonApiFactOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFactOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiFactOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiFactOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_fact_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_fact_patch.py new file mode 100644 index 000000000..036a1c792 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_fact_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_attribute_patch_attributes import JsonApiAttributePatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFactPatch(BaseModel): + """ + JSON:API representation of patching fact entity. + """ # noqa: E501 + attributes: Optional[JsonApiAttributePatchAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['fact']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('fact')") + 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 JsonApiFactPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFactPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAttributePatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_fact_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_fact_patch_document.py new file mode 100644 index 000000000..5a18895b8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_fact_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_fact_patch import JsonApiFactPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFactPatchDocument(BaseModel): + """ + JsonApiFactPatchDocument + """ # noqa: E501 + data: JsonApiFactPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiFactPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFactPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiFactPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_fact_to_one_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_fact_to_one_linkage.py new file mode 100644 index 000000000..f902cd9d8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_fact_to_one_linkage.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_fact_linkage import JsonApiFactLinkage +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIFACTTOONELINKAGE_ONE_OF_SCHEMAS = ["JsonApiFactLinkage"] + +class JsonApiFactToOneLinkage(BaseModel): + """ + References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + """ + # data type: JsonApiFactLinkage + oneof_schema_1_validator: Optional[JsonApiFactLinkage] = None + actual_instance: Optional[Union[JsonApiFactLinkage]] = None + one_of_schemas: Set[str] = { "JsonApiFactLinkage" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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): + if v is None: + return v + + instance = JsonApiFactToOneLinkage.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiFactLinkage + if not isinstance(v, JsonApiFactLinkage): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiFactLinkage`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiFactToOneLinkage with oneOf schemas: JsonApiFactLinkage. 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: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into JsonApiFactLinkage + try: + if match == 0: + instance.actual_instance = JsonApiFactLinkage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiFactToOneLinkage with oneOf schemas: JsonApiFactLinkage. 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], JsonApiFactLinkage]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_in.py new file mode 100644 index 000000000..6399b83ab --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_filter_context_in_attributes import JsonApiFilterContextInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterContextIn(BaseModel): + """ + JSON:API representation of filterContext entity. + """ # noqa: E501 + attributes: JsonApiFilterContextInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['filterContext']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('filterContext')") + 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 JsonApiFilterContextIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterContextIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiFilterContextInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_in_attributes.py new file mode 100644 index 000000000..7379af920 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_in_attributes.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterContextInAttributes(BaseModel): + """ + JsonApiFilterContextInAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + content: Dict[str, Any] = Field(description="Free-form JSON content. Maximum supported length is 250000 characters.") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "content", "description", "tags", "title"] + + 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 JsonApiFilterContextInAttributes 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 JsonApiFilterContextInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "content": obj.get("content"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_in_document.py new file mode 100644 index 000000000..f4b3e3e23 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_filter_context_in import JsonApiFilterContextIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterContextInDocument(BaseModel): + """ + JsonApiFilterContextInDocument + """ # noqa: E501 + data: JsonApiFilterContextIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiFilterContextInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterContextInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiFilterContextIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_linkage.py new file mode 100644 index 000000000..2a29025fb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiFilterContextLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['filterContext']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('filterContext')") + 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 JsonApiFilterContextLinkage 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 JsonApiFilterContextLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out.py new file mode 100644 index 000000000..668869a2a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_filter_context_in_attributes import JsonApiFilterContextInAttributes +from gooddata_api_client.models.json_api_filter_context_out_relationships import JsonApiFilterContextOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterContextOut(BaseModel): + """ + JSON:API representation of filterContext entity. + """ # noqa: E501 + attributes: JsonApiFilterContextInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiFilterContextOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['filterContext']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('filterContext')") + 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 JsonApiFilterContextOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterContextOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiFilterContextInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiFilterContextOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_document.py new file mode 100644 index 000000000..2f7fc803d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_filter_context_out import JsonApiFilterContextOut +from gooddata_api_client.models.json_api_filter_context_out_includes import JsonApiFilterContextOutIncludes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterContextOutDocument(BaseModel): + """ + JsonApiFilterContextOutDocument + """ # noqa: E501 + data: JsonApiFilterContextOut + included: Optional[List[JsonApiFilterContextOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiFilterContextOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterContextOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiFilterContextOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiFilterContextOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_includes.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_includes.py new file mode 100644 index 000000000..230029580 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_includes.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_attribute_out_with_links import JsonApiAttributeOutWithLinks +from gooddata_api_client.models.json_api_dataset_out_with_links import JsonApiDatasetOutWithLinks +from gooddata_api_client.models.json_api_label_out_with_links import JsonApiLabelOutWithLinks +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIFILTERCONTEXTOUTINCLUDES_ONE_OF_SCHEMAS = ["JsonApiAttributeOutWithLinks", "JsonApiDatasetOutWithLinks", "JsonApiLabelOutWithLinks"] + +class JsonApiFilterContextOutIncludes(BaseModel): + """ + JsonApiFilterContextOutIncludes + """ + # data type: JsonApiAttributeOutWithLinks + oneof_schema_1_validator: Optional[JsonApiAttributeOutWithLinks] = None + # data type: JsonApiDatasetOutWithLinks + oneof_schema_2_validator: Optional[JsonApiDatasetOutWithLinks] = None + # data type: JsonApiLabelOutWithLinks + oneof_schema_3_validator: Optional[JsonApiLabelOutWithLinks] = None + actual_instance: Optional[Union[JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiLabelOutWithLinks]] = None + one_of_schemas: Set[str] = { "JsonApiAttributeOutWithLinks", "JsonApiDatasetOutWithLinks", "JsonApiLabelOutWithLinks" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiFilterContextOutIncludes.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiAttributeOutWithLinks + if not isinstance(v, JsonApiAttributeOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAttributeOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiDatasetOutWithLinks + if not isinstance(v, JsonApiDatasetOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiDatasetOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiLabelOutWithLinks + if not isinstance(v, JsonApiLabelOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiLabelOutWithLinks`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiFilterContextOutIncludes with oneOf schemas: JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiLabelOutWithLinks. 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 + + # deserialize data into JsonApiAttributeOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAttributeOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiDatasetOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiDatasetOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiLabelOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiLabelOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiFilterContextOutIncludes with oneOf schemas: JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiLabelOutWithLinks. 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], JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiLabelOutWithLinks]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_list.py new file mode 100644 index 000000000..29a0c959a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_filter_context_out_includes import JsonApiFilterContextOutIncludes +from gooddata_api_client.models.json_api_filter_context_out_with_links import JsonApiFilterContextOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterContextOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiFilterContextOutWithLinks] + included: Optional[List[JsonApiFilterContextOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiFilterContextOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterContextOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiFilterContextOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiFilterContextOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_relationships.py new file mode 100644 index 000000000..479c3f1b2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_relationships.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_datasets import JsonApiAnalyticalDashboardOutRelationshipsDatasets +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_labels import JsonApiAnalyticalDashboardOutRelationshipsLabels +from gooddata_api_client.models.json_api_attribute_hierarchy_out_relationships_attributes import JsonApiAttributeHierarchyOutRelationshipsAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterContextOutRelationships(BaseModel): + """ + JsonApiFilterContextOutRelationships + """ # noqa: E501 + attributes: Optional[JsonApiAttributeHierarchyOutRelationshipsAttributes] = None + datasets: Optional[JsonApiAnalyticalDashboardOutRelationshipsDatasets] = None + labels: Optional[JsonApiAnalyticalDashboardOutRelationshipsLabels] = None + __properties: ClassVar[List[str]] = ["attributes", "datasets", "labels"] + + 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 JsonApiFilterContextOutRelationships 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of datasets + if self.datasets: + _dict['datasets'] = self.datasets.to_dict() + # override the default output from pydantic by calling `to_dict()` of labels + if self.labels: + _dict['labels'] = self.labels.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterContextOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAttributeHierarchyOutRelationshipsAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "datasets": JsonApiAnalyticalDashboardOutRelationshipsDatasets.from_dict(obj["datasets"]) if obj.get("datasets") is not None else None, + "labels": JsonApiAnalyticalDashboardOutRelationshipsLabels.from_dict(obj["labels"]) if obj.get("labels") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_with_links.py new file mode 100644 index 000000000..400da86f6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_filter_context_in_attributes import JsonApiFilterContextInAttributes +from gooddata_api_client.models.json_api_filter_context_out_relationships import JsonApiFilterContextOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterContextOutWithLinks(BaseModel): + """ + JsonApiFilterContextOutWithLinks + """ # noqa: E501 + attributes: JsonApiFilterContextInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiFilterContextOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['filterContext']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('filterContext')") + 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 JsonApiFilterContextOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterContextOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiFilterContextInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiFilterContextOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_patch.py new file mode 100644 index 000000000..e3d9ce6c2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_filter_context_patch_attributes import JsonApiFilterContextPatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterContextPatch(BaseModel): + """ + JSON:API representation of patching filterContext entity. + """ # noqa: E501 + attributes: JsonApiFilterContextPatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['filterContext']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('filterContext')") + 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 JsonApiFilterContextPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterContextPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiFilterContextPatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_patch_attributes.py new file mode 100644 index 000000000..8e4143046 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_patch_attributes.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterContextPatchAttributes(BaseModel): + """ + JsonApiFilterContextPatchAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + content: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON content. Maximum supported length is 250000 characters.") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "content", "description", "tags", "title"] + + 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 JsonApiFilterContextPatchAttributes 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 JsonApiFilterContextPatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "content": obj.get("content"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_patch_document.py new file mode 100644 index 000000000..54ec96493 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_filter_context_patch import JsonApiFilterContextPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterContextPatchDocument(BaseModel): + """ + JsonApiFilterContextPatchDocument + """ # noqa: E501 + data: JsonApiFilterContextPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiFilterContextPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterContextPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiFilterContextPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_post_optional_id.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_post_optional_id.py new file mode 100644 index 000000000..35180ac91 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_post_optional_id.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_filter_context_in_attributes import JsonApiFilterContextInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterContextPostOptionalId(BaseModel): + """ + JSON:API representation of filterContext entity. + """ # noqa: E501 + attributes: JsonApiFilterContextInAttributes + id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @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"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['filterContext']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('filterContext')") + 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 JsonApiFilterContextPostOptionalId 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterContextPostOptionalId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiFilterContextInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_post_optional_id_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_post_optional_id_document.py new file mode 100644 index 000000000..80770d264 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_context_post_optional_id_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_filter_context_post_optional_id import JsonApiFilterContextPostOptionalId +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterContextPostOptionalIdDocument(BaseModel): + """ + JsonApiFilterContextPostOptionalIdDocument + """ # noqa: E501 + data: JsonApiFilterContextPostOptionalId + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiFilterContextPostOptionalIdDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterContextPostOptionalIdDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiFilterContextPostOptionalId.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in.py new file mode 100644 index 000000000..792dd3752 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_filter_view_in_attributes import JsonApiFilterViewInAttributes +from gooddata_api_client.models.json_api_filter_view_in_relationships import JsonApiFilterViewInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterViewIn(BaseModel): + """ + JSON:API representation of filterView entity. + """ # noqa: E501 + attributes: JsonApiFilterViewInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiFilterViewInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['filterView']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('filterView')") + 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 JsonApiFilterViewIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterViewIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiFilterViewInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiFilterViewInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_attributes.py new file mode 100644 index 000000000..9650bd9f2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_attributes.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterViewInAttributes(BaseModel): + """ + JsonApiFilterViewInAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + content: Dict[str, Any] = Field(description="The respective filter context.") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + is_default: Optional[StrictBool] = Field(default=None, description="Indicator whether the filter view should by applied by default.", alias="isDefault") + tags: Optional[List[StrictStr]] = None + title: Annotated[str, Field(strict=True, max_length=255)] + __properties: ClassVar[List[str]] = ["areRelationsValid", "content", "description", "isDefault", "tags", "title"] + + 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 JsonApiFilterViewInAttributes 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 JsonApiFilterViewInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "content": obj.get("content"), + "description": obj.get("description"), + "isDefault": obj.get("isDefault"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_document.py new file mode 100644 index 000000000..42bf249fd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_filter_view_in import JsonApiFilterViewIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterViewInDocument(BaseModel): + """ + JsonApiFilterViewInDocument + """ # noqa: E501 + data: JsonApiFilterViewIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiFilterViewInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterViewInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiFilterViewIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_relationships.py new file mode 100644 index 000000000..4fde5d0c2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_relationships.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_automation_in_relationships_analytical_dashboard import JsonApiAutomationInRelationshipsAnalyticalDashboard +from gooddata_api_client.models.json_api_filter_view_in_relationships_user import JsonApiFilterViewInRelationshipsUser +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterViewInRelationships(BaseModel): + """ + JsonApiFilterViewInRelationships + """ # noqa: E501 + analytical_dashboard: Optional[JsonApiAutomationInRelationshipsAnalyticalDashboard] = Field(default=None, alias="analyticalDashboard") + user: Optional[JsonApiFilterViewInRelationshipsUser] = None + __properties: ClassVar[List[str]] = ["analyticalDashboard", "user"] + + 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 JsonApiFilterViewInRelationships 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 analytical_dashboard + if self.analytical_dashboard: + _dict['analyticalDashboard'] = self.analytical_dashboard.to_dict() + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterViewInRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyticalDashboard": JsonApiAutomationInRelationshipsAnalyticalDashboard.from_dict(obj["analyticalDashboard"]) if obj.get("analyticalDashboard") is not None else None, + "user": JsonApiFilterViewInRelationshipsUser.from_dict(obj["user"]) if obj.get("user") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_relationships_user.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_relationships_user.py new file mode 100644 index 000000000..dad6fca85 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_in_relationships_user.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_user_to_one_linkage import JsonApiUserToOneLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterViewInRelationshipsUser(BaseModel): + """ + JsonApiFilterViewInRelationshipsUser + """ # noqa: E501 + data: Optional[JsonApiUserToOneLinkage] + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiFilterViewInRelationshipsUser 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterViewInRelationshipsUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserToOneLinkage.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out.py new file mode 100644 index 000000000..1a8fd8b6b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_filter_view_in_attributes import JsonApiFilterViewInAttributes +from gooddata_api_client.models.json_api_filter_view_in_relationships import JsonApiFilterViewInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterViewOut(BaseModel): + """ + JSON:API representation of filterView entity. + """ # noqa: E501 + attributes: JsonApiFilterViewInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiFilterViewInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['filterView']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('filterView')") + 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 JsonApiFilterViewOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterViewOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiFilterViewInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiFilterViewInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_document.py new file mode 100644 index 000000000..efaa4630a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_filter_view_out import JsonApiFilterViewOut +from gooddata_api_client.models.json_api_filter_view_out_includes import JsonApiFilterViewOutIncludes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterViewOutDocument(BaseModel): + """ + JsonApiFilterViewOutDocument + """ # noqa: E501 + data: JsonApiFilterViewOut + included: Optional[List[JsonApiFilterViewOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiFilterViewOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterViewOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiFilterViewOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiFilterViewOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_includes.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_includes.py new file mode 100644 index 000000000..6b4d680ba --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_includes.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_analytical_dashboard_out_with_links import JsonApiAnalyticalDashboardOutWithLinks +from gooddata_api_client.models.json_api_user_out_with_links import JsonApiUserOutWithLinks +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIFILTERVIEWOUTINCLUDES_ONE_OF_SCHEMAS = ["JsonApiAnalyticalDashboardOutWithLinks", "JsonApiUserOutWithLinks"] + +class JsonApiFilterViewOutIncludes(BaseModel): + """ + JsonApiFilterViewOutIncludes + """ + # data type: JsonApiAnalyticalDashboardOutWithLinks + oneof_schema_1_validator: Optional[JsonApiAnalyticalDashboardOutWithLinks] = None + # data type: JsonApiUserOutWithLinks + oneof_schema_2_validator: Optional[JsonApiUserOutWithLinks] = None + actual_instance: Optional[Union[JsonApiAnalyticalDashboardOutWithLinks, JsonApiUserOutWithLinks]] = None + one_of_schemas: Set[str] = { "JsonApiAnalyticalDashboardOutWithLinks", "JsonApiUserOutWithLinks" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiFilterViewOutIncludes.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiAnalyticalDashboardOutWithLinks + if not isinstance(v, JsonApiAnalyticalDashboardOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAnalyticalDashboardOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiUserOutWithLinks + if not isinstance(v, JsonApiUserOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserOutWithLinks`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiFilterViewOutIncludes with oneOf schemas: JsonApiAnalyticalDashboardOutWithLinks, JsonApiUserOutWithLinks. 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 + + # deserialize data into JsonApiAnalyticalDashboardOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAnalyticalDashboardOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiUserOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiUserOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiFilterViewOutIncludes with oneOf schemas: JsonApiAnalyticalDashboardOutWithLinks, JsonApiUserOutWithLinks. 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], JsonApiAnalyticalDashboardOutWithLinks, JsonApiUserOutWithLinks]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_list.py new file mode 100644 index 000000000..0a6eb280c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_filter_view_out_includes import JsonApiFilterViewOutIncludes +from gooddata_api_client.models.json_api_filter_view_out_with_links import JsonApiFilterViewOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterViewOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiFilterViewOutWithLinks] + included: Optional[List[JsonApiFilterViewOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiFilterViewOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterViewOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiFilterViewOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiFilterViewOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_with_links.py new file mode 100644 index 000000000..c1ac89bbf --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_out_with_links.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_filter_view_in_attributes import JsonApiFilterViewInAttributes +from gooddata_api_client.models.json_api_filter_view_in_relationships import JsonApiFilterViewInRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterViewOutWithLinks(BaseModel): + """ + JsonApiFilterViewOutWithLinks + """ # noqa: E501 + attributes: JsonApiFilterViewInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiFilterViewInRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['filterView']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('filterView')") + 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 JsonApiFilterViewOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterViewOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiFilterViewInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiFilterViewInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_patch.py new file mode 100644 index 000000000..189480353 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_patch.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_filter_view_in_relationships import JsonApiFilterViewInRelationships +from gooddata_api_client.models.json_api_filter_view_patch_attributes import JsonApiFilterViewPatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterViewPatch(BaseModel): + """ + JSON:API representation of patching filterView entity. + """ # noqa: E501 + attributes: JsonApiFilterViewPatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiFilterViewInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['filterView']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('filterView')") + 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 JsonApiFilterViewPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterViewPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiFilterViewPatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiFilterViewInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_patch_attributes.py new file mode 100644 index 000000000..f26e0598c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_patch_attributes.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterViewPatchAttributes(BaseModel): + """ + JsonApiFilterViewPatchAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + content: Optional[Dict[str, Any]] = Field(default=None, description="The respective filter context.") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + is_default: Optional[StrictBool] = Field(default=None, description="Indicator whether the filter view should by applied by default.", alias="isDefault") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "content", "description", "isDefault", "tags", "title"] + + 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 JsonApiFilterViewPatchAttributes 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 JsonApiFilterViewPatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "content": obj.get("content"), + "description": obj.get("description"), + "isDefault": obj.get("isDefault"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_patch_document.py new file mode 100644 index 000000000..2785def14 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_filter_view_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_filter_view_patch import JsonApiFilterViewPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiFilterViewPatchDocument(BaseModel): + """ + JsonApiFilterViewPatchDocument + """ # noqa: E501 + data: JsonApiFilterViewPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiFilterViewPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiFilterViewPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiFilterViewPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_in.py new file mode 100644 index 000000000..89d40ba55 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_identity_provider_in_attributes import JsonApiIdentityProviderInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiIdentityProviderIn(BaseModel): + """ + JSON:API representation of identityProvider entity. + """ # noqa: E501 + attributes: Optional[JsonApiIdentityProviderInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['identityProvider']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('identityProvider')") + 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 JsonApiIdentityProviderIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiIdentityProviderIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiIdentityProviderInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_in_attributes.py new file mode 100644 index 000000000..a73496fca --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_in_attributes.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiIdentityProviderInAttributes(BaseModel): + """ + JsonApiIdentityProviderInAttributes + """ # noqa: E501 + custom_claim_mapping: Optional[Dict[str, StrictStr]] = Field(default=None, description="Map of custom claim overrides. To be used when your Idp does not provide default claims (sub, email, name, given_name, family_name). Define the key pair for the claim you wish to override, where the key is the default name of the attribute and the value is your custom name for the given attribute.", alias="customClaimMapping") + identifiers: Optional[List[StrictStr]] = Field(default=None, description="List of identifiers for this IdP, where an identifier is a domain name. Users with email addresses belonging to these domains will be authenticated by this IdP.") + idp_type: Optional[StrictStr] = Field(default=None, description="Type of IdP for management purposes. MANAGED_IDP represents a GoodData managed IdP used in single OIDC setup, which is protected from altering/deletion. FIM_IDP represents a GoodData managed IdP used in federated identity management setup, which is protected from altering/deletion. DEX_IDP represents internal Dex IdP which is protected from altering/deletion. CUSTOM_IDP represents customer's own IdP, protected from deletion if currently used by org for authentication, deletable otherwise.", alias="idpType") + oauth_client_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The OAuth client id of your OIDC provider. This field is mandatory for OIDC IdP.", alias="oauthClientId") + oauth_client_secret: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The OAuth client secret of your OIDC provider. This field is mandatory for OIDC IdP.", alias="oauthClientSecret") + oauth_custom_auth_attributes: Optional[Dict[str, StrictStr]] = Field(default=None, description="Map of additional authentication attributes that should be added to the OAuth2 authentication requests, where the key is the name of the attribute and the value is the value of the attribute.", alias="oauthCustomAuthAttributes") + oauth_custom_scopes: Optional[List[Annotated[str, Field(strict=True, max_length=255)]]] = Field(default=None, description="List of additional OAuth scopes which may be required by other providers (e.g. Snowflake)", alias="oauthCustomScopes") + oauth_issuer_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Any string identifying the OIDC provider. This value is used as suffix for OAuth2 callback (redirect) URL. If not defined, the standard callback URL is used. This value is valid only for external OIDC providers, not for the internal DEX provider.", alias="oauthIssuerId") + oauth_issuer_location: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The location of your OIDC provider. This field is mandatory for OIDC IdP.", alias="oauthIssuerLocation") + oauth_subject_id_claim: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Any string identifying the claim in ID token, that should be used for user identification. The default value is 'sub'.", alias="oauthSubjectIdClaim") + saml_metadata: Optional[Annotated[str, Field(strict=True, max_length=15000)]] = Field(default=None, description="Base64 encoded xml document with SAML metadata. This document is issued by your SAML provider. It includes the issuer's name, expiration information, and keys that can be used to validate the response from the identity provider. This field is mandatory for SAML IdP.", alias="samlMetadata") + __properties: ClassVar[List[str]] = ["customClaimMapping", "identifiers", "idpType", "oauthClientId", "oauthClientSecret", "oauthCustomAuthAttributes", "oauthCustomScopes", "oauthIssuerId", "oauthIssuerLocation", "oauthSubjectIdClaim", "samlMetadata"] + + @field_validator('idp_type') + def idp_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['MANAGED_IDP', 'FIM_IDP', 'DEX_IDP', 'CUSTOM_IDP']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MANAGED_IDP', 'FIM_IDP', 'DEX_IDP', 'CUSTOM_IDP')") + 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 JsonApiIdentityProviderInAttributes 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 oauth_custom_scopes (nullable) is None + # and model_fields_set contains the field + if self.oauth_custom_scopes is None and "oauth_custom_scopes" in self.model_fields_set: + _dict['oauthCustomScopes'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiIdentityProviderInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customClaimMapping": obj.get("customClaimMapping"), + "identifiers": obj.get("identifiers"), + "idpType": obj.get("idpType"), + "oauthClientId": obj.get("oauthClientId"), + "oauthClientSecret": obj.get("oauthClientSecret"), + "oauthCustomAuthAttributes": obj.get("oauthCustomAuthAttributes"), + "oauthCustomScopes": obj.get("oauthCustomScopes"), + "oauthIssuerId": obj.get("oauthIssuerId"), + "oauthIssuerLocation": obj.get("oauthIssuerLocation"), + "oauthSubjectIdClaim": obj.get("oauthSubjectIdClaim"), + "samlMetadata": obj.get("samlMetadata") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_in_document.py new file mode 100644 index 000000000..594a7205a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_identity_provider_in import JsonApiIdentityProviderIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiIdentityProviderInDocument(BaseModel): + """ + JsonApiIdentityProviderInDocument + """ # noqa: E501 + data: JsonApiIdentityProviderIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiIdentityProviderInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiIdentityProviderInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiIdentityProviderIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_linkage.py new file mode 100644 index 000000000..ad29f243c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiIdentityProviderLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['identityProvider']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('identityProvider')") + 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 JsonApiIdentityProviderLinkage 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 JsonApiIdentityProviderLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out.py new file mode 100644 index 000000000..c071fd2b1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_identity_provider_out_attributes import JsonApiIdentityProviderOutAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiIdentityProviderOut(BaseModel): + """ + JSON:API representation of identityProvider entity. + """ # noqa: E501 + attributes: Optional[JsonApiIdentityProviderOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['identityProvider']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('identityProvider')") + 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 JsonApiIdentityProviderOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiIdentityProviderOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiIdentityProviderOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_attributes.py new file mode 100644 index 000000000..2312f43bc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_attributes.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiIdentityProviderOutAttributes(BaseModel): + """ + JsonApiIdentityProviderOutAttributes + """ # noqa: E501 + custom_claim_mapping: Optional[Dict[str, StrictStr]] = Field(default=None, description="Map of custom claim overrides. To be used when your Idp does not provide default claims (sub, email, name, given_name, family_name). Define the key pair for the claim you wish to override, where the key is the default name of the attribute and the value is your custom name for the given attribute.", alias="customClaimMapping") + identifiers: Optional[List[StrictStr]] = Field(default=None, description="List of identifiers for this IdP, where an identifier is a domain name. Users with email addresses belonging to these domains will be authenticated by this IdP.") + idp_type: Optional[StrictStr] = Field(default=None, description="Type of IdP for management purposes. MANAGED_IDP represents a GoodData managed IdP used in single OIDC setup, which is protected from altering/deletion. FIM_IDP represents a GoodData managed IdP used in federated identity management setup, which is protected from altering/deletion. DEX_IDP represents internal Dex IdP which is protected from altering/deletion. CUSTOM_IDP represents customer's own IdP, protected from deletion if currently used by org for authentication, deletable otherwise.", alias="idpType") + oauth_client_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The OAuth client id of your OIDC provider. This field is mandatory for OIDC IdP.", alias="oauthClientId") + oauth_custom_auth_attributes: Optional[Dict[str, StrictStr]] = Field(default=None, description="Map of additional authentication attributes that should be added to the OAuth2 authentication requests, where the key is the name of the attribute and the value is the value of the attribute.", alias="oauthCustomAuthAttributes") + oauth_custom_scopes: Optional[List[Annotated[str, Field(strict=True, max_length=255)]]] = Field(default=None, description="List of additional OAuth scopes which may be required by other providers (e.g. Snowflake)", alias="oauthCustomScopes") + oauth_issuer_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Any string identifying the OIDC provider. This value is used as suffix for OAuth2 callback (redirect) URL. If not defined, the standard callback URL is used. This value is valid only for external OIDC providers, not for the internal DEX provider.", alias="oauthIssuerId") + oauth_issuer_location: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The location of your OIDC provider. This field is mandatory for OIDC IdP.", alias="oauthIssuerLocation") + oauth_subject_id_claim: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Any string identifying the claim in ID token, that should be used for user identification. The default value is 'sub'.", alias="oauthSubjectIdClaim") + __properties: ClassVar[List[str]] = ["customClaimMapping", "identifiers", "idpType", "oauthClientId", "oauthCustomAuthAttributes", "oauthCustomScopes", "oauthIssuerId", "oauthIssuerLocation", "oauthSubjectIdClaim"] + + @field_validator('idp_type') + def idp_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['MANAGED_IDP', 'FIM_IDP', 'DEX_IDP', 'CUSTOM_IDP']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MANAGED_IDP', 'FIM_IDP', 'DEX_IDP', 'CUSTOM_IDP')") + 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 JsonApiIdentityProviderOutAttributes 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 oauth_custom_scopes (nullable) is None + # and model_fields_set contains the field + if self.oauth_custom_scopes is None and "oauth_custom_scopes" in self.model_fields_set: + _dict['oauthCustomScopes'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiIdentityProviderOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customClaimMapping": obj.get("customClaimMapping"), + "identifiers": obj.get("identifiers"), + "idpType": obj.get("idpType"), + "oauthClientId": obj.get("oauthClientId"), + "oauthCustomAuthAttributes": obj.get("oauthCustomAuthAttributes"), + "oauthCustomScopes": obj.get("oauthCustomScopes"), + "oauthIssuerId": obj.get("oauthIssuerId"), + "oauthIssuerLocation": obj.get("oauthIssuerLocation"), + "oauthSubjectIdClaim": obj.get("oauthSubjectIdClaim") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_document.py new file mode 100644 index 000000000..81ac56560 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_identity_provider_out import JsonApiIdentityProviderOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiIdentityProviderOutDocument(BaseModel): + """ + JsonApiIdentityProviderOutDocument + """ # noqa: E501 + data: JsonApiIdentityProviderOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiIdentityProviderOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiIdentityProviderOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiIdentityProviderOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_list.py new file mode 100644 index 000000000..5f63dabcc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_identity_provider_out_with_links import JsonApiIdentityProviderOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiIdentityProviderOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiIdentityProviderOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiIdentityProviderOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiIdentityProviderOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiIdentityProviderOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_with_links.py new file mode 100644 index 000000000..ce513108a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_identity_provider_out_attributes import JsonApiIdentityProviderOutAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiIdentityProviderOutWithLinks(BaseModel): + """ + JsonApiIdentityProviderOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiIdentityProviderOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['identityProvider']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('identityProvider')") + 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 JsonApiIdentityProviderOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiIdentityProviderOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiIdentityProviderOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_patch.py new file mode 100644 index 000000000..f309e4b90 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_identity_provider_in_attributes import JsonApiIdentityProviderInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiIdentityProviderPatch(BaseModel): + """ + JSON:API representation of patching identityProvider entity. + """ # noqa: E501 + attributes: Optional[JsonApiIdentityProviderInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['identityProvider']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('identityProvider')") + 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 JsonApiIdentityProviderPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiIdentityProviderPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiIdentityProviderInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_patch_document.py new file mode 100644 index 000000000..dac025aa2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_identity_provider_patch import JsonApiIdentityProviderPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiIdentityProviderPatchDocument(BaseModel): + """ + JsonApiIdentityProviderPatchDocument + """ # noqa: E501 + data: JsonApiIdentityProviderPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiIdentityProviderPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiIdentityProviderPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiIdentityProviderPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_to_one_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_to_one_linkage.py new file mode 100644 index 000000000..eb9007253 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_identity_provider_to_one_linkage.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_identity_provider_linkage import JsonApiIdentityProviderLinkage +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIIDENTITYPROVIDERTOONELINKAGE_ONE_OF_SCHEMAS = ["JsonApiIdentityProviderLinkage"] + +class JsonApiIdentityProviderToOneLinkage(BaseModel): + """ + References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + """ + # data type: JsonApiIdentityProviderLinkage + oneof_schema_1_validator: Optional[JsonApiIdentityProviderLinkage] = None + actual_instance: Optional[Union[JsonApiIdentityProviderLinkage]] = None + one_of_schemas: Set[str] = { "JsonApiIdentityProviderLinkage" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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): + if v is None: + return v + + instance = JsonApiIdentityProviderToOneLinkage.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiIdentityProviderLinkage + if not isinstance(v, JsonApiIdentityProviderLinkage): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiIdentityProviderLinkage`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiIdentityProviderToOneLinkage with oneOf schemas: JsonApiIdentityProviderLinkage. 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: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into JsonApiIdentityProviderLinkage + try: + if match == 0: + instance.actual_instance = JsonApiIdentityProviderLinkage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiIdentityProviderToOneLinkage with oneOf schemas: JsonApiIdentityProviderLinkage. 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], JsonApiIdentityProviderLinkage]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_jwk_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_in.py new file mode 100644 index 000000000..3ab170673 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_jwk_in_attributes import JsonApiJwkInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiJwkIn(BaseModel): + """ + JSON:API representation of jwk entity. + """ # noqa: E501 + attributes: Optional[JsonApiJwkInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['jwk']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('jwk')") + 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 JsonApiJwkIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiJwkIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiJwkInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_jwk_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_in_attributes.py new file mode 100644 index 000000000..c3a3db7f0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_in_attributes.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_jwk_in_attributes_content import JsonApiJwkInAttributesContent +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiJwkInAttributes(BaseModel): + """ + JsonApiJwkInAttributes + """ # noqa: E501 + content: Optional[JsonApiJwkInAttributesContent] = None + __properties: ClassVar[List[str]] = ["content"] + + 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 JsonApiJwkInAttributes 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiJwkInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": JsonApiJwkInAttributesContent.from_dict(obj["content"]) if obj.get("content") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_jwk_in_attributes_content.py b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_in_attributes_content.py new file mode 100644 index 000000000..5ac3caa94 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_in_attributes_content.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.rsa_specification import RsaSpecification +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIJWKINATTRIBUTESCONTENT_ONE_OF_SCHEMAS = ["RsaSpecification"] + +class JsonApiJwkInAttributesContent(BaseModel): + """ + Specification of the cryptographic key + """ + # data type: RsaSpecification + oneof_schema_1_validator: Optional[RsaSpecification] = None + actual_instance: Optional[Union[RsaSpecification]] = None + one_of_schemas: Set[str] = { "RsaSpecification" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiJwkInAttributesContent.model_construct() + error_messages = [] + match = 0 + # validate data type: RsaSpecification + if not isinstance(v, RsaSpecification): + error_messages.append(f"Error! Input type `{type(v)}` is not `RsaSpecification`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiJwkInAttributesContent with oneOf schemas: RsaSpecification. 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 + + # deserialize data into RsaSpecification + try: + if match == 0: + instance.actual_instance = RsaSpecification.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiJwkInAttributesContent with oneOf schemas: RsaSpecification. 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], RsaSpecification]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_jwk_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_in_document.py new file mode 100644 index 000000000..9f38ed32b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_jwk_in import JsonApiJwkIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiJwkInDocument(BaseModel): + """ + JsonApiJwkInDocument + """ # noqa: E501 + data: JsonApiJwkIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiJwkInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiJwkInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiJwkIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_jwk_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_out.py new file mode 100644 index 000000000..1811f7c57 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_jwk_in_attributes import JsonApiJwkInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiJwkOut(BaseModel): + """ + JSON:API representation of jwk entity. + """ # noqa: E501 + attributes: Optional[JsonApiJwkInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['jwk']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('jwk')") + 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 JsonApiJwkOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiJwkOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiJwkInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_jwk_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_out_document.py new file mode 100644 index 000000000..e7a5ce469 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_jwk_out import JsonApiJwkOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiJwkOutDocument(BaseModel): + """ + JsonApiJwkOutDocument + """ # noqa: E501 + data: JsonApiJwkOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiJwkOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiJwkOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiJwkOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_jwk_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_out_list.py new file mode 100644 index 000000000..83c4c0d8b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_jwk_out_with_links import JsonApiJwkOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiJwkOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiJwkOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiJwkOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiJwkOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiJwkOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_jwk_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_out_with_links.py new file mode 100644 index 000000000..78dd810d2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_jwk_in_attributes import JsonApiJwkInAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiJwkOutWithLinks(BaseModel): + """ + JsonApiJwkOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiJwkInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['jwk']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('jwk')") + 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 JsonApiJwkOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiJwkOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiJwkInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_jwk_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_patch.py new file mode 100644 index 000000000..520c55473 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_jwk_in_attributes import JsonApiJwkInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiJwkPatch(BaseModel): + """ + JSON:API representation of patching jwk entity. + """ # noqa: E501 + attributes: Optional[JsonApiJwkInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['jwk']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('jwk')") + 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 JsonApiJwkPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiJwkPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiJwkInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_jwk_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_patch_document.py new file mode 100644 index 000000000..4216d7685 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_jwk_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_jwk_patch import JsonApiJwkPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiJwkPatchDocument(BaseModel): + """ + JsonApiJwkPatchDocument + """ # noqa: E501 + data: JsonApiJwkPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiJwkPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiJwkPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiJwkPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in.py new file mode 100644 index 000000000..cd8ea7e46 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_knowledge_recommendation_in_attributes import JsonApiKnowledgeRecommendationInAttributes +from gooddata_api_client.models.json_api_knowledge_recommendation_in_relationships import JsonApiKnowledgeRecommendationInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiKnowledgeRecommendationIn(BaseModel): + """ + JSON:API representation of knowledgeRecommendation entity. + """ # noqa: E501 + attributes: JsonApiKnowledgeRecommendationInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: JsonApiKnowledgeRecommendationInRelationships + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['knowledgeRecommendation']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('knowledgeRecommendation')") + 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 JsonApiKnowledgeRecommendationIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiKnowledgeRecommendationInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiKnowledgeRecommendationInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_attributes.py new file mode 100644 index 000000000..9dfc36239 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_attributes.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictInt, 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 JsonApiKnowledgeRecommendationInAttributes(BaseModel): + """ + JsonApiKnowledgeRecommendationInAttributes + """ # noqa: E501 + analytical_dashboard_title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Human-readable title of the analytical dashboard (denormalized for display)", alias="analyticalDashboardTitle") + analyzed_period: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Analyzed time period (e.g., '2023-07' or 'July 2023')", alias="analyzedPeriod") + analyzed_value: Optional[Any] = Field(default=None, description="Metric value in the analyzed period (the observed value that triggered the anomaly)", alias="analyzedValue") + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + comparison_type: StrictStr = Field(description="Time period for comparison", alias="comparisonType") + confidence: Optional[Any] = Field(default=None, description="Confidence score (0.0 to 1.0)") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Description of the recommendation") + direction: StrictStr = Field(description="Direction of the metric change") + metric_title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Human-readable title of the metric (denormalized for display)", alias="metricTitle") + recommendations: Optional[Dict[str, Any]] = Field(default=None, description="Structured recommendations data as JSON") + reference_period: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Reference time period for comparison (e.g., '2023-06' or 'Jun 2023')", alias="referencePeriod") + reference_value: Optional[Any] = Field(default=None, description="Metric value in the reference period", alias="referenceValue") + source_count: Optional[StrictInt] = Field(default=None, description="Number of source documents used for generation", alias="sourceCount") + tags: Optional[List[StrictStr]] = None + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Human-readable title for the recommendation, e.g. 'Revenue decreased vs last month'") + widget_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="ID of the widget where the anomaly was detected", alias="widgetId") + widget_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Name of the widget where the anomaly was detected", alias="widgetName") + __properties: ClassVar[List[str]] = ["analyticalDashboardTitle", "analyzedPeriod", "analyzedValue", "areRelationsValid", "comparisonType", "confidence", "description", "direction", "metricTitle", "recommendations", "referencePeriod", "referenceValue", "sourceCount", "tags", "title", "widgetId", "widgetName"] + + @field_validator('comparison_type') + def comparison_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['MONTH', 'QUARTER', 'YEAR']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MONTH', 'QUARTER', 'YEAR')") + return value + + @field_validator('direction') + def direction_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['INCREASED', 'DECREASED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INCREASED', 'DECREASED')") + 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 JsonApiKnowledgeRecommendationInAttributes 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 analyzed_value (nullable) is None + # and model_fields_set contains the field + if self.analyzed_value is None and "analyzed_value" in self.model_fields_set: + _dict['analyzedValue'] = None + + # set to None if confidence (nullable) is None + # and model_fields_set contains the field + if self.confidence is None and "confidence" in self.model_fields_set: + _dict['confidence'] = None + + # set to None if reference_value (nullable) is None + # and model_fields_set contains the field + if self.reference_value is None and "reference_value" in self.model_fields_set: + _dict['referenceValue'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyticalDashboardTitle": obj.get("analyticalDashboardTitle"), + "analyzedPeriod": obj.get("analyzedPeriod"), + "analyzedValue": obj.get("analyzedValue"), + "areRelationsValid": obj.get("areRelationsValid"), + "comparisonType": obj.get("comparisonType"), + "confidence": obj.get("confidence"), + "description": obj.get("description"), + "direction": obj.get("direction"), + "metricTitle": obj.get("metricTitle"), + "recommendations": obj.get("recommendations"), + "referencePeriod": obj.get("referencePeriod"), + "referenceValue": obj.get("referenceValue"), + "sourceCount": obj.get("sourceCount"), + "tags": obj.get("tags"), + "title": obj.get("title"), + "widgetId": obj.get("widgetId"), + "widgetName": obj.get("widgetName") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_document.py new file mode 100644 index 000000000..6c4dca888 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_knowledge_recommendation_in import JsonApiKnowledgeRecommendationIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiKnowledgeRecommendationInDocument(BaseModel): + """ + JsonApiKnowledgeRecommendationInDocument + """ # noqa: E501 + data: JsonApiKnowledgeRecommendationIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiKnowledgeRecommendationInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiKnowledgeRecommendationIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_relationships.py new file mode 100644 index 000000000..99816bfde --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_relationships.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_automation_in_relationships_analytical_dashboard import JsonApiAutomationInRelationshipsAnalyticalDashboard +from gooddata_api_client.models.json_api_knowledge_recommendation_in_relationships_metric import JsonApiKnowledgeRecommendationInRelationshipsMetric +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiKnowledgeRecommendationInRelationships(BaseModel): + """ + JsonApiKnowledgeRecommendationInRelationships + """ # noqa: E501 + analytical_dashboard: Optional[JsonApiAutomationInRelationshipsAnalyticalDashboard] = Field(default=None, alias="analyticalDashboard") + metric: JsonApiKnowledgeRecommendationInRelationshipsMetric + __properties: ClassVar[List[str]] = ["analyticalDashboard", "metric"] + + 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 JsonApiKnowledgeRecommendationInRelationships 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 analytical_dashboard + if self.analytical_dashboard: + _dict['analyticalDashboard'] = self.analytical_dashboard.to_dict() + # override the default output from pydantic by calling `to_dict()` of metric + if self.metric: + _dict['metric'] = self.metric.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationInRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyticalDashboard": JsonApiAutomationInRelationshipsAnalyticalDashboard.from_dict(obj["analyticalDashboard"]) if obj.get("analyticalDashboard") is not None else None, + "metric": JsonApiKnowledgeRecommendationInRelationshipsMetric.from_dict(obj["metric"]) if obj.get("metric") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_relationships_metric.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_relationships_metric.py new file mode 100644 index 000000000..600dbae46 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_in_relationships_metric.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_metric_to_one_linkage import JsonApiMetricToOneLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiKnowledgeRecommendationInRelationshipsMetric(BaseModel): + """ + JsonApiKnowledgeRecommendationInRelationshipsMetric + """ # noqa: E501 + data: Optional[JsonApiMetricToOneLinkage] + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiKnowledgeRecommendationInRelationshipsMetric 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationInRelationshipsMetric from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiMetricToOneLinkage.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out.py new file mode 100644 index 000000000..fdc5fca92 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_knowledge_recommendation_out_attributes import JsonApiKnowledgeRecommendationOutAttributes +from gooddata_api_client.models.json_api_knowledge_recommendation_out_relationships import JsonApiKnowledgeRecommendationOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiKnowledgeRecommendationOut(BaseModel): + """ + JSON:API representation of knowledgeRecommendation entity. + """ # noqa: E501 + attributes: JsonApiKnowledgeRecommendationOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiKnowledgeRecommendationOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['knowledgeRecommendation']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('knowledgeRecommendation')") + 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 JsonApiKnowledgeRecommendationOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiKnowledgeRecommendationOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiKnowledgeRecommendationOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_attributes.py new file mode 100644 index 000000000..3ec0b796d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_attributes.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, 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 JsonApiKnowledgeRecommendationOutAttributes(BaseModel): + """ + JsonApiKnowledgeRecommendationOutAttributes + """ # noqa: E501 + analytical_dashboard_title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Human-readable title of the analytical dashboard (denormalized for display)", alias="analyticalDashboardTitle") + analyzed_period: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Analyzed time period (e.g., '2023-07' or 'July 2023')", alias="analyzedPeriod") + analyzed_value: Optional[Any] = Field(default=None, description="Metric value in the analyzed period (the observed value that triggered the anomaly)", alias="analyzedValue") + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + comparison_type: StrictStr = Field(description="Time period for comparison", alias="comparisonType") + confidence: Optional[Any] = Field(default=None, description="Confidence score (0.0 to 1.0)") + created_at: Optional[datetime] = Field(default=None, alias="createdAt") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Description of the recommendation") + direction: StrictStr = Field(description="Direction of the metric change") + metric_title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Human-readable title of the metric (denormalized for display)", alias="metricTitle") + recommendations: Optional[Dict[str, Any]] = Field(default=None, description="Structured recommendations data as JSON") + reference_period: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Reference time period for comparison (e.g., '2023-06' or 'Jun 2023')", alias="referencePeriod") + reference_value: Optional[Any] = Field(default=None, description="Metric value in the reference period", alias="referenceValue") + source_count: Optional[StrictInt] = Field(default=None, description="Number of source documents used for generation", alias="sourceCount") + tags: Optional[List[StrictStr]] = None + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Human-readable title for the recommendation, e.g. 'Revenue decreased vs last month'") + widget_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="ID of the widget where the anomaly was detected", alias="widgetId") + widget_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Name of the widget where the anomaly was detected", alias="widgetName") + __properties: ClassVar[List[str]] = ["analyticalDashboardTitle", "analyzedPeriod", "analyzedValue", "areRelationsValid", "comparisonType", "confidence", "createdAt", "description", "direction", "metricTitle", "recommendations", "referencePeriod", "referenceValue", "sourceCount", "tags", "title", "widgetId", "widgetName"] + + @field_validator('comparison_type') + def comparison_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['MONTH', 'QUARTER', 'YEAR']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MONTH', 'QUARTER', 'YEAR')") + return value + + @field_validator('direction') + def direction_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['INCREASED', 'DECREASED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INCREASED', 'DECREASED')") + 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 JsonApiKnowledgeRecommendationOutAttributes 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 analyzed_value (nullable) is None + # and model_fields_set contains the field + if self.analyzed_value is None and "analyzed_value" in self.model_fields_set: + _dict['analyzedValue'] = None + + # set to None if confidence (nullable) is None + # and model_fields_set contains the field + if self.confidence is None and "confidence" in self.model_fields_set: + _dict['confidence'] = None + + # set to None if reference_value (nullable) is None + # and model_fields_set contains the field + if self.reference_value is None and "reference_value" in self.model_fields_set: + _dict['referenceValue'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyticalDashboardTitle": obj.get("analyticalDashboardTitle"), + "analyzedPeriod": obj.get("analyzedPeriod"), + "analyzedValue": obj.get("analyzedValue"), + "areRelationsValid": obj.get("areRelationsValid"), + "comparisonType": obj.get("comparisonType"), + "confidence": obj.get("confidence"), + "createdAt": obj.get("createdAt"), + "description": obj.get("description"), + "direction": obj.get("direction"), + "metricTitle": obj.get("metricTitle"), + "recommendations": obj.get("recommendations"), + "referencePeriod": obj.get("referencePeriod"), + "referenceValue": obj.get("referenceValue"), + "sourceCount": obj.get("sourceCount"), + "tags": obj.get("tags"), + "title": obj.get("title"), + "widgetId": obj.get("widgetId"), + "widgetName": obj.get("widgetName") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_document.py new file mode 100644 index 000000000..a055cdd27 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_knowledge_recommendation_out import JsonApiKnowledgeRecommendationOut +from gooddata_api_client.models.json_api_knowledge_recommendation_out_includes import JsonApiKnowledgeRecommendationOutIncludes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiKnowledgeRecommendationOutDocument(BaseModel): + """ + JsonApiKnowledgeRecommendationOutDocument + """ # noqa: E501 + data: JsonApiKnowledgeRecommendationOut + included: Optional[List[JsonApiKnowledgeRecommendationOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiKnowledgeRecommendationOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiKnowledgeRecommendationOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiKnowledgeRecommendationOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_includes.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_includes.py new file mode 100644 index 000000000..fbb25a7f6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_includes.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_analytical_dashboard_out_with_links import JsonApiAnalyticalDashboardOutWithLinks +from gooddata_api_client.models.json_api_metric_out_with_links import JsonApiMetricOutWithLinks +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIKNOWLEDGERECOMMENDATIONOUTINCLUDES_ONE_OF_SCHEMAS = ["JsonApiAnalyticalDashboardOutWithLinks", "JsonApiMetricOutWithLinks"] + +class JsonApiKnowledgeRecommendationOutIncludes(BaseModel): + """ + JsonApiKnowledgeRecommendationOutIncludes + """ + # data type: JsonApiMetricOutWithLinks + oneof_schema_1_validator: Optional[JsonApiMetricOutWithLinks] = None + # data type: JsonApiAnalyticalDashboardOutWithLinks + oneof_schema_2_validator: Optional[JsonApiAnalyticalDashboardOutWithLinks] = None + actual_instance: Optional[Union[JsonApiAnalyticalDashboardOutWithLinks, JsonApiMetricOutWithLinks]] = None + one_of_schemas: Set[str] = { "JsonApiAnalyticalDashboardOutWithLinks", "JsonApiMetricOutWithLinks" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiKnowledgeRecommendationOutIncludes.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiMetricOutWithLinks + if not isinstance(v, JsonApiMetricOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiMetricOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiAnalyticalDashboardOutWithLinks + if not isinstance(v, JsonApiAnalyticalDashboardOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAnalyticalDashboardOutWithLinks`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiKnowledgeRecommendationOutIncludes with oneOf schemas: JsonApiAnalyticalDashboardOutWithLinks, JsonApiMetricOutWithLinks. 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 + + # deserialize data into JsonApiMetricOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiMetricOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiAnalyticalDashboardOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAnalyticalDashboardOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiKnowledgeRecommendationOutIncludes with oneOf schemas: JsonApiAnalyticalDashboardOutWithLinks, JsonApiMetricOutWithLinks. 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], JsonApiAnalyticalDashboardOutWithLinks, JsonApiMetricOutWithLinks]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_list.py new file mode 100644 index 000000000..74f500715 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_knowledge_recommendation_out_includes import JsonApiKnowledgeRecommendationOutIncludes +from gooddata_api_client.models.json_api_knowledge_recommendation_out_with_links import JsonApiKnowledgeRecommendationOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiKnowledgeRecommendationOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiKnowledgeRecommendationOutWithLinks] + included: Optional[List[JsonApiKnowledgeRecommendationOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiKnowledgeRecommendationOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiKnowledgeRecommendationOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiKnowledgeRecommendationOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_relationships.py new file mode 100644 index 000000000..ef6ba26be --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_relationships.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_automation_in_relationships_analytical_dashboard import JsonApiAutomationInRelationshipsAnalyticalDashboard +from gooddata_api_client.models.json_api_knowledge_recommendation_in_relationships_metric import JsonApiKnowledgeRecommendationInRelationshipsMetric +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiKnowledgeRecommendationOutRelationships(BaseModel): + """ + JsonApiKnowledgeRecommendationOutRelationships + """ # noqa: E501 + analytical_dashboard: Optional[JsonApiAutomationInRelationshipsAnalyticalDashboard] = Field(default=None, alias="analyticalDashboard") + metric: Optional[JsonApiKnowledgeRecommendationInRelationshipsMetric] = None + __properties: ClassVar[List[str]] = ["analyticalDashboard", "metric"] + + 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 JsonApiKnowledgeRecommendationOutRelationships 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 analytical_dashboard + if self.analytical_dashboard: + _dict['analyticalDashboard'] = self.analytical_dashboard.to_dict() + # override the default output from pydantic by calling `to_dict()` of metric + if self.metric: + _dict['metric'] = self.metric.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyticalDashboard": JsonApiAutomationInRelationshipsAnalyticalDashboard.from_dict(obj["analyticalDashboard"]) if obj.get("analyticalDashboard") is not None else None, + "metric": JsonApiKnowledgeRecommendationInRelationshipsMetric.from_dict(obj["metric"]) if obj.get("metric") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_with_links.py new file mode 100644 index 000000000..f9baf03bb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_knowledge_recommendation_out_attributes import JsonApiKnowledgeRecommendationOutAttributes +from gooddata_api_client.models.json_api_knowledge_recommendation_out_relationships import JsonApiKnowledgeRecommendationOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiKnowledgeRecommendationOutWithLinks(BaseModel): + """ + JsonApiKnowledgeRecommendationOutWithLinks + """ # noqa: E501 + attributes: JsonApiKnowledgeRecommendationOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiKnowledgeRecommendationOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['knowledgeRecommendation']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('knowledgeRecommendation')") + 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 JsonApiKnowledgeRecommendationOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiKnowledgeRecommendationOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiKnowledgeRecommendationOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_patch.py new file mode 100644 index 000000000..2df461d3d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_patch.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_knowledge_recommendation_out_relationships import JsonApiKnowledgeRecommendationOutRelationships +from gooddata_api_client.models.json_api_knowledge_recommendation_patch_attributes import JsonApiKnowledgeRecommendationPatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiKnowledgeRecommendationPatch(BaseModel): + """ + JSON:API representation of patching knowledgeRecommendation entity. + """ # noqa: E501 + attributes: JsonApiKnowledgeRecommendationPatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: JsonApiKnowledgeRecommendationOutRelationships + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['knowledgeRecommendation']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('knowledgeRecommendation')") + 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 JsonApiKnowledgeRecommendationPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiKnowledgeRecommendationPatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiKnowledgeRecommendationOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_patch_attributes.py new file mode 100644 index 000000000..37ca7e90c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_patch_attributes.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictInt, 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 JsonApiKnowledgeRecommendationPatchAttributes(BaseModel): + """ + JsonApiKnowledgeRecommendationPatchAttributes + """ # noqa: E501 + analytical_dashboard_title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Human-readable title of the analytical dashboard (denormalized for display)", alias="analyticalDashboardTitle") + analyzed_period: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Analyzed time period (e.g., '2023-07' or 'July 2023')", alias="analyzedPeriod") + analyzed_value: Optional[Any] = Field(default=None, description="Metric value in the analyzed period (the observed value that triggered the anomaly)", alias="analyzedValue") + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + comparison_type: Optional[StrictStr] = Field(default=None, description="Time period for comparison", alias="comparisonType") + confidence: Optional[Any] = Field(default=None, description="Confidence score (0.0 to 1.0)") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Description of the recommendation") + direction: Optional[StrictStr] = Field(default=None, description="Direction of the metric change") + metric_title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Human-readable title of the metric (denormalized for display)", alias="metricTitle") + recommendations: Optional[Dict[str, Any]] = Field(default=None, description="Structured recommendations data as JSON") + reference_period: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Reference time period for comparison (e.g., '2023-06' or 'Jun 2023')", alias="referencePeriod") + reference_value: Optional[Any] = Field(default=None, description="Metric value in the reference period", alias="referenceValue") + source_count: Optional[StrictInt] = Field(default=None, description="Number of source documents used for generation", alias="sourceCount") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Human-readable title for the recommendation, e.g. 'Revenue decreased vs last month'") + widget_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="ID of the widget where the anomaly was detected", alias="widgetId") + widget_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Name of the widget where the anomaly was detected", alias="widgetName") + __properties: ClassVar[List[str]] = ["analyticalDashboardTitle", "analyzedPeriod", "analyzedValue", "areRelationsValid", "comparisonType", "confidence", "description", "direction", "metricTitle", "recommendations", "referencePeriod", "referenceValue", "sourceCount", "tags", "title", "widgetId", "widgetName"] + + @field_validator('comparison_type') + def comparison_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['MONTH', 'QUARTER', 'YEAR']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MONTH', 'QUARTER', 'YEAR')") + return value + + @field_validator('direction') + def direction_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INCREASED', 'DECREASED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INCREASED', 'DECREASED')") + 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 JsonApiKnowledgeRecommendationPatchAttributes 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 analyzed_value (nullable) is None + # and model_fields_set contains the field + if self.analyzed_value is None and "analyzed_value" in self.model_fields_set: + _dict['analyzedValue'] = None + + # set to None if confidence (nullable) is None + # and model_fields_set contains the field + if self.confidence is None and "confidence" in self.model_fields_set: + _dict['confidence'] = None + + # set to None if reference_value (nullable) is None + # and model_fields_set contains the field + if self.reference_value is None and "reference_value" in self.model_fields_set: + _dict['referenceValue'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationPatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyticalDashboardTitle": obj.get("analyticalDashboardTitle"), + "analyzedPeriod": obj.get("analyzedPeriod"), + "analyzedValue": obj.get("analyzedValue"), + "areRelationsValid": obj.get("areRelationsValid"), + "comparisonType": obj.get("comparisonType"), + "confidence": obj.get("confidence"), + "description": obj.get("description"), + "direction": obj.get("direction"), + "metricTitle": obj.get("metricTitle"), + "recommendations": obj.get("recommendations"), + "referencePeriod": obj.get("referencePeriod"), + "referenceValue": obj.get("referenceValue"), + "sourceCount": obj.get("sourceCount"), + "tags": obj.get("tags"), + "title": obj.get("title"), + "widgetId": obj.get("widgetId"), + "widgetName": obj.get("widgetName") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_patch_document.py new file mode 100644 index 000000000..ed20bcd8e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_knowledge_recommendation_patch import JsonApiKnowledgeRecommendationPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiKnowledgeRecommendationPatchDocument(BaseModel): + """ + JsonApiKnowledgeRecommendationPatchDocument + """ # noqa: E501 + data: JsonApiKnowledgeRecommendationPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiKnowledgeRecommendationPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiKnowledgeRecommendationPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_post_optional_id.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_post_optional_id.py new file mode 100644 index 000000000..4a753df3a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_post_optional_id.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_knowledge_recommendation_in_attributes import JsonApiKnowledgeRecommendationInAttributes +from gooddata_api_client.models.json_api_knowledge_recommendation_in_relationships import JsonApiKnowledgeRecommendationInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiKnowledgeRecommendationPostOptionalId(BaseModel): + """ + JSON:API representation of knowledgeRecommendation entity. + """ # noqa: E501 + attributes: JsonApiKnowledgeRecommendationInAttributes + id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="API identifier of an object") + relationships: JsonApiKnowledgeRecommendationInRelationships + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @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"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['knowledgeRecommendation']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('knowledgeRecommendation')") + 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 JsonApiKnowledgeRecommendationPostOptionalId 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationPostOptionalId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiKnowledgeRecommendationInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiKnowledgeRecommendationInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_post_optional_id_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_post_optional_id_document.py new file mode 100644 index 000000000..e75994d5c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_knowledge_recommendation_post_optional_id_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_knowledge_recommendation_post_optional_id import JsonApiKnowledgeRecommendationPostOptionalId +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiKnowledgeRecommendationPostOptionalIdDocument(BaseModel): + """ + JsonApiKnowledgeRecommendationPostOptionalIdDocument + """ # noqa: E501 + data: JsonApiKnowledgeRecommendationPostOptionalId + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiKnowledgeRecommendationPostOptionalIdDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiKnowledgeRecommendationPostOptionalIdDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiKnowledgeRecommendationPostOptionalId.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_label_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_label_linkage.py new file mode 100644 index 000000000..98230ffb1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_label_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiLabelLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['label']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('label')") + 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 JsonApiLabelLinkage 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 JsonApiLabelLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_label_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_label_out.py new file mode 100644 index 000000000..92cfff30c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_label_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_label_out_attributes import JsonApiLabelOutAttributes +from gooddata_api_client.models.json_api_label_out_relationships import JsonApiLabelOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLabelOut(BaseModel): + """ + JSON:API representation of label entity. + """ # noqa: E501 + attributes: Optional[JsonApiLabelOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiLabelOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['label']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('label')") + 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 JsonApiLabelOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLabelOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiLabelOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiLabelOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_label_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_attributes.py new file mode 100644 index 000000000..68a0c61b3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_attributes.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_label_out_attributes_geo_area_config import JsonApiLabelOutAttributesGeoAreaConfig +from gooddata_api_client.models.json_api_label_out_attributes_translations_inner import JsonApiLabelOutAttributesTranslationsInner +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLabelOutAttributes(BaseModel): + """ + JsonApiLabelOutAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + geo_area_config: Optional[JsonApiLabelOutAttributesGeoAreaConfig] = Field(default=None, alias="geoAreaConfig") + is_hidden: Optional[StrictBool] = Field(default=None, alias="isHidden") + is_nullable: Optional[StrictBool] = Field(default=None, alias="isNullable") + locale: Optional[StrictStr] = None + null_value: Optional[StrictStr] = Field(default=None, alias="nullValue") + primary: Optional[StrictBool] = None + source_column: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, alias="sourceColumn") + source_column_data_type: Optional[StrictStr] = Field(default=None, alias="sourceColumnDataType") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + translations: Optional[List[JsonApiLabelOutAttributesTranslationsInner]] = None + value_type: Optional[StrictStr] = Field(default=None, alias="valueType") + __properties: ClassVar[List[str]] = ["areRelationsValid", "description", "geoAreaConfig", "isHidden", "isNullable", "locale", "nullValue", "primary", "sourceColumn", "sourceColumnDataType", "tags", "title", "translations", "valueType"] + + @field_validator('source_column_data_type') + def source_column_data_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + return value + + @field_validator('value_type') + def value_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['TEXT', 'HYPERLINK', 'GEO', 'GEO_LONGITUDE', 'GEO_LATITUDE', 'GEO_AREA', 'IMAGE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('TEXT', 'HYPERLINK', 'GEO', 'GEO_LONGITUDE', 'GEO_LATITUDE', 'GEO_AREA', 'IMAGE')") + 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 JsonApiLabelOutAttributes 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 geo_area_config + if self.geo_area_config: + _dict['geoAreaConfig'] = self.geo_area_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in translations (list) + _items = [] + if self.translations: + for _item_translations in self.translations: + if _item_translations: + _items.append(_item_translations.to_dict()) + _dict['translations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLabelOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "description": obj.get("description"), + "geoAreaConfig": JsonApiLabelOutAttributesGeoAreaConfig.from_dict(obj["geoAreaConfig"]) if obj.get("geoAreaConfig") is not None else None, + "isHidden": obj.get("isHidden"), + "isNullable": obj.get("isNullable"), + "locale": obj.get("locale"), + "nullValue": obj.get("nullValue"), + "primary": obj.get("primary"), + "sourceColumn": obj.get("sourceColumn"), + "sourceColumnDataType": obj.get("sourceColumnDataType"), + "tags": obj.get("tags"), + "title": obj.get("title"), + "translations": [JsonApiLabelOutAttributesTranslationsInner.from_dict(_item) for _item in obj["translations"]] if obj.get("translations") is not None else None, + "valueType": obj.get("valueType") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_label_out_attributes_geo_area_config.py b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_attributes_geo_area_config.py new file mode 100644 index 000000000..0ed675159 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_attributes_geo_area_config.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.geo_collection_identifier import GeoCollectionIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLabelOutAttributesGeoAreaConfig(BaseModel): + """ + Configuration specific to geo area labels. + """ # noqa: E501 + collection: GeoCollectionIdentifier + __properties: ClassVar[List[str]] = ["collection"] + + 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 JsonApiLabelOutAttributesGeoAreaConfig 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 collection + if self.collection: + _dict['collection'] = self.collection.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLabelOutAttributesGeoAreaConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "collection": GeoCollectionIdentifier.from_dict(obj["collection"]) if obj.get("collection") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_label_out_attributes_translations_inner.py b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_attributes_translations_inner.py new file mode 100644 index 000000000..2b43857a9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_attributes_translations_inner.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLabelOutAttributesTranslationsInner(BaseModel): + """ + JsonApiLabelOutAttributesTranslationsInner + """ # noqa: E501 + locale: StrictStr + source_column: StrictStr = Field(alias="sourceColumn") + __properties: ClassVar[List[str]] = ["locale", "sourceColumn"] + + 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 JsonApiLabelOutAttributesTranslationsInner 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 JsonApiLabelOutAttributesTranslationsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "locale": obj.get("locale"), + "sourceColumn": obj.get("sourceColumn") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_label_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_document.py new file mode 100644 index 000000000..c51d96919 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_attribute_out_with_links import JsonApiAttributeOutWithLinks +from gooddata_api_client.models.json_api_label_out import JsonApiLabelOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLabelOutDocument(BaseModel): + """ + JsonApiLabelOutDocument + """ # noqa: E501 + data: JsonApiLabelOut + included: Optional[List[JsonApiAttributeOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiLabelOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLabelOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiLabelOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiAttributeOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_label_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_list.py new file mode 100644 index 000000000..4fb0cd674 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_attribute_out_with_links import JsonApiAttributeOutWithLinks +from gooddata_api_client.models.json_api_label_out_with_links import JsonApiLabelOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLabelOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiLabelOutWithLinks] + included: Optional[List[JsonApiAttributeOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiLabelOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLabelOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiLabelOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiAttributeOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_label_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_relationships.py new file mode 100644 index 000000000..710b50b64 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_relationships.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_label_out_relationships_attribute import JsonApiLabelOutRelationshipsAttribute +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLabelOutRelationships(BaseModel): + """ + JsonApiLabelOutRelationships + """ # noqa: E501 + attribute: Optional[JsonApiLabelOutRelationshipsAttribute] = None + __properties: ClassVar[List[str]] = ["attribute"] + + 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 JsonApiLabelOutRelationships 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 attribute + if self.attribute: + _dict['attribute'] = self.attribute.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLabelOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attribute": JsonApiLabelOutRelationshipsAttribute.from_dict(obj["attribute"]) if obj.get("attribute") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_label_out_relationships_attribute.py b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_relationships_attribute.py new file mode 100644 index 000000000..401494569 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_relationships_attribute.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_attribute_to_one_linkage import JsonApiAttributeToOneLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLabelOutRelationshipsAttribute(BaseModel): + """ + JsonApiLabelOutRelationshipsAttribute + """ # noqa: E501 + data: Optional[JsonApiAttributeToOneLinkage] + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiLabelOutRelationshipsAttribute 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLabelOutRelationshipsAttribute from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiAttributeToOneLinkage.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_label_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_with_links.py new file mode 100644 index 000000000..31429d867 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_label_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_label_out_attributes import JsonApiLabelOutAttributes +from gooddata_api_client.models.json_api_label_out_relationships import JsonApiLabelOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLabelOutWithLinks(BaseModel): + """ + JsonApiLabelOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiLabelOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiLabelOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['label']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('label')") + 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 JsonApiLabelOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLabelOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiLabelOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiLabelOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_label_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_label_patch.py new file mode 100644 index 000000000..95f83fe63 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_label_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_attribute_patch_attributes import JsonApiAttributePatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLabelPatch(BaseModel): + """ + JSON:API representation of patching label entity. + """ # noqa: E501 + attributes: Optional[JsonApiAttributePatchAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['label']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('label')") + 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 JsonApiLabelPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLabelPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAttributePatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_label_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_label_patch_document.py new file mode 100644 index 000000000..fa881da0a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_label_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_label_patch import JsonApiLabelPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLabelPatchDocument(BaseModel): + """ + JsonApiLabelPatchDocument + """ # noqa: E501 + data: JsonApiLabelPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiLabelPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLabelPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiLabelPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_label_to_one_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_label_to_one_linkage.py new file mode 100644 index 000000000..2492314b9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_label_to_one_linkage.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_label_linkage import JsonApiLabelLinkage +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPILABELTOONELINKAGE_ONE_OF_SCHEMAS = ["JsonApiLabelLinkage"] + +class JsonApiLabelToOneLinkage(BaseModel): + """ + References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + """ + # data type: JsonApiLabelLinkage + oneof_schema_1_validator: Optional[JsonApiLabelLinkage] = None + actual_instance: Optional[Union[JsonApiLabelLinkage]] = None + one_of_schemas: Set[str] = { "JsonApiLabelLinkage" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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): + if v is None: + return v + + instance = JsonApiLabelToOneLinkage.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiLabelLinkage + if not isinstance(v, JsonApiLabelLinkage): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiLabelLinkage`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiLabelToOneLinkage with oneOf schemas: JsonApiLabelLinkage. 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: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into JsonApiLabelLinkage + try: + if match == 0: + instance.actual_instance = JsonApiLabelLinkage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiLabelToOneLinkage with oneOf schemas: JsonApiLabelLinkage. 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], JsonApiLabelLinkage]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_in.py new file mode 100644 index 000000000..800f9285b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_llm_endpoint_in_attributes import JsonApiLlmEndpointInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmEndpointIn(BaseModel): + """ + JSON:API representation of llmEndpoint entity. + """ # noqa: E501 + attributes: JsonApiLlmEndpointInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['llmEndpoint']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('llmEndpoint')") + 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 JsonApiLlmEndpointIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmEndpointIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiLlmEndpointInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_in_attributes.py new file mode 100644 index 000000000..6f44a18cb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_in_attributes.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiLlmEndpointInAttributes(BaseModel): + """ + JsonApiLlmEndpointInAttributes + """ # noqa: E501 + base_url: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Custom LLM endpoint.", alias="baseUrl") + llm_model: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="LLM Model. We provide a default model for each provider, but you can override it here.", alias="llmModel") + llm_organization: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Organization in LLM provider.", alias="llmOrganization") + provider: Optional[StrictStr] = Field(default=None, description="LLM Provider.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="User-facing title of the LLM Provider.") + token: Annotated[str, Field(strict=True, max_length=10000)] = Field(description="The token to use to connect to the LLM provider.") + __properties: ClassVar[List[str]] = ["baseUrl", "llmModel", "llmOrganization", "provider", "title", "token"] + + @field_validator('provider') + def provider_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['OPENAI', 'AZURE_OPENAI']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('OPENAI', 'AZURE_OPENAI')") + 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 JsonApiLlmEndpointInAttributes 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 base_url (nullable) is None + # and model_fields_set contains the field + if self.base_url is None and "base_url" in self.model_fields_set: + _dict['baseUrl'] = None + + # set to None if llm_organization (nullable) is None + # and model_fields_set contains the field + if self.llm_organization is None and "llm_organization" in self.model_fields_set: + _dict['llmOrganization'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmEndpointInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "baseUrl": obj.get("baseUrl"), + "llmModel": obj.get("llmModel"), + "llmOrganization": obj.get("llmOrganization"), + "provider": obj.get("provider"), + "title": obj.get("title"), + "token": obj.get("token") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_in_document.py new file mode 100644 index 000000000..c6546a0ea --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_llm_endpoint_in import JsonApiLlmEndpointIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmEndpointInDocument(BaseModel): + """ + JsonApiLlmEndpointInDocument + """ # noqa: E501 + data: JsonApiLlmEndpointIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiLlmEndpointInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmEndpointInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiLlmEndpointIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out.py new file mode 100644 index 000000000..56f650c91 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_llm_endpoint_out_attributes import JsonApiLlmEndpointOutAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmEndpointOut(BaseModel): + """ + JSON:API representation of llmEndpoint entity. + """ # noqa: E501 + attributes: JsonApiLlmEndpointOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['llmEndpoint']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('llmEndpoint')") + 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 JsonApiLlmEndpointOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmEndpointOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiLlmEndpointOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_attributes.py new file mode 100644 index 000000000..a68a0918c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_attributes.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiLlmEndpointOutAttributes(BaseModel): + """ + JsonApiLlmEndpointOutAttributes + """ # noqa: E501 + base_url: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Custom LLM endpoint.", alias="baseUrl") + llm_model: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="LLM Model. We provide a default model for each provider, but you can override it here.", alias="llmModel") + llm_organization: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Organization in LLM provider.", alias="llmOrganization") + provider: Optional[StrictStr] = Field(default=None, description="LLM Provider.") + title: Annotated[str, Field(strict=True, max_length=255)] = Field(description="User-facing title of the LLM Provider.") + __properties: ClassVar[List[str]] = ["baseUrl", "llmModel", "llmOrganization", "provider", "title"] + + @field_validator('provider') + def provider_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['OPENAI', 'AZURE_OPENAI']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('OPENAI', 'AZURE_OPENAI')") + 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 JsonApiLlmEndpointOutAttributes 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 base_url (nullable) is None + # and model_fields_set contains the field + if self.base_url is None and "base_url" in self.model_fields_set: + _dict['baseUrl'] = None + + # set to None if llm_organization (nullable) is None + # and model_fields_set contains the field + if self.llm_organization is None and "llm_organization" in self.model_fields_set: + _dict['llmOrganization'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmEndpointOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "baseUrl": obj.get("baseUrl"), + "llmModel": obj.get("llmModel"), + "llmOrganization": obj.get("llmOrganization"), + "provider": obj.get("provider"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_document.py new file mode 100644 index 000000000..2e5373cea --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_llm_endpoint_out import JsonApiLlmEndpointOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmEndpointOutDocument(BaseModel): + """ + JsonApiLlmEndpointOutDocument + """ # noqa: E501 + data: JsonApiLlmEndpointOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiLlmEndpointOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmEndpointOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiLlmEndpointOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_list.py new file mode 100644 index 000000000..69c39274c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_llm_endpoint_out_with_links import JsonApiLlmEndpointOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmEndpointOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiLlmEndpointOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiLlmEndpointOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmEndpointOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiLlmEndpointOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_with_links.py new file mode 100644 index 000000000..8df3749bf --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_llm_endpoint_out_attributes import JsonApiLlmEndpointOutAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmEndpointOutWithLinks(BaseModel): + """ + JsonApiLlmEndpointOutWithLinks + """ # noqa: E501 + attributes: JsonApiLlmEndpointOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['llmEndpoint']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('llmEndpoint')") + 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 JsonApiLlmEndpointOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmEndpointOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiLlmEndpointOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_patch.py new file mode 100644 index 000000000..28548d437 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_llm_endpoint_patch_attributes import JsonApiLlmEndpointPatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmEndpointPatch(BaseModel): + """ + JSON:API representation of patching llmEndpoint entity. + """ # noqa: E501 + attributes: JsonApiLlmEndpointPatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['llmEndpoint']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('llmEndpoint')") + 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 JsonApiLlmEndpointPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmEndpointPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiLlmEndpointPatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_patch_attributes.py new file mode 100644 index 000000000..ee584a2ff --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_patch_attributes.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiLlmEndpointPatchAttributes(BaseModel): + """ + JsonApiLlmEndpointPatchAttributes + """ # noqa: E501 + base_url: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Custom LLM endpoint.", alias="baseUrl") + llm_model: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="LLM Model. We provide a default model for each provider, but you can override it here.", alias="llmModel") + llm_organization: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Organization in LLM provider.", alias="llmOrganization") + provider: Optional[StrictStr] = Field(default=None, description="LLM Provider.") + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="User-facing title of the LLM Provider.") + token: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="The token to use to connect to the LLM provider.") + __properties: ClassVar[List[str]] = ["baseUrl", "llmModel", "llmOrganization", "provider", "title", "token"] + + @field_validator('provider') + def provider_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['OPENAI', 'AZURE_OPENAI']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('OPENAI', 'AZURE_OPENAI')") + 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 JsonApiLlmEndpointPatchAttributes 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 base_url (nullable) is None + # and model_fields_set contains the field + if self.base_url is None and "base_url" in self.model_fields_set: + _dict['baseUrl'] = None + + # set to None if llm_organization (nullable) is None + # and model_fields_set contains the field + if self.llm_organization is None and "llm_organization" in self.model_fields_set: + _dict['llmOrganization'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmEndpointPatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "baseUrl": obj.get("baseUrl"), + "llmModel": obj.get("llmModel"), + "llmOrganization": obj.get("llmOrganization"), + "provider": obj.get("provider"), + "title": obj.get("title"), + "token": obj.get("token") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_patch_document.py new file mode 100644 index 000000000..58c20ec9f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_endpoint_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_llm_endpoint_patch import JsonApiLlmEndpointPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmEndpointPatchDocument(BaseModel): + """ + JsonApiLlmEndpointPatchDocument + """ # noqa: E501 + data: JsonApiLlmEndpointPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiLlmEndpointPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmEndpointPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiLlmEndpointPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in.py new file mode 100644 index 000000000..fe155807d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_llm_provider_in_attributes import JsonApiLlmProviderInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmProviderIn(BaseModel): + """ + LLM Provider configuration for connecting to LLM services. + """ # noqa: E501 + attributes: JsonApiLlmProviderInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['llmProvider']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('llmProvider')") + 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 JsonApiLlmProviderIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmProviderIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiLlmProviderInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_attributes.py new file mode 100644 index 000000000..64b1b4116 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_attributes.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_llm_provider_in_attributes_models_inner import JsonApiLlmProviderInAttributesModelsInner +from gooddata_api_client.models.json_api_llm_provider_in_attributes_provider_config import JsonApiLlmProviderInAttributesProviderConfig +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmProviderInAttributes(BaseModel): + """ + JsonApiLlmProviderInAttributes + """ # noqa: E501 + default_model_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="ID of the default model to use from the models list.", alias="defaultModelId") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Description of the LLM Provider.") + models: Optional[List[JsonApiLlmProviderInAttributesModelsInner]] = Field(description="List of LLM models available for this provider.") + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + provider_config: JsonApiLlmProviderInAttributesProviderConfig = Field(alias="providerConfig") + __properties: ClassVar[List[str]] = ["defaultModelId", "description", "models", "name", "providerConfig"] + + 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 JsonApiLlmProviderInAttributes 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 each item in models (list) + _items = [] + if self.models: + for _item_models in self.models: + if _item_models: + _items.append(_item_models.to_dict()) + _dict['models'] = _items + # override the default output from pydantic by calling `to_dict()` of provider_config + if self.provider_config: + _dict['providerConfig'] = self.provider_config.to_dict() + # set to None if default_model_id (nullable) is None + # and model_fields_set contains the field + if self.default_model_id is None and "default_model_id" in self.model_fields_set: + _dict['defaultModelId'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if models (nullable) is None + # and model_fields_set contains the field + if self.models is None and "models" in self.model_fields_set: + _dict['models'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmProviderInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "defaultModelId": obj.get("defaultModelId"), + "description": obj.get("description"), + "models": [JsonApiLlmProviderInAttributesModelsInner.from_dict(_item) for _item in obj["models"]] if obj.get("models") is not None else None, + "name": obj.get("name"), + "providerConfig": JsonApiLlmProviderInAttributesProviderConfig.from_dict(obj["providerConfig"]) if obj.get("providerConfig") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_attributes_models_inner.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_attributes_models_inner.py new file mode 100644 index 000000000..12a13bc8b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_attributes_models_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmProviderInAttributesModelsInner(BaseModel): + """ + LLM Model configuration (id, family) within a provider. + """ # noqa: E501 + family: StrictStr = Field(description="Family of LLM models.") + id: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Unique identifier of the model (e.g., gpt-5.3, claude-4.6).") + __properties: ClassVar[List[str]] = ["family", "id"] + + @field_validator('family') + def family_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['OPENAI', 'ANTHROPIC', 'META', 'MISTRAL', 'AMAZON', 'GOOGLE', 'COHERE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('OPENAI', 'ANTHROPIC', 'META', 'MISTRAL', 'AMAZON', 'GOOGLE', 'COHERE')") + 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 JsonApiLlmProviderInAttributesModelsInner 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 JsonApiLlmProviderInAttributesModelsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "family": obj.get("family"), + "id": obj.get("id") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_attributes_provider_config.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_attributes_provider_config.py new file mode 100644 index 000000000..922cabcfd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_attributes_provider_config.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.aws_bedrock_provider_config import AwsBedrockProviderConfig +from gooddata_api_client.models.azure_foundry_provider_config import AzureFoundryProviderConfig +from gooddata_api_client.models.open_ai_provider_config import OpenAIProviderConfig +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPILLMPROVIDERINATTRIBUTESPROVIDERCONFIG_ONE_OF_SCHEMAS = ["AwsBedrockProviderConfig", "AzureFoundryProviderConfig", "OpenAIProviderConfig"] + +class JsonApiLlmProviderInAttributesProviderConfig(BaseModel): + """ + Provider-specific configuration including authentication. + """ + # data type: AwsBedrockProviderConfig + oneof_schema_1_validator: Optional[AwsBedrockProviderConfig] = None + # data type: AzureFoundryProviderConfig + oneof_schema_2_validator: Optional[AzureFoundryProviderConfig] = None + # data type: OpenAIProviderConfig + oneof_schema_3_validator: Optional[OpenAIProviderConfig] = None + actual_instance: Optional[Union[AwsBedrockProviderConfig, AzureFoundryProviderConfig, OpenAIProviderConfig]] = None + one_of_schemas: Set[str] = { "AwsBedrockProviderConfig", "AzureFoundryProviderConfig", "OpenAIProviderConfig" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiLlmProviderInAttributesProviderConfig.model_construct() + error_messages = [] + match = 0 + # validate data type: AwsBedrockProviderConfig + if not isinstance(v, AwsBedrockProviderConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `AwsBedrockProviderConfig`") + else: + match += 1 + # validate data type: AzureFoundryProviderConfig + if not isinstance(v, AzureFoundryProviderConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `AzureFoundryProviderConfig`") + else: + match += 1 + # validate data type: OpenAIProviderConfig + if not isinstance(v, OpenAIProviderConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIProviderConfig`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiLlmProviderInAttributesProviderConfig with oneOf schemas: AwsBedrockProviderConfig, AzureFoundryProviderConfig, OpenAIProviderConfig. 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 + + # deserialize data into AwsBedrockProviderConfig + try: + if match == 0: + instance.actual_instance = AwsBedrockProviderConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AzureFoundryProviderConfig + try: + if match == 0: + instance.actual_instance = AzureFoundryProviderConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OpenAIProviderConfig + try: + if match == 0: + instance.actual_instance = OpenAIProviderConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiLlmProviderInAttributesProviderConfig with oneOf schemas: AwsBedrockProviderConfig, AzureFoundryProviderConfig, OpenAIProviderConfig. 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], AwsBedrockProviderConfig, AzureFoundryProviderConfig, OpenAIProviderConfig]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_document.py new file mode 100644 index 000000000..8f7620c4e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_llm_provider_in import JsonApiLlmProviderIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmProviderInDocument(BaseModel): + """ + JsonApiLlmProviderInDocument + """ # noqa: E501 + data: JsonApiLlmProviderIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiLlmProviderInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmProviderInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiLlmProviderIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out.py new file mode 100644 index 000000000..ba3cc4850 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_llm_provider_in_attributes import JsonApiLlmProviderInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmProviderOut(BaseModel): + """ + LLM Provider configuration for connecting to LLM services. + """ # noqa: E501 + attributes: JsonApiLlmProviderInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['llmProvider']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('llmProvider')") + 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 JsonApiLlmProviderOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmProviderOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiLlmProviderInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out_document.py new file mode 100644 index 000000000..6ec30d2b5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_llm_provider_out import JsonApiLlmProviderOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmProviderOutDocument(BaseModel): + """ + JsonApiLlmProviderOutDocument + """ # noqa: E501 + data: JsonApiLlmProviderOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiLlmProviderOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmProviderOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiLlmProviderOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out_list.py new file mode 100644 index 000000000..20704acb7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_llm_provider_out_with_links import JsonApiLlmProviderOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmProviderOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiLlmProviderOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiLlmProviderOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmProviderOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiLlmProviderOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out_with_links.py new file mode 100644 index 000000000..9414da530 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_llm_provider_in_attributes import JsonApiLlmProviderInAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmProviderOutWithLinks(BaseModel): + """ + JsonApiLlmProviderOutWithLinks + """ # noqa: E501 + attributes: JsonApiLlmProviderInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['llmProvider']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('llmProvider')") + 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 JsonApiLlmProviderOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmProviderOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiLlmProviderInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_patch.py new file mode 100644 index 000000000..bd7452bfc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_llm_provider_patch_attributes import JsonApiLlmProviderPatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmProviderPatch(BaseModel): + """ + LLM Provider configuration for connecting to LLM services. + """ # noqa: E501 + attributes: JsonApiLlmProviderPatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['llmProvider']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('llmProvider')") + 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 JsonApiLlmProviderPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmProviderPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiLlmProviderPatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_patch_attributes.py new file mode 100644 index 000000000..a0cabc660 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_patch_attributes.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_llm_provider_in_attributes_models_inner import JsonApiLlmProviderInAttributesModelsInner +from gooddata_api_client.models.json_api_llm_provider_in_attributes_provider_config import JsonApiLlmProviderInAttributesProviderConfig +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmProviderPatchAttributes(BaseModel): + """ + JsonApiLlmProviderPatchAttributes + """ # noqa: E501 + default_model_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="ID of the default model to use from the models list.", alias="defaultModelId") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Description of the LLM Provider.") + models: Optional[List[JsonApiLlmProviderInAttributesModelsInner]] = Field(default=None, description="List of LLM models available for this provider.") + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + provider_config: Optional[JsonApiLlmProviderInAttributesProviderConfig] = Field(default=None, alias="providerConfig") + __properties: ClassVar[List[str]] = ["defaultModelId", "description", "models", "name", "providerConfig"] + + 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 JsonApiLlmProviderPatchAttributes 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 each item in models (list) + _items = [] + if self.models: + for _item_models in self.models: + if _item_models: + _items.append(_item_models.to_dict()) + _dict['models'] = _items + # override the default output from pydantic by calling `to_dict()` of provider_config + if self.provider_config: + _dict['providerConfig'] = self.provider_config.to_dict() + # set to None if default_model_id (nullable) is None + # and model_fields_set contains the field + if self.default_model_id is None and "default_model_id" in self.model_fields_set: + _dict['defaultModelId'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if models (nullable) is None + # and model_fields_set contains the field + if self.models is None and "models" in self.model_fields_set: + _dict['models'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmProviderPatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "defaultModelId": obj.get("defaultModelId"), + "description": obj.get("description"), + "models": [JsonApiLlmProviderInAttributesModelsInner.from_dict(_item) for _item in obj["models"]] if obj.get("models") is not None else None, + "name": obj.get("name"), + "providerConfig": JsonApiLlmProviderInAttributesProviderConfig.from_dict(obj["providerConfig"]) if obj.get("providerConfig") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_patch_document.py new file mode 100644 index 000000000..fe228e3b4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_llm_provider_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_llm_provider_patch import JsonApiLlmProviderPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiLlmProviderPatchDocument(BaseModel): + """ + JsonApiLlmProviderPatchDocument + """ # noqa: E501 + data: JsonApiLlmProviderPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiLlmProviderPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiLlmProviderPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiLlmProviderPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_in.py new file mode 100644 index 000000000..3c8eb2d16 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_memory_item_in_attributes import JsonApiMemoryItemInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMemoryItemIn(BaseModel): + """ + JSON:API representation of memoryItem entity. + """ # noqa: E501 + attributes: JsonApiMemoryItemInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['memoryItem']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('memoryItem')") + 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 JsonApiMemoryItemIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMemoryItemIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiMemoryItemInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_in_attributes.py new file mode 100644 index 000000000..3d54f470f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_in_attributes.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, 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 JsonApiMemoryItemInAttributes(BaseModel): + """ + JsonApiMemoryItemInAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + instruction: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The text that will be injected into the system prompt") + is_disabled: Optional[StrictBool] = Field(default=None, description="Whether memory item is disabled", alias="isDisabled") + keywords: Optional[List[StrictStr]] = Field(default=None, description="Set of unique strings used for semantic similarity filtering") + strategy: StrictStr = Field(description="Strategy defining when the memory item should be applied") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "description", "instruction", "isDisabled", "keywords", "strategy", "tags", "title"] + + @field_validator('strategy') + def strategy_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ALWAYS', 'AUTO']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ALWAYS', 'AUTO')") + 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 JsonApiMemoryItemInAttributes 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 JsonApiMemoryItemInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "description": obj.get("description"), + "instruction": obj.get("instruction"), + "isDisabled": obj.get("isDisabled"), + "keywords": obj.get("keywords"), + "strategy": obj.get("strategy"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_in_document.py new file mode 100644 index 000000000..2d49ad0eb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_memory_item_in import JsonApiMemoryItemIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMemoryItemInDocument(BaseModel): + """ + JsonApiMemoryItemInDocument + """ # noqa: E501 + data: JsonApiMemoryItemIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiMemoryItemInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMemoryItemInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiMemoryItemIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out.py new file mode 100644 index 000000000..2e1dcd121 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_dashboard_plugin_out_relationships import JsonApiDashboardPluginOutRelationships +from gooddata_api_client.models.json_api_memory_item_out_attributes import JsonApiMemoryItemOutAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMemoryItemOut(BaseModel): + """ + JSON:API representation of memoryItem entity. + """ # noqa: E501 + attributes: JsonApiMemoryItemOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiDashboardPluginOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['memoryItem']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('memoryItem')") + 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 JsonApiMemoryItemOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMemoryItemOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiMemoryItemOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiDashboardPluginOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_attributes.py new file mode 100644 index 000000000..349e4f97c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_attributes.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, 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 JsonApiMemoryItemOutAttributes(BaseModel): + """ + JsonApiMemoryItemOutAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + created_at: Optional[datetime] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + instruction: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The text that will be injected into the system prompt") + is_disabled: Optional[StrictBool] = Field(default=None, description="Whether memory item is disabled", alias="isDisabled") + keywords: Optional[List[StrictStr]] = Field(default=None, description="Set of unique strings used for semantic similarity filtering") + modified_at: Optional[datetime] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + strategy: StrictStr = Field(description="Strategy defining when the memory item should be applied") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "createdAt", "description", "instruction", "isDisabled", "keywords", "modifiedAt", "strategy", "tags", "title"] + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('strategy') + def strategy_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ALWAYS', 'AUTO']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ALWAYS', 'AUTO')") + 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 JsonApiMemoryItemOutAttributes 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 created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMemoryItemOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "createdAt": obj.get("createdAt"), + "description": obj.get("description"), + "instruction": obj.get("instruction"), + "isDisabled": obj.get("isDisabled"), + "keywords": obj.get("keywords"), + "modifiedAt": obj.get("modifiedAt"), + "strategy": obj.get("strategy"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_document.py new file mode 100644 index 000000000..6e5021c6c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_memory_item_out import JsonApiMemoryItemOut +from gooddata_api_client.models.json_api_user_identifier_out_with_links import JsonApiUserIdentifierOutWithLinks +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMemoryItemOutDocument(BaseModel): + """ + JsonApiMemoryItemOutDocument + """ # noqa: E501 + data: JsonApiMemoryItemOut + included: Optional[List[JsonApiUserIdentifierOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiMemoryItemOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMemoryItemOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiMemoryItemOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiUserIdentifierOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_list.py new file mode 100644 index 000000000..e6aed2509 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_memory_item_out_with_links import JsonApiMemoryItemOutWithLinks +from gooddata_api_client.models.json_api_user_identifier_out_with_links import JsonApiUserIdentifierOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMemoryItemOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiMemoryItemOutWithLinks] + included: Optional[List[JsonApiUserIdentifierOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiMemoryItemOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMemoryItemOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiMemoryItemOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiUserIdentifierOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_with_links.py new file mode 100644 index 000000000..af76c4dcb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_dashboard_plugin_out_relationships import JsonApiDashboardPluginOutRelationships +from gooddata_api_client.models.json_api_memory_item_out_attributes import JsonApiMemoryItemOutAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMemoryItemOutWithLinks(BaseModel): + """ + JsonApiMemoryItemOutWithLinks + """ # noqa: E501 + attributes: JsonApiMemoryItemOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiDashboardPluginOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['memoryItem']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('memoryItem')") + 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 JsonApiMemoryItemOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMemoryItemOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiMemoryItemOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiDashboardPluginOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_patch.py new file mode 100644 index 000000000..be9e303e8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_memory_item_patch_attributes import JsonApiMemoryItemPatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMemoryItemPatch(BaseModel): + """ + JSON:API representation of patching memoryItem entity. + """ # noqa: E501 + attributes: JsonApiMemoryItemPatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['memoryItem']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('memoryItem')") + 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 JsonApiMemoryItemPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMemoryItemPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiMemoryItemPatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_patch_attributes.py new file mode 100644 index 000000000..5152c68cb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_patch_attributes.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, 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 JsonApiMemoryItemPatchAttributes(BaseModel): + """ + JsonApiMemoryItemPatchAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + instruction: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The text that will be injected into the system prompt") + is_disabled: Optional[StrictBool] = Field(default=None, description="Whether memory item is disabled", alias="isDisabled") + keywords: Optional[List[StrictStr]] = Field(default=None, description="Set of unique strings used for semantic similarity filtering") + strategy: Optional[StrictStr] = Field(default=None, description="Strategy defining when the memory item should be applied") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "description", "instruction", "isDisabled", "keywords", "strategy", "tags", "title"] + + @field_validator('strategy') + def strategy_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ALWAYS', 'AUTO']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ALWAYS', 'AUTO')") + 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 JsonApiMemoryItemPatchAttributes 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 JsonApiMemoryItemPatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "description": obj.get("description"), + "instruction": obj.get("instruction"), + "isDisabled": obj.get("isDisabled"), + "keywords": obj.get("keywords"), + "strategy": obj.get("strategy"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_patch_document.py new file mode 100644 index 000000000..a43f6c02a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_memory_item_patch import JsonApiMemoryItemPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMemoryItemPatchDocument(BaseModel): + """ + JsonApiMemoryItemPatchDocument + """ # noqa: E501 + data: JsonApiMemoryItemPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiMemoryItemPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMemoryItemPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiMemoryItemPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_post_optional_id.py b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_post_optional_id.py new file mode 100644 index 000000000..6ea01565b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_post_optional_id.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_memory_item_in_attributes import JsonApiMemoryItemInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMemoryItemPostOptionalId(BaseModel): + """ + JSON:API representation of memoryItem entity. + """ # noqa: E501 + attributes: JsonApiMemoryItemInAttributes + id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @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"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['memoryItem']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('memoryItem')") + 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 JsonApiMemoryItemPostOptionalId 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMemoryItemPostOptionalId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiMemoryItemInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_post_optional_id_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_post_optional_id_document.py new file mode 100644 index 000000000..1a95ecdbd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_memory_item_post_optional_id_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_memory_item_post_optional_id import JsonApiMemoryItemPostOptionalId +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMemoryItemPostOptionalIdDocument(BaseModel): + """ + JsonApiMemoryItemPostOptionalIdDocument + """ # noqa: E501 + data: JsonApiMemoryItemPostOptionalId + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiMemoryItemPostOptionalIdDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMemoryItemPostOptionalIdDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiMemoryItemPostOptionalId.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_in.py new file mode 100644 index 000000000..5b5c0e12b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_metric_in_attributes import JsonApiMetricInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMetricIn(BaseModel): + """ + JSON:API representation of metric entity. + """ # noqa: E501 + attributes: JsonApiMetricInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['metric']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('metric')") + 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 JsonApiMetricIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMetricIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiMetricInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_in_attributes.py new file mode 100644 index 000000000..50ea8df69 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_in_attributes.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_metric_in_attributes_content import JsonApiMetricInAttributesContent +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMetricInAttributes(BaseModel): + """ + JsonApiMetricInAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + content: JsonApiMetricInAttributesContent + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + is_hidden: Optional[StrictBool] = Field(default=None, alias="isHidden") + is_hidden_from_kda: Optional[StrictBool] = Field(default=None, alias="isHiddenFromKda") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "content", "description", "isHidden", "isHiddenFromKda", "tags", "title"] + + 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 JsonApiMetricInAttributes 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMetricInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "content": JsonApiMetricInAttributesContent.from_dict(obj["content"]) if obj.get("content") is not None else None, + "description": obj.get("description"), + "isHidden": obj.get("isHidden"), + "isHiddenFromKda": obj.get("isHiddenFromKda"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_in_attributes_content.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_in_attributes_content.py new file mode 100644 index 000000000..55129efa9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_in_attributes_content.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiMetricInAttributesContent(BaseModel): + """ + JsonApiMetricInAttributesContent + """ # noqa: E501 + format: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="Excel-like format string with optional dynamic tokens. Filter value tokens: [$FILTER:] for raw filter value passthrough. Currency tokens: [$CURRENCY:] for currency symbol, with optional forms :symbol, :narrow, :code, :name. Locale abbreviations: [$K], [$M], [$B], [$T] for locale-specific scale abbreviations. Tokens are resolved at execution time based on AFM filters and user's format locale. Single-value filters only; multi-value filters use fallback values.") + maql: Annotated[str, Field(strict=True, max_length=10000)] + metric_type: Optional[StrictStr] = Field(default=None, description="Categorizes metric semantics (e.g., currency).", alias="metricType") + __properties: ClassVar[List[str]] = ["format", "maql", "metricType"] + + @field_validator('metric_type') + def metric_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['UNSPECIFIED', 'CURRENCY']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('UNSPECIFIED', 'CURRENCY')") + 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 JsonApiMetricInAttributesContent 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 format (nullable) is None + # and model_fields_set contains the field + if self.format is None and "format" in self.model_fields_set: + _dict['format'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMetricInAttributesContent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "format": obj.get("format"), + "maql": obj.get("maql"), + "metricType": obj.get("metricType") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_in_document.py new file mode 100644 index 000000000..68ecae083 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_metric_in import JsonApiMetricIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMetricInDocument(BaseModel): + """ + JsonApiMetricInDocument + """ # noqa: E501 + data: JsonApiMetricIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiMetricInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMetricInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiMetricIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_linkage.py new file mode 100644 index 000000000..a50351c23 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiMetricLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['metric']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('metric')") + 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 JsonApiMetricLinkage 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 JsonApiMetricLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_out.py new file mode 100644 index 000000000..d092fcf92 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_metric_out_attributes import JsonApiMetricOutAttributes +from gooddata_api_client.models.json_api_metric_out_relationships import JsonApiMetricOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMetricOut(BaseModel): + """ + JSON:API representation of metric entity. + """ # noqa: E501 + attributes: JsonApiMetricOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiMetricOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['metric']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('metric')") + 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 JsonApiMetricOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMetricOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiMetricOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiMetricOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_attributes.py new file mode 100644 index 000000000..a8b2ffe36 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_attributes.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_metric_in_attributes_content import JsonApiMetricInAttributesContent +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMetricOutAttributes(BaseModel): + """ + JsonApiMetricOutAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + certification: Optional[StrictStr] = Field(default=None, description="Certification status of the entity.") + certification_message: Optional[StrictStr] = Field(default=None, description="Optional message associated with the certification.", alias="certificationMessage") + certified_at: Optional[datetime] = Field(default=None, description="Time when the certification was set.", alias="certifiedAt") + content: JsonApiMetricInAttributesContent + created_at: Optional[datetime] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + is_hidden: Optional[StrictBool] = Field(default=None, alias="isHidden") + is_hidden_from_kda: Optional[StrictBool] = Field(default=None, alias="isHiddenFromKda") + modified_at: Optional[datetime] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "certification", "certificationMessage", "certifiedAt", "content", "createdAt", "description", "isHidden", "isHiddenFromKda", "modifiedAt", "tags", "title"] + + @field_validator('certification') + def certification_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['CERTIFIED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('CERTIFIED')") + return value + + @field_validator('certified_at') + def certified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + 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 JsonApiMetricOutAttributes 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() + # set to None if certification_message (nullable) is None + # and model_fields_set contains the field + if self.certification_message is None and "certification_message" in self.model_fields_set: + _dict['certificationMessage'] = None + + # set to None if certified_at (nullable) is None + # and model_fields_set contains the field + if self.certified_at is None and "certified_at" in self.model_fields_set: + _dict['certifiedAt'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMetricOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "certification": obj.get("certification"), + "certificationMessage": obj.get("certificationMessage"), + "certifiedAt": obj.get("certifiedAt"), + "content": JsonApiMetricInAttributesContent.from_dict(obj["content"]) if obj.get("content") is not None else None, + "createdAt": obj.get("createdAt"), + "description": obj.get("description"), + "isHidden": obj.get("isHidden"), + "isHiddenFromKda": obj.get("isHiddenFromKda"), + "modifiedAt": obj.get("modifiedAt"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_document.py new file mode 100644 index 000000000..f88a2d8da --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_metric_out import JsonApiMetricOut +from gooddata_api_client.models.json_api_metric_out_includes import JsonApiMetricOutIncludes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMetricOutDocument(BaseModel): + """ + JsonApiMetricOutDocument + """ # noqa: E501 + data: JsonApiMetricOut + included: Optional[List[JsonApiMetricOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiMetricOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMetricOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiMetricOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiMetricOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_includes.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_includes.py new file mode 100644 index 000000000..c9de86a65 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_includes.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_attribute_out_with_links import JsonApiAttributeOutWithLinks +from gooddata_api_client.models.json_api_dataset_out_with_links import JsonApiDatasetOutWithLinks +from gooddata_api_client.models.json_api_fact_out_with_links import JsonApiFactOutWithLinks +from gooddata_api_client.models.json_api_label_out_with_links import JsonApiLabelOutWithLinks +from gooddata_api_client.models.json_api_metric_out_with_links import JsonApiMetricOutWithLinks +from gooddata_api_client.models.json_api_user_identifier_out_with_links import JsonApiUserIdentifierOutWithLinks +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIMETRICOUTINCLUDES_ONE_OF_SCHEMAS = ["JsonApiAttributeOutWithLinks", "JsonApiDatasetOutWithLinks", "JsonApiFactOutWithLinks", "JsonApiLabelOutWithLinks", "JsonApiMetricOutWithLinks", "JsonApiUserIdentifierOutWithLinks"] + +class JsonApiMetricOutIncludes(BaseModel): + """ + JsonApiMetricOutIncludes + """ + # data type: JsonApiUserIdentifierOutWithLinks + oneof_schema_1_validator: Optional[JsonApiUserIdentifierOutWithLinks] = None + # data type: JsonApiFactOutWithLinks + oneof_schema_2_validator: Optional[JsonApiFactOutWithLinks] = None + # data type: JsonApiAttributeOutWithLinks + oneof_schema_3_validator: Optional[JsonApiAttributeOutWithLinks] = None + # data type: JsonApiLabelOutWithLinks + oneof_schema_4_validator: Optional[JsonApiLabelOutWithLinks] = None + # data type: JsonApiMetricOutWithLinks + oneof_schema_5_validator: Optional[JsonApiMetricOutWithLinks] = None + # data type: JsonApiDatasetOutWithLinks + oneof_schema_6_validator: Optional[JsonApiDatasetOutWithLinks] = None + actual_instance: Optional[Union[JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks, JsonApiLabelOutWithLinks, JsonApiMetricOutWithLinks, JsonApiUserIdentifierOutWithLinks]] = None + one_of_schemas: Set[str] = { "JsonApiAttributeOutWithLinks", "JsonApiDatasetOutWithLinks", "JsonApiFactOutWithLinks", "JsonApiLabelOutWithLinks", "JsonApiMetricOutWithLinks", "JsonApiUserIdentifierOutWithLinks" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiMetricOutIncludes.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiUserIdentifierOutWithLinks + if not isinstance(v, JsonApiUserIdentifierOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserIdentifierOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiFactOutWithLinks + if not isinstance(v, JsonApiFactOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiFactOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiAttributeOutWithLinks + if not isinstance(v, JsonApiAttributeOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAttributeOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiLabelOutWithLinks + if not isinstance(v, JsonApiLabelOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiLabelOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiMetricOutWithLinks + if not isinstance(v, JsonApiMetricOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiMetricOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiDatasetOutWithLinks + if not isinstance(v, JsonApiDatasetOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiDatasetOutWithLinks`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiMetricOutIncludes with oneOf schemas: JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks, JsonApiLabelOutWithLinks, JsonApiMetricOutWithLinks, JsonApiUserIdentifierOutWithLinks. 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 + + # deserialize data into JsonApiUserIdentifierOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiUserIdentifierOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiFactOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiFactOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiAttributeOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAttributeOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiLabelOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiLabelOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiMetricOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiMetricOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiDatasetOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiDatasetOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiMetricOutIncludes with oneOf schemas: JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks, JsonApiLabelOutWithLinks, JsonApiMetricOutWithLinks, JsonApiUserIdentifierOutWithLinks. 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], JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks, JsonApiLabelOutWithLinks, JsonApiMetricOutWithLinks, JsonApiUserIdentifierOutWithLinks]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_list.py new file mode 100644 index 000000000..a70b6a8db --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_metric_out_includes import JsonApiMetricOutIncludes +from gooddata_api_client.models.json_api_metric_out_with_links import JsonApiMetricOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMetricOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiMetricOutWithLinks] + included: Optional[List[JsonApiMetricOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiMetricOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMetricOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiMetricOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiMetricOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_relationships.py new file mode 100644 index 000000000..9f2fa0ee0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_relationships.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_certified_by import JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_datasets import JsonApiAnalyticalDashboardOutRelationshipsDatasets +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_labels import JsonApiAnalyticalDashboardOutRelationshipsLabels +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_metrics import JsonApiAnalyticalDashboardOutRelationshipsMetrics +from gooddata_api_client.models.json_api_attribute_hierarchy_out_relationships_attributes import JsonApiAttributeHierarchyOutRelationshipsAttributes +from gooddata_api_client.models.json_api_dataset_out_relationships_facts import JsonApiDatasetOutRelationshipsFacts +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMetricOutRelationships(BaseModel): + """ + JsonApiMetricOutRelationships + """ # noqa: E501 + attributes: Optional[JsonApiAttributeHierarchyOutRelationshipsAttributes] = None + certified_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="certifiedBy") + created_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="createdBy") + datasets: Optional[JsonApiAnalyticalDashboardOutRelationshipsDatasets] = None + facts: Optional[JsonApiDatasetOutRelationshipsFacts] = None + labels: Optional[JsonApiAnalyticalDashboardOutRelationshipsLabels] = None + metrics: Optional[JsonApiAnalyticalDashboardOutRelationshipsMetrics] = None + modified_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="modifiedBy") + __properties: ClassVar[List[str]] = ["attributes", "certifiedBy", "createdBy", "datasets", "facts", "labels", "metrics", "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 JsonApiMetricOutRelationships 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of certified_by + if self.certified_by: + _dict['certifiedBy'] = self.certified_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of datasets + if self.datasets: + _dict['datasets'] = self.datasets.to_dict() + # override the default output from pydantic by calling `to_dict()` of facts + if self.facts: + _dict['facts'] = self.facts.to_dict() + # override the default output from pydantic by calling `to_dict()` of labels + if self.labels: + _dict['labels'] = self.labels.to_dict() + # override the default output from pydantic by calling `to_dict()` of metrics + if self.metrics: + _dict['metrics'] = self.metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMetricOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAttributeHierarchyOutRelationshipsAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "certifiedBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["certifiedBy"]) if obj.get("certifiedBy") is not None else None, + "createdBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "datasets": JsonApiAnalyticalDashboardOutRelationshipsDatasets.from_dict(obj["datasets"]) if obj.get("datasets") is not None else None, + "facts": JsonApiDatasetOutRelationshipsFacts.from_dict(obj["facts"]) if obj.get("facts") is not None else None, + "labels": JsonApiAnalyticalDashboardOutRelationshipsLabels.from_dict(obj["labels"]) if obj.get("labels") is not None else None, + "metrics": JsonApiAnalyticalDashboardOutRelationshipsMetrics.from_dict(obj["metrics"]) if obj.get("metrics") is not None else None, + "modifiedBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_with_links.py new file mode 100644 index 000000000..4cf295f59 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_metric_out_attributes import JsonApiMetricOutAttributes +from gooddata_api_client.models.json_api_metric_out_relationships import JsonApiMetricOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMetricOutWithLinks(BaseModel): + """ + JsonApiMetricOutWithLinks + """ # noqa: E501 + attributes: JsonApiMetricOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiMetricOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['metric']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('metric')") + 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 JsonApiMetricOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMetricOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiMetricOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiMetricOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_patch.py new file mode 100644 index 000000000..b1a0f97b1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_metric_patch_attributes import JsonApiMetricPatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMetricPatch(BaseModel): + """ + JSON:API representation of patching metric entity. + """ # noqa: E501 + attributes: JsonApiMetricPatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['metric']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('metric')") + 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 JsonApiMetricPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMetricPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiMetricPatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_patch_attributes.py new file mode 100644 index 000000000..b854a5e9d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_patch_attributes.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_metric_in_attributes_content import JsonApiMetricInAttributesContent +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMetricPatchAttributes(BaseModel): + """ + JsonApiMetricPatchAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + content: Optional[JsonApiMetricInAttributesContent] = None + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + is_hidden: Optional[StrictBool] = Field(default=None, alias="isHidden") + is_hidden_from_kda: Optional[StrictBool] = Field(default=None, alias="isHiddenFromKda") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "content", "description", "isHidden", "isHiddenFromKda", "tags", "title"] + + 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 JsonApiMetricPatchAttributes 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMetricPatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "content": JsonApiMetricInAttributesContent.from_dict(obj["content"]) if obj.get("content") is not None else None, + "description": obj.get("description"), + "isHidden": obj.get("isHidden"), + "isHiddenFromKda": obj.get("isHiddenFromKda"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_patch_document.py new file mode 100644 index 000000000..86674c24a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_metric_patch import JsonApiMetricPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMetricPatchDocument(BaseModel): + """ + JsonApiMetricPatchDocument + """ # noqa: E501 + data: JsonApiMetricPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiMetricPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMetricPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiMetricPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_post_optional_id.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_post_optional_id.py new file mode 100644 index 000000000..1cbacef85 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_post_optional_id.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_metric_in_attributes import JsonApiMetricInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMetricPostOptionalId(BaseModel): + """ + JSON:API representation of metric entity. + """ # noqa: E501 + attributes: JsonApiMetricInAttributes + id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @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"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['metric']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('metric')") + 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 JsonApiMetricPostOptionalId 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMetricPostOptionalId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiMetricInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_post_optional_id_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_post_optional_id_document.py new file mode 100644 index 000000000..d1f8ddd9d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_post_optional_id_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_metric_post_optional_id import JsonApiMetricPostOptionalId +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiMetricPostOptionalIdDocument(BaseModel): + """ + JsonApiMetricPostOptionalIdDocument + """ # noqa: E501 + data: JsonApiMetricPostOptionalId + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiMetricPostOptionalIdDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiMetricPostOptionalIdDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiMetricPostOptionalId.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_metric_to_one_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_metric_to_one_linkage.py new file mode 100644 index 000000000..fa985e933 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_metric_to_one_linkage.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_metric_linkage import JsonApiMetricLinkage +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIMETRICTOONELINKAGE_ONE_OF_SCHEMAS = ["JsonApiMetricLinkage"] + +class JsonApiMetricToOneLinkage(BaseModel): + """ + References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + """ + # data type: JsonApiMetricLinkage + oneof_schema_1_validator: Optional[JsonApiMetricLinkage] = None + actual_instance: Optional[Union[JsonApiMetricLinkage]] = None + one_of_schemas: Set[str] = { "JsonApiMetricLinkage" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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): + if v is None: + return v + + instance = JsonApiMetricToOneLinkage.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiMetricLinkage + if not isinstance(v, JsonApiMetricLinkage): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiMetricLinkage`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiMetricToOneLinkage with oneOf schemas: JsonApiMetricLinkage. 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: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into JsonApiMetricLinkage + try: + if match == 0: + instance.actual_instance = JsonApiMetricLinkage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiMetricToOneLinkage with oneOf schemas: JsonApiMetricLinkage. 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], JsonApiMetricLinkage]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out.py new file mode 100644 index 000000000..63407ac9e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_notification_channel_identifier_out_attributes import JsonApiNotificationChannelIdentifierOutAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelIdentifierOut(BaseModel): + """ + JSON:API representation of notificationChannelIdentifier entity. + """ # noqa: E501 + attributes: Optional[JsonApiNotificationChannelIdentifierOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['notificationChannelIdentifier']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('notificationChannelIdentifier')") + 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 JsonApiNotificationChannelIdentifierOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelIdentifierOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiNotificationChannelIdentifierOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_attributes.py new file mode 100644 index 000000000..923f51035 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_attributes.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiNotificationChannelIdentifierOutAttributes(BaseModel): + """ + JsonApiNotificationChannelIdentifierOutAttributes + """ # noqa: E501 + allowed_recipients: Optional[StrictStr] = Field(default=None, description="Allowed recipients of notifications from this channel. CREATOR - only the creator INTERNAL - all users within the organization EXTERNAL - all recipients including those outside the organization ", alias="allowedRecipients") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + destination_type: Optional[StrictStr] = Field(default=None, alias="destinationType") + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["allowedRecipients", "description", "destinationType", "name"] + + @field_validator('allowed_recipients') + def allowed_recipients_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['CREATOR', 'INTERNAL', 'EXTERNAL']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('CREATOR', 'INTERNAL', 'EXTERNAL')") + return value + + @field_validator('destination_type') + def destination_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['WEBHOOK', 'SMTP', 'DEFAULT_SMTP', 'IN_PLATFORM']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('WEBHOOK', 'SMTP', 'DEFAULT_SMTP', 'IN_PLATFORM')") + 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 JsonApiNotificationChannelIdentifierOutAttributes 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 description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelIdentifierOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowedRecipients": obj.get("allowedRecipients"), + "description": obj.get("description"), + "destinationType": obj.get("destinationType"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_document.py new file mode 100644 index 000000000..be42e7cc8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_notification_channel_identifier_out import JsonApiNotificationChannelIdentifierOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelIdentifierOutDocument(BaseModel): + """ + JsonApiNotificationChannelIdentifierOutDocument + """ # noqa: E501 + data: JsonApiNotificationChannelIdentifierOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiNotificationChannelIdentifierOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelIdentifierOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiNotificationChannelIdentifierOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_list.py new file mode 100644 index 000000000..b9a47fc90 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_notification_channel_identifier_out_with_links import JsonApiNotificationChannelIdentifierOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelIdentifierOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiNotificationChannelIdentifierOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiNotificationChannelIdentifierOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelIdentifierOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiNotificationChannelIdentifierOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_with_links.py new file mode 100644 index 000000000..56c1b2ca1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_identifier_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_notification_channel_identifier_out_attributes import JsonApiNotificationChannelIdentifierOutAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelIdentifierOutWithLinks(BaseModel): + """ + JsonApiNotificationChannelIdentifierOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiNotificationChannelIdentifierOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['notificationChannelIdentifier']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('notificationChannelIdentifier')") + 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 JsonApiNotificationChannelIdentifierOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelIdentifierOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiNotificationChannelIdentifierOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in.py new file mode 100644 index 000000000..55b832eae --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_notification_channel_in_attributes import JsonApiNotificationChannelInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelIn(BaseModel): + """ + JSON:API representation of notificationChannel entity. + """ # noqa: E501 + attributes: Optional[JsonApiNotificationChannelInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['notificationChannel']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('notificationChannel')") + 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 JsonApiNotificationChannelIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiNotificationChannelInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in_attributes.py new file mode 100644 index 000000000..91b7a3836 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in_attributes.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_notification_channel_in_attributes_destination import JsonApiNotificationChannelInAttributesDestination +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelInAttributes(BaseModel): + """ + JsonApiNotificationChannelInAttributes + """ # noqa: E501 + allowed_recipients: Optional[StrictStr] = Field(default=None, description="Allowed recipients of notifications from this channel. CREATOR - only the creator INTERNAL - all users within the organization EXTERNAL - all recipients including those outside the organization ", alias="allowedRecipients") + custom_dashboard_url: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Custom dashboard url that is going to be used in the notification. If not specified it is going to be deduced based on the context. Allowed placeholders are: {workspaceId} {dashboardId} {automationId} {asOfDate} ", alias="customDashboardUrl") + dashboard_link_visibility: Optional[StrictStr] = Field(default=None, description="Dashboard link visibility in notifications. HIDDEN - the link will not be included INTERNAL_ONLY - only internal users will see the link ALL - all users will see the link ", alias="dashboardLinkVisibility") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + destination: Optional[JsonApiNotificationChannelInAttributesDestination] = None + in_platform_notification: Optional[StrictStr] = Field(default=None, description="In-platform notifications configuration. No effect if the destination type is IN_PLATFORM. DISABLED - in-platform notifications are not sent ENABLED - in-platform notifications are sent in addition to the regular notifications ", alias="inPlatformNotification") + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + notification_source: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Human-readable description of the source of the notification. If specified, this propertywill be included in the notifications to this channel.Allowed placeholders are: {{workspaceId}} {{workspaceName}} {{workspaceDescription}} {{dashboardId}} {{dashboardName}} {{dashboardDescription}} ", alias="notificationSource") + __properties: ClassVar[List[str]] = ["allowedRecipients", "customDashboardUrl", "dashboardLinkVisibility", "description", "destination", "inPlatformNotification", "name", "notificationSource"] + + @field_validator('allowed_recipients') + def allowed_recipients_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['CREATOR', 'INTERNAL', 'EXTERNAL']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('CREATOR', 'INTERNAL', 'EXTERNAL')") + return value + + @field_validator('dashboard_link_visibility') + def dashboard_link_visibility_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['HIDDEN', 'INTERNAL_ONLY', 'ALL']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('HIDDEN', 'INTERNAL_ONLY', 'ALL')") + return value + + @field_validator('in_platform_notification') + def in_platform_notification_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['DISABLED', 'ENABLED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('DISABLED', 'ENABLED')") + 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 JsonApiNotificationChannelInAttributes 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 destination + if self.destination: + _dict['destination'] = self.destination.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowedRecipients": obj.get("allowedRecipients"), + "customDashboardUrl": obj.get("customDashboardUrl"), + "dashboardLinkVisibility": obj.get("dashboardLinkVisibility"), + "description": obj.get("description"), + "destination": JsonApiNotificationChannelInAttributesDestination.from_dict(obj["destination"]) if obj.get("destination") is not None else None, + "inPlatformNotification": obj.get("inPlatformNotification"), + "name": obj.get("name"), + "notificationSource": obj.get("notificationSource") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in_attributes_destination.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in_attributes_destination.py new file mode 100644 index 000000000..d9f3d58a1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in_attributes_destination.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.default_smtp import DefaultSmtp +from gooddata_api_client.models.in_platform import InPlatform +from gooddata_api_client.models.smtp import Smtp +from gooddata_api_client.models.webhook import Webhook +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPINOTIFICATIONCHANNELINATTRIBUTESDESTINATION_ONE_OF_SCHEMAS = ["DefaultSmtp", "InPlatform", "Smtp", "Webhook"] + +class JsonApiNotificationChannelInAttributesDestination(BaseModel): + """ + The destination where the notifications are to be sent. + """ + # data type: DefaultSmtp + oneof_schema_1_validator: Optional[DefaultSmtp] = None + # data type: InPlatform + oneof_schema_2_validator: Optional[InPlatform] = None + # data type: Smtp + oneof_schema_3_validator: Optional[Smtp] = None + # data type: Webhook + oneof_schema_4_validator: Optional[Webhook] = None + actual_instance: Optional[Union[DefaultSmtp, InPlatform, Smtp, Webhook]] = None + one_of_schemas: Set[str] = { "DefaultSmtp", "InPlatform", "Smtp", "Webhook" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiNotificationChannelInAttributesDestination.model_construct() + error_messages = [] + match = 0 + # validate data type: DefaultSmtp + if not isinstance(v, DefaultSmtp): + error_messages.append(f"Error! Input type `{type(v)}` is not `DefaultSmtp`") + else: + match += 1 + # validate data type: InPlatform + if not isinstance(v, InPlatform): + error_messages.append(f"Error! Input type `{type(v)}` is not `InPlatform`") + else: + match += 1 + # validate data type: Smtp + if not isinstance(v, Smtp): + error_messages.append(f"Error! Input type `{type(v)}` is not `Smtp`") + else: + match += 1 + # validate data type: Webhook + if not isinstance(v, Webhook): + error_messages.append(f"Error! Input type `{type(v)}` is not `Webhook`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiNotificationChannelInAttributesDestination with oneOf schemas: DefaultSmtp, InPlatform, Smtp, Webhook. 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 + + # deserialize data into DefaultSmtp + try: + if match == 0: + instance.actual_instance = DefaultSmtp.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into InPlatform + try: + if match == 0: + instance.actual_instance = InPlatform.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Smtp + try: + if match == 0: + instance.actual_instance = Smtp.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Webhook + try: + if match == 0: + instance.actual_instance = Webhook.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiNotificationChannelInAttributesDestination with oneOf schemas: DefaultSmtp, InPlatform, Smtp, Webhook. 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], DefaultSmtp, InPlatform, Smtp, Webhook]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in_document.py new file mode 100644 index 000000000..631bdeed4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_notification_channel_in import JsonApiNotificationChannelIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelInDocument(BaseModel): + """ + JsonApiNotificationChannelInDocument + """ # noqa: E501 + data: JsonApiNotificationChannelIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiNotificationChannelInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiNotificationChannelIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_linkage.py new file mode 100644 index 000000000..0f6a9f0fb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiNotificationChannelLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['notificationChannel']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('notificationChannel')") + 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 JsonApiNotificationChannelLinkage 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 JsonApiNotificationChannelLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out.py new file mode 100644 index 000000000..ffd18f71b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_notification_channel_out_attributes import JsonApiNotificationChannelOutAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelOut(BaseModel): + """ + JSON:API representation of notificationChannel entity. + """ # noqa: E501 + attributes: Optional[JsonApiNotificationChannelOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['notificationChannel']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('notificationChannel')") + 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 JsonApiNotificationChannelOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiNotificationChannelOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_attributes.py new file mode 100644 index 000000000..bead2ec31 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_attributes.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_notification_channel_in_attributes_destination import JsonApiNotificationChannelInAttributesDestination +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelOutAttributes(BaseModel): + """ + JsonApiNotificationChannelOutAttributes + """ # noqa: E501 + allowed_recipients: Optional[StrictStr] = Field(default=None, description="Allowed recipients of notifications from this channel. CREATOR - only the creator INTERNAL - all users within the organization EXTERNAL - all recipients including those outside the organization ", alias="allowedRecipients") + custom_dashboard_url: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Custom dashboard url that is going to be used in the notification. If not specified it is going to be deduced based on the context. Allowed placeholders are: {workspaceId} {dashboardId} {automationId} {asOfDate} ", alias="customDashboardUrl") + dashboard_link_visibility: Optional[StrictStr] = Field(default=None, description="Dashboard link visibility in notifications. HIDDEN - the link will not be included INTERNAL_ONLY - only internal users will see the link ALL - all users will see the link ", alias="dashboardLinkVisibility") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + destination: Optional[JsonApiNotificationChannelInAttributesDestination] = None + destination_type: Optional[StrictStr] = Field(default=None, alias="destinationType") + in_platform_notification: Optional[StrictStr] = Field(default=None, description="In-platform notifications configuration. No effect if the destination type is IN_PLATFORM. DISABLED - in-platform notifications are not sent ENABLED - in-platform notifications are sent in addition to the regular notifications ", alias="inPlatformNotification") + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + notification_source: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Human-readable description of the source of the notification. If specified, this propertywill be included in the notifications to this channel.Allowed placeholders are: {{workspaceId}} {{workspaceName}} {{workspaceDescription}} {{dashboardId}} {{dashboardName}} {{dashboardDescription}} ", alias="notificationSource") + __properties: ClassVar[List[str]] = ["allowedRecipients", "customDashboardUrl", "dashboardLinkVisibility", "description", "destination", "destinationType", "inPlatformNotification", "name", "notificationSource"] + + @field_validator('allowed_recipients') + def allowed_recipients_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['CREATOR', 'INTERNAL', 'EXTERNAL']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('CREATOR', 'INTERNAL', 'EXTERNAL')") + return value + + @field_validator('dashboard_link_visibility') + def dashboard_link_visibility_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['HIDDEN', 'INTERNAL_ONLY', 'ALL']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('HIDDEN', 'INTERNAL_ONLY', 'ALL')") + return value + + @field_validator('destination_type') + def destination_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['WEBHOOK', 'SMTP', 'DEFAULT_SMTP', 'IN_PLATFORM']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('WEBHOOK', 'SMTP', 'DEFAULT_SMTP', 'IN_PLATFORM')") + return value + + @field_validator('in_platform_notification') + def in_platform_notification_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['DISABLED', 'ENABLED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('DISABLED', 'ENABLED')") + 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 JsonApiNotificationChannelOutAttributes 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 destination + if self.destination: + _dict['destination'] = self.destination.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if destination_type (nullable) is None + # and model_fields_set contains the field + if self.destination_type is None and "destination_type" in self.model_fields_set: + _dict['destinationType'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowedRecipients": obj.get("allowedRecipients"), + "customDashboardUrl": obj.get("customDashboardUrl"), + "dashboardLinkVisibility": obj.get("dashboardLinkVisibility"), + "description": obj.get("description"), + "destination": JsonApiNotificationChannelInAttributesDestination.from_dict(obj["destination"]) if obj.get("destination") is not None else None, + "destinationType": obj.get("destinationType"), + "inPlatformNotification": obj.get("inPlatformNotification"), + "name": obj.get("name"), + "notificationSource": obj.get("notificationSource") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_document.py new file mode 100644 index 000000000..21f061676 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_notification_channel_out import JsonApiNotificationChannelOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelOutDocument(BaseModel): + """ + JsonApiNotificationChannelOutDocument + """ # noqa: E501 + data: JsonApiNotificationChannelOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiNotificationChannelOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiNotificationChannelOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_list.py new file mode 100644 index 000000000..611096df1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_notification_channel_out_with_links import JsonApiNotificationChannelOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiNotificationChannelOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiNotificationChannelOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiNotificationChannelOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_with_links.py new file mode 100644 index 000000000..bd5f69c9d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_notification_channel_out_attributes import JsonApiNotificationChannelOutAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelOutWithLinks(BaseModel): + """ + JsonApiNotificationChannelOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiNotificationChannelOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['notificationChannel']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('notificationChannel')") + 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 JsonApiNotificationChannelOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiNotificationChannelOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_patch.py new file mode 100644 index 000000000..5270b7b5d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_notification_channel_in_attributes import JsonApiNotificationChannelInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelPatch(BaseModel): + """ + JSON:API representation of patching notificationChannel entity. + """ # noqa: E501 + attributes: Optional[JsonApiNotificationChannelInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['notificationChannel']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('notificationChannel')") + 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 JsonApiNotificationChannelPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiNotificationChannelInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_patch_document.py new file mode 100644 index 000000000..1ff9ada59 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_notification_channel_patch import JsonApiNotificationChannelPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelPatchDocument(BaseModel): + """ + JsonApiNotificationChannelPatchDocument + """ # noqa: E501 + data: JsonApiNotificationChannelPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiNotificationChannelPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiNotificationChannelPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_post_optional_id.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_post_optional_id.py new file mode 100644 index 000000000..b5c569a57 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_post_optional_id.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_notification_channel_in_attributes import JsonApiNotificationChannelInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelPostOptionalId(BaseModel): + """ + JSON:API representation of notificationChannel entity. + """ # noqa: E501 + attributes: Optional[JsonApiNotificationChannelInAttributes] = None + id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @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"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['notificationChannel']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('notificationChannel')") + 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 JsonApiNotificationChannelPostOptionalId 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelPostOptionalId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiNotificationChannelInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_post_optional_id_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_post_optional_id_document.py new file mode 100644 index 000000000..c2345591b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_post_optional_id_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_notification_channel_post_optional_id import JsonApiNotificationChannelPostOptionalId +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiNotificationChannelPostOptionalIdDocument(BaseModel): + """ + JsonApiNotificationChannelPostOptionalIdDocument + """ # noqa: E501 + data: JsonApiNotificationChannelPostOptionalId + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiNotificationChannelPostOptionalIdDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiNotificationChannelPostOptionalIdDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiNotificationChannelPostOptionalId.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_to_one_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_to_one_linkage.py new file mode 100644 index 000000000..e1f36a797 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_notification_channel_to_one_linkage.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_notification_channel_linkage import JsonApiNotificationChannelLinkage +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPINOTIFICATIONCHANNELTOONELINKAGE_ONE_OF_SCHEMAS = ["JsonApiNotificationChannelLinkage"] + +class JsonApiNotificationChannelToOneLinkage(BaseModel): + """ + References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + """ + # data type: JsonApiNotificationChannelLinkage + oneof_schema_1_validator: Optional[JsonApiNotificationChannelLinkage] = None + actual_instance: Optional[Union[JsonApiNotificationChannelLinkage]] = None + one_of_schemas: Set[str] = { "JsonApiNotificationChannelLinkage" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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): + if v is None: + return v + + instance = JsonApiNotificationChannelToOneLinkage.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiNotificationChannelLinkage + if not isinstance(v, JsonApiNotificationChannelLinkage): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiNotificationChannelLinkage`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiNotificationChannelToOneLinkage with oneOf schemas: JsonApiNotificationChannelLinkage. 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: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into JsonApiNotificationChannelLinkage + try: + if match == 0: + instance.actual_instance = JsonApiNotificationChannelLinkage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiNotificationChannelToOneLinkage with oneOf schemas: JsonApiNotificationChannelLinkage. 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], JsonApiNotificationChannelLinkage]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_organization_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_in.py new file mode 100644 index 000000000..82cfbab25 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_in.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_organization_in_attributes import JsonApiOrganizationInAttributes +from gooddata_api_client.models.json_api_organization_in_relationships import JsonApiOrganizationInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationIn(BaseModel): + """ + JSON:API representation of organization entity. + """ # noqa: E501 + attributes: Optional[JsonApiOrganizationInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiOrganizationInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['organization']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('organization')") + 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 JsonApiOrganizationIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiOrganizationInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiOrganizationInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_in_attributes.py new file mode 100644 index 000000000..856504568 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_in_attributes.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationInAttributes(BaseModel): + """ + JsonApiOrganizationInAttributes + """ # noqa: E501 + allowed_origins: Optional[List[StrictStr]] = Field(default=None, alias="allowedOrigins") + early_access: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The early access feature identifier. It is used to enable experimental features. Deprecated in favor of earlyAccessValues.", alias="earlyAccess") + early_access_values: Optional[List[Annotated[str, Field(strict=True, max_length=255)]]] = Field(default=None, description="The early access feature identifiers. They are used to enable experimental features.", alias="earlyAccessValues") + hostname: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["allowedOrigins", "earlyAccess", "earlyAccessValues", "hostname", "name"] + + 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 JsonApiOrganizationInAttributes 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 early_access (nullable) is None + # and model_fields_set contains the field + if self.early_access is None and "early_access" in self.model_fields_set: + _dict['earlyAccess'] = None + + # set to None if early_access_values (nullable) is None + # and model_fields_set contains the field + if self.early_access_values is None and "early_access_values" in self.model_fields_set: + _dict['earlyAccessValues'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowedOrigins": obj.get("allowedOrigins"), + "earlyAccess": obj.get("earlyAccess"), + "earlyAccessValues": obj.get("earlyAccessValues"), + "hostname": obj.get("hostname"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_in_document.py new file mode 100644 index 000000000..cc8c26f4c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_organization_in import JsonApiOrganizationIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationInDocument(BaseModel): + """ + JsonApiOrganizationInDocument + """ # noqa: E501 + data: JsonApiOrganizationIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiOrganizationInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiOrganizationIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_in_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_in_relationships.py new file mode 100644 index 000000000..5c34b5e41 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_in_relationships.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_organization_in_relationships_identity_provider import JsonApiOrganizationInRelationshipsIdentityProvider +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationInRelationships(BaseModel): + """ + JsonApiOrganizationInRelationships + """ # noqa: E501 + identity_provider: Optional[JsonApiOrganizationInRelationshipsIdentityProvider] = Field(default=None, alias="identityProvider") + __properties: ClassVar[List[str]] = ["identityProvider"] + + 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 JsonApiOrganizationInRelationships 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 identity_provider + if self.identity_provider: + _dict['identityProvider'] = self.identity_provider.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationInRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identityProvider": JsonApiOrganizationInRelationshipsIdentityProvider.from_dict(obj["identityProvider"]) if obj.get("identityProvider") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_in_relationships_identity_provider.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_in_relationships_identity_provider.py new file mode 100644 index 000000000..9e0a4ead5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_in_relationships_identity_provider.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_identity_provider_to_one_linkage import JsonApiIdentityProviderToOneLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationInRelationshipsIdentityProvider(BaseModel): + """ + JsonApiOrganizationInRelationshipsIdentityProvider + """ # noqa: E501 + data: Optional[JsonApiIdentityProviderToOneLinkage] + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiOrganizationInRelationshipsIdentityProvider 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationInRelationshipsIdentityProvider from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiIdentityProviderToOneLinkage.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out.py new file mode 100644 index 000000000..0068caf06 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_organization_out_attributes import JsonApiOrganizationOutAttributes +from gooddata_api_client.models.json_api_organization_out_meta import JsonApiOrganizationOutMeta +from gooddata_api_client.models.json_api_organization_out_relationships import JsonApiOrganizationOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationOut(BaseModel): + """ + JSON:API representation of organization entity. + """ # noqa: E501 + attributes: Optional[JsonApiOrganizationOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiOrganizationOutMeta] = None + relationships: Optional[JsonApiOrganizationOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['organization']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('organization')") + 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 JsonApiOrganizationOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiOrganizationOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiOrganizationOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiOrganizationOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_attributes.py new file mode 100644 index 000000000..b5d6d783d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_attributes.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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_extensions import Annotated +from gooddata_api_client.models.json_api_organization_out_attributes_cache_settings import JsonApiOrganizationOutAttributesCacheSettings +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationOutAttributes(BaseModel): + """ + JsonApiOrganizationOutAttributes + """ # noqa: E501 + allowed_origins: Optional[List[StrictStr]] = Field(default=None, alias="allowedOrigins") + cache_settings: Optional[JsonApiOrganizationOutAttributesCacheSettings] = Field(default=None, alias="cacheSettings") + data_center: Optional[StrictStr] = Field(default=None, description="Current deployment region. Should be used for issue investigation only.", alias="dataCenter") + early_access: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The early access feature identifier. It is used to enable experimental features. Deprecated in favor of earlyAccessValues.", alias="earlyAccess") + early_access_values: Optional[List[Annotated[str, Field(strict=True, max_length=255)]]] = Field(default=None, description="The early access feature identifiers. They are used to enable experimental features.", alias="earlyAccessValues") + hostname: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + region: Optional[StrictStr] = Field(default=None, description="Current deployment cluster name. Should be used for issue investigation only.") + __properties: ClassVar[List[str]] = ["allowedOrigins", "cacheSettings", "dataCenter", "earlyAccess", "earlyAccessValues", "hostname", "name", "region"] + + 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 JsonApiOrganizationOutAttributes 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 cache_settings + if self.cache_settings: + _dict['cacheSettings'] = self.cache_settings.to_dict() + # set to None if data_center (nullable) is None + # and model_fields_set contains the field + if self.data_center is None and "data_center" in self.model_fields_set: + _dict['dataCenter'] = None + + # set to None if early_access (nullable) is None + # and model_fields_set contains the field + if self.early_access is None and "early_access" in self.model_fields_set: + _dict['earlyAccess'] = None + + # set to None if early_access_values (nullable) is None + # and model_fields_set contains the field + if self.early_access_values is None and "early_access_values" in self.model_fields_set: + _dict['earlyAccessValues'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if region (nullable) is None + # and model_fields_set contains the field + if self.region is None and "region" in self.model_fields_set: + _dict['region'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowedOrigins": obj.get("allowedOrigins"), + "cacheSettings": JsonApiOrganizationOutAttributesCacheSettings.from_dict(obj["cacheSettings"]) if obj.get("cacheSettings") is not None else None, + "dataCenter": obj.get("dataCenter"), + "earlyAccess": obj.get("earlyAccess"), + "earlyAccessValues": obj.get("earlyAccessValues"), + "hostname": obj.get("hostname"), + "name": obj.get("name"), + "region": obj.get("region") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_attributes_cache_settings.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_attributes_cache_settings.py new file mode 100644 index 000000000..0a207c0b8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_attributes_cache_settings.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, 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 JsonApiOrganizationOutAttributesCacheSettings(BaseModel): + """ + JsonApiOrganizationOutAttributesCacheSettings + """ # noqa: E501 + cache_strategy: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, alias="cacheStrategy") + extra_cache_budget: Optional[StrictInt] = Field(default=None, alias="extraCacheBudget") + __properties: ClassVar[List[str]] = ["cacheStrategy", "extraCacheBudget"] + + @field_validator('cache_strategy') + def cache_strategy_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['DURABLE', 'EPHEMERAL']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('DURABLE', 'EPHEMERAL')") + 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 JsonApiOrganizationOutAttributesCacheSettings 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 JsonApiOrganizationOutAttributesCacheSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cacheStrategy": obj.get("cacheStrategy"), + "extraCacheBudget": obj.get("extraCacheBudget") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_document.py new file mode 100644 index 000000000..44657bacd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_organization_out import JsonApiOrganizationOut +from gooddata_api_client.models.json_api_organization_out_includes import JsonApiOrganizationOutIncludes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationOutDocument(BaseModel): + """ + JsonApiOrganizationOutDocument + """ # noqa: E501 + data: JsonApiOrganizationOut + included: Optional[List[JsonApiOrganizationOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiOrganizationOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiOrganizationOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiOrganizationOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_includes.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_includes.py new file mode 100644 index 000000000..688d760ad --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_includes.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_identity_provider_out_with_links import JsonApiIdentityProviderOutWithLinks +from gooddata_api_client.models.json_api_user_group_out_with_links import JsonApiUserGroupOutWithLinks +from gooddata_api_client.models.json_api_user_out_with_links import JsonApiUserOutWithLinks +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIORGANIZATIONOUTINCLUDES_ONE_OF_SCHEMAS = ["JsonApiIdentityProviderOutWithLinks", "JsonApiUserGroupOutWithLinks", "JsonApiUserOutWithLinks"] + +class JsonApiOrganizationOutIncludes(BaseModel): + """ + JsonApiOrganizationOutIncludes + """ + # data type: JsonApiUserOutWithLinks + oneof_schema_1_validator: Optional[JsonApiUserOutWithLinks] = None + # data type: JsonApiUserGroupOutWithLinks + oneof_schema_2_validator: Optional[JsonApiUserGroupOutWithLinks] = None + # data type: JsonApiIdentityProviderOutWithLinks + oneof_schema_3_validator: Optional[JsonApiIdentityProviderOutWithLinks] = None + actual_instance: Optional[Union[JsonApiIdentityProviderOutWithLinks, JsonApiUserGroupOutWithLinks, JsonApiUserOutWithLinks]] = None + one_of_schemas: Set[str] = { "JsonApiIdentityProviderOutWithLinks", "JsonApiUserGroupOutWithLinks", "JsonApiUserOutWithLinks" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiOrganizationOutIncludes.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiUserOutWithLinks + if not isinstance(v, JsonApiUserOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiUserGroupOutWithLinks + if not isinstance(v, JsonApiUserGroupOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserGroupOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiIdentityProviderOutWithLinks + if not isinstance(v, JsonApiIdentityProviderOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiIdentityProviderOutWithLinks`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiOrganizationOutIncludes with oneOf schemas: JsonApiIdentityProviderOutWithLinks, JsonApiUserGroupOutWithLinks, JsonApiUserOutWithLinks. 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 + + # deserialize data into JsonApiUserOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiUserOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiUserGroupOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiUserGroupOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiIdentityProviderOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiIdentityProviderOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiOrganizationOutIncludes with oneOf schemas: JsonApiIdentityProviderOutWithLinks, JsonApiUserGroupOutWithLinks, JsonApiUserOutWithLinks. 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], JsonApiIdentityProviderOutWithLinks, JsonApiUserGroupOutWithLinks, JsonApiUserOutWithLinks]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_meta.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_meta.py new file mode 100644 index 000000000..ad94800f3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_meta.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationOutMeta(BaseModel): + """ + JsonApiOrganizationOutMeta + """ # noqa: E501 + permissions: Optional[List[StrictStr]] = Field(default=None, description="List of valid permissions for a logged-in user.") + __properties: ClassVar[List[str]] = ["permissions"] + + @field_validator('permissions') + def permissions_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['MANAGE', 'SELF_CREATE_TOKEN', 'BASE_UI_ACCESS']): + raise ValueError("each list item must be one of ('MANAGE', 'SELF_CREATE_TOKEN', 'BASE_UI_ACCESS')") + 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 JsonApiOrganizationOutMeta 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 JsonApiOrganizationOutMeta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "permissions": obj.get("permissions") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_relationships.py new file mode 100644 index 000000000..a3f46e7fb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_relationships.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_filter_view_in_relationships_user import JsonApiFilterViewInRelationshipsUser +from gooddata_api_client.models.json_api_organization_in_relationships_identity_provider import JsonApiOrganizationInRelationshipsIdentityProvider +from gooddata_api_client.models.json_api_organization_out_relationships_bootstrap_user_group import JsonApiOrganizationOutRelationshipsBootstrapUserGroup +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationOutRelationships(BaseModel): + """ + JsonApiOrganizationOutRelationships + """ # noqa: E501 + bootstrap_user: Optional[JsonApiFilterViewInRelationshipsUser] = Field(default=None, alias="bootstrapUser") + bootstrap_user_group: Optional[JsonApiOrganizationOutRelationshipsBootstrapUserGroup] = Field(default=None, alias="bootstrapUserGroup") + identity_provider: Optional[JsonApiOrganizationInRelationshipsIdentityProvider] = Field(default=None, alias="identityProvider") + __properties: ClassVar[List[str]] = ["bootstrapUser", "bootstrapUserGroup", "identityProvider"] + + 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 JsonApiOrganizationOutRelationships 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 bootstrap_user + if self.bootstrap_user: + _dict['bootstrapUser'] = self.bootstrap_user.to_dict() + # override the default output from pydantic by calling `to_dict()` of bootstrap_user_group + if self.bootstrap_user_group: + _dict['bootstrapUserGroup'] = self.bootstrap_user_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of identity_provider + if self.identity_provider: + _dict['identityProvider'] = self.identity_provider.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bootstrapUser": JsonApiFilterViewInRelationshipsUser.from_dict(obj["bootstrapUser"]) if obj.get("bootstrapUser") is not None else None, + "bootstrapUserGroup": JsonApiOrganizationOutRelationshipsBootstrapUserGroup.from_dict(obj["bootstrapUserGroup"]) if obj.get("bootstrapUserGroup") is not None else None, + "identityProvider": JsonApiOrganizationInRelationshipsIdentityProvider.from_dict(obj["identityProvider"]) if obj.get("identityProvider") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_relationships_bootstrap_user_group.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_relationships_bootstrap_user_group.py new file mode 100644 index 000000000..a5b44beff --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_out_relationships_bootstrap_user_group.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_user_group_to_one_linkage import JsonApiUserGroupToOneLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationOutRelationshipsBootstrapUserGroup(BaseModel): + """ + JsonApiOrganizationOutRelationshipsBootstrapUserGroup + """ # noqa: E501 + data: Optional[JsonApiUserGroupToOneLinkage] + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiOrganizationOutRelationshipsBootstrapUserGroup 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationOutRelationshipsBootstrapUserGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserGroupToOneLinkage.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_patch.py new file mode 100644 index 000000000..16fdc94c9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_patch.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_organization_in_attributes import JsonApiOrganizationInAttributes +from gooddata_api_client.models.json_api_organization_in_relationships import JsonApiOrganizationInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationPatch(BaseModel): + """ + JSON:API representation of patching organization entity. + """ # noqa: E501 + attributes: Optional[JsonApiOrganizationInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiOrganizationInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['organization']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('organization')") + 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 JsonApiOrganizationPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiOrganizationInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiOrganizationInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_patch_document.py new file mode 100644 index 000000000..a188721c6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_organization_patch import JsonApiOrganizationPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationPatchDocument(BaseModel): + """ + JsonApiOrganizationPatchDocument + """ # noqa: E501 + data: JsonApiOrganizationPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiOrganizationPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiOrganizationPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_in.py new file mode 100644 index 000000000..bda5158d2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_organization_setting_in_attributes import JsonApiOrganizationSettingInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationSettingIn(BaseModel): + """ + JSON:API representation of organizationSetting entity. + """ # noqa: E501 + attributes: Optional[JsonApiOrganizationSettingInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['organizationSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('organizationSetting')") + 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 JsonApiOrganizationSettingIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationSettingIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiOrganizationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_in_attributes.py new file mode 100644 index 000000000..1ecccf9d7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_in_attributes.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationSettingInAttributes(BaseModel): + """ + JsonApiOrganizationSettingInAttributes + """ # noqa: E501 + content: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON content. Maximum supported length is 15000 characters.") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["content", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['TIMEZONE', 'ACTIVE_THEME', 'ACTIVE_COLOR_PALETTE', 'ACTIVE_LLM_ENDPOINT', 'ACTIVE_LLM_PROVIDER', 'ACTIVE_CALENDARS', 'WHITE_LABELING', 'LOCALE', 'METADATA_LOCALE', 'FORMAT_LOCALE', 'MAPBOX_TOKEN', 'AG_GRID_TOKEN', 'WEEK_START', 'FISCAL_YEAR', 'SHOW_HIDDEN_CATALOG_ITEMS', 'OPERATOR_OVERRIDES', 'TIMEZONE_VALIDATION_ENABLED', 'OPENAI_CONFIG', 'ENABLE_FILE_ANALYTICS', 'ALERT', 'SEPARATORS', 'DATE_FILTER_CONFIG', 'JIT_PROVISIONING', 'JWT_JIT_PROVISIONING', 'DASHBOARD_FILTERS_APPLY_MODE', 'ENABLE_SLIDES_EXPORT', 'ENABLE_SNAPSHOT_EXPORT', 'AI_RATE_LIMIT', 'ATTACHMENT_SIZE_LIMIT', 'ATTACHMENT_LINK_TTL', 'AD_CATALOG_GROUPS_DEFAULT_EXPAND_STATE', 'ENABLE_DRILL_TO_URL_BY_DEFAULT', 'ALLOW_UNSAFE_FLEX_CONNECT_ENDPOINTS', 'ENABLE_AUTOMATION_EVALUATION_MODE', 'ENABLE_ACCESSIBILITY_MODE', 'REGISTERED_PLUGGABLE_APPLICATIONS', 'DATA_LOCALE', 'LDM_DEFAULT_LOCALE', 'EXPORT_RESULT_POLLING_TIMEOUT_SECONDS', 'MAX_ZOOM_LEVEL', 'SORT_CASE_SENSITIVE', 'METRIC_FORMAT_OVERRIDE', 'ENABLE_AI_ON_DATA', 'API_ENTITIES_DEFAULT_CONTENT_MEDIA_TYPE', 'ENABLE_NULL_JOINS', 'EXPORT_CSV_CUSTOM_DELIMITER', 'ENABLE_QUERY_TAGS', 'RESTRICT_BASE_UI', 'CERTIFY_PARENT_OBJECTS']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('TIMEZONE', 'ACTIVE_THEME', 'ACTIVE_COLOR_PALETTE', 'ACTIVE_LLM_ENDPOINT', 'ACTIVE_LLM_PROVIDER', 'ACTIVE_CALENDARS', 'WHITE_LABELING', 'LOCALE', 'METADATA_LOCALE', 'FORMAT_LOCALE', 'MAPBOX_TOKEN', 'AG_GRID_TOKEN', 'WEEK_START', 'FISCAL_YEAR', 'SHOW_HIDDEN_CATALOG_ITEMS', 'OPERATOR_OVERRIDES', 'TIMEZONE_VALIDATION_ENABLED', 'OPENAI_CONFIG', 'ENABLE_FILE_ANALYTICS', 'ALERT', 'SEPARATORS', 'DATE_FILTER_CONFIG', 'JIT_PROVISIONING', 'JWT_JIT_PROVISIONING', 'DASHBOARD_FILTERS_APPLY_MODE', 'ENABLE_SLIDES_EXPORT', 'ENABLE_SNAPSHOT_EXPORT', 'AI_RATE_LIMIT', 'ATTACHMENT_SIZE_LIMIT', 'ATTACHMENT_LINK_TTL', 'AD_CATALOG_GROUPS_DEFAULT_EXPAND_STATE', 'ENABLE_DRILL_TO_URL_BY_DEFAULT', 'ALLOW_UNSAFE_FLEX_CONNECT_ENDPOINTS', 'ENABLE_AUTOMATION_EVALUATION_MODE', 'ENABLE_ACCESSIBILITY_MODE', 'REGISTERED_PLUGGABLE_APPLICATIONS', 'DATA_LOCALE', 'LDM_DEFAULT_LOCALE', 'EXPORT_RESULT_POLLING_TIMEOUT_SECONDS', 'MAX_ZOOM_LEVEL', 'SORT_CASE_SENSITIVE', 'METRIC_FORMAT_OVERRIDE', 'ENABLE_AI_ON_DATA', 'API_ENTITIES_DEFAULT_CONTENT_MEDIA_TYPE', 'ENABLE_NULL_JOINS', 'EXPORT_CSV_CUSTOM_DELIMITER', 'ENABLE_QUERY_TAGS', 'RESTRICT_BASE_UI', 'CERTIFY_PARENT_OBJECTS')") + 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 JsonApiOrganizationSettingInAttributes 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 JsonApiOrganizationSettingInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_in_document.py new file mode 100644 index 000000000..f541df8fa --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_organization_setting_in import JsonApiOrganizationSettingIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationSettingInDocument(BaseModel): + """ + JsonApiOrganizationSettingInDocument + """ # noqa: E501 + data: JsonApiOrganizationSettingIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiOrganizationSettingInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationSettingInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiOrganizationSettingIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out.py new file mode 100644 index 000000000..ac983552b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_organization_setting_in_attributes import JsonApiOrganizationSettingInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationSettingOut(BaseModel): + """ + JSON:API representation of organizationSetting entity. + """ # noqa: E501 + attributes: Optional[JsonApiOrganizationSettingInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['organizationSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('organizationSetting')") + 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 JsonApiOrganizationSettingOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationSettingOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiOrganizationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out_document.py new file mode 100644 index 000000000..3186f2e16 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_organization_setting_out import JsonApiOrganizationSettingOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationSettingOutDocument(BaseModel): + """ + JsonApiOrganizationSettingOutDocument + """ # noqa: E501 + data: JsonApiOrganizationSettingOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiOrganizationSettingOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationSettingOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiOrganizationSettingOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out_list.py new file mode 100644 index 000000000..bd725f286 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_organization_setting_out_with_links import JsonApiOrganizationSettingOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationSettingOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiOrganizationSettingOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiOrganizationSettingOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationSettingOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiOrganizationSettingOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out_with_links.py new file mode 100644 index 000000000..34115b362 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_organization_setting_in_attributes import JsonApiOrganizationSettingInAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationSettingOutWithLinks(BaseModel): + """ + JsonApiOrganizationSettingOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiOrganizationSettingInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['organizationSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('organizationSetting')") + 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 JsonApiOrganizationSettingOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationSettingOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiOrganizationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_patch.py new file mode 100644 index 000000000..0dfa1c66b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_organization_setting_in_attributes import JsonApiOrganizationSettingInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationSettingPatch(BaseModel): + """ + JSON:API representation of patching organizationSetting entity. + """ # noqa: E501 + attributes: Optional[JsonApiOrganizationSettingInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['organizationSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('organizationSetting')") + 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 JsonApiOrganizationSettingPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationSettingPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiOrganizationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_patch_document.py new file mode 100644 index 000000000..ef6a68e0e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_organization_setting_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_organization_setting_patch import JsonApiOrganizationSettingPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiOrganizationSettingPatchDocument(BaseModel): + """ + JsonApiOrganizationSettingPatchDocument + """ # noqa: E501 + data: JsonApiOrganizationSettingPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiOrganizationSettingPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiOrganizationSettingPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiOrganizationSettingPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_theme_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_theme_in.py new file mode 100644 index 000000000..024fc3e2e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_theme_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_color_palette_in_attributes import JsonApiColorPaletteInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiThemeIn(BaseModel): + """ + JSON:API representation of theme entity. + """ # noqa: E501 + attributes: JsonApiColorPaletteInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['theme']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('theme')") + 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 JsonApiThemeIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiThemeIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiColorPaletteInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_theme_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_theme_in_document.py new file mode 100644 index 000000000..8d8abb220 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_theme_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_theme_in import JsonApiThemeIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiThemeInDocument(BaseModel): + """ + JsonApiThemeInDocument + """ # noqa: E501 + data: JsonApiThemeIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiThemeInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiThemeInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiThemeIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_theme_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_theme_out.py new file mode 100644 index 000000000..de7bf10ab --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_theme_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_color_palette_in_attributes import JsonApiColorPaletteInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiThemeOut(BaseModel): + """ + JSON:API representation of theme entity. + """ # noqa: E501 + attributes: JsonApiColorPaletteInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['theme']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('theme')") + 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 JsonApiThemeOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiThemeOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiColorPaletteInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_theme_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_theme_out_document.py new file mode 100644 index 000000000..79a1082f8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_theme_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_theme_out import JsonApiThemeOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiThemeOutDocument(BaseModel): + """ + JsonApiThemeOutDocument + """ # noqa: E501 + data: JsonApiThemeOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiThemeOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiThemeOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiThemeOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_theme_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_theme_out_list.py new file mode 100644 index 000000000..9f3ea369d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_theme_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_theme_out_with_links import JsonApiThemeOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiThemeOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiThemeOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiThemeOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiThemeOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiThemeOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_theme_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_theme_out_with_links.py new file mode 100644 index 000000000..c66a681e5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_theme_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_color_palette_in_attributes import JsonApiColorPaletteInAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiThemeOutWithLinks(BaseModel): + """ + JsonApiThemeOutWithLinks + """ # noqa: E501 + attributes: JsonApiColorPaletteInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['theme']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('theme')") + 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 JsonApiThemeOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiThemeOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiColorPaletteInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_theme_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_theme_patch.py new file mode 100644 index 000000000..6902a01a8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_theme_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_color_palette_patch_attributes import JsonApiColorPalettePatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiThemePatch(BaseModel): + """ + JSON:API representation of patching theme entity. + """ # noqa: E501 + attributes: JsonApiColorPalettePatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['theme']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('theme')") + 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 JsonApiThemePatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiThemePatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiColorPalettePatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_theme_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_theme_patch_document.py new file mode 100644 index 000000000..16dfd8440 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_theme_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_theme_patch import JsonApiThemePatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiThemePatchDocument(BaseModel): + """ + JsonApiThemePatchDocument + """ # noqa: E501 + data: JsonApiThemePatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiThemePatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiThemePatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiThemePatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in.py new file mode 100644 index 000000000..f45506569 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_data_filter_in_attributes import JsonApiUserDataFilterInAttributes +from gooddata_api_client.models.json_api_user_data_filter_in_relationships import JsonApiUserDataFilterInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserDataFilterIn(BaseModel): + """ + JSON:API representation of userDataFilter entity. + """ # noqa: E501 + attributes: JsonApiUserDataFilterInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiUserDataFilterInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userDataFilter']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userDataFilter')") + 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 JsonApiUserDataFilterIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserDataFilterIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiUserDataFilterInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiUserDataFilterInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in_attributes.py new file mode 100644 index 000000000..a8eea3b41 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in_attributes.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserDataFilterInAttributes(BaseModel): + """ + JsonApiUserDataFilterInAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + maql: Annotated[str, Field(strict=True, max_length=10000)] + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "description", "maql", "tags", "title"] + + 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 JsonApiUserDataFilterInAttributes 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 JsonApiUserDataFilterInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "description": obj.get("description"), + "maql": obj.get("maql"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in_document.py new file mode 100644 index 000000000..16be9188b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_user_data_filter_in import JsonApiUserDataFilterIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserDataFilterInDocument(BaseModel): + """ + JsonApiUserDataFilterInDocument + """ # noqa: E501 + data: JsonApiUserDataFilterIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiUserDataFilterInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserDataFilterInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserDataFilterIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in_relationships.py new file mode 100644 index 000000000..159e3730b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_in_relationships.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_filter_view_in_relationships_user import JsonApiFilterViewInRelationshipsUser +from gooddata_api_client.models.json_api_organization_out_relationships_bootstrap_user_group import JsonApiOrganizationOutRelationshipsBootstrapUserGroup +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserDataFilterInRelationships(BaseModel): + """ + JsonApiUserDataFilterInRelationships + """ # noqa: E501 + user: Optional[JsonApiFilterViewInRelationshipsUser] = None + user_group: Optional[JsonApiOrganizationOutRelationshipsBootstrapUserGroup] = Field(default=None, alias="userGroup") + __properties: ClassVar[List[str]] = ["user", "userGroup"] + + 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 JsonApiUserDataFilterInRelationships 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 user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_group + if self.user_group: + _dict['userGroup'] = self.user_group.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserDataFilterInRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user": JsonApiFilterViewInRelationshipsUser.from_dict(obj["user"]) if obj.get("user") is not None else None, + "userGroup": JsonApiOrganizationOutRelationshipsBootstrapUserGroup.from_dict(obj["userGroup"]) if obj.get("userGroup") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out.py new file mode 100644 index 000000000..62db20432 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_user_data_filter_in_attributes import JsonApiUserDataFilterInAttributes +from gooddata_api_client.models.json_api_user_data_filter_out_relationships import JsonApiUserDataFilterOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserDataFilterOut(BaseModel): + """ + JSON:API representation of userDataFilter entity. + """ # noqa: E501 + attributes: JsonApiUserDataFilterInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiUserDataFilterOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userDataFilter']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userDataFilter')") + 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 JsonApiUserDataFilterOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserDataFilterOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiUserDataFilterInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiUserDataFilterOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_document.py new file mode 100644 index 000000000..f5275091b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_user_data_filter_out import JsonApiUserDataFilterOut +from gooddata_api_client.models.json_api_user_data_filter_out_includes import JsonApiUserDataFilterOutIncludes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserDataFilterOutDocument(BaseModel): + """ + JsonApiUserDataFilterOutDocument + """ # noqa: E501 + data: JsonApiUserDataFilterOut + included: Optional[List[JsonApiUserDataFilterOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiUserDataFilterOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserDataFilterOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserDataFilterOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiUserDataFilterOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_includes.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_includes.py new file mode 100644 index 000000000..b786c932d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_includes.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_attribute_out_with_links import JsonApiAttributeOutWithLinks +from gooddata_api_client.models.json_api_dataset_out_with_links import JsonApiDatasetOutWithLinks +from gooddata_api_client.models.json_api_fact_out_with_links import JsonApiFactOutWithLinks +from gooddata_api_client.models.json_api_label_out_with_links import JsonApiLabelOutWithLinks +from gooddata_api_client.models.json_api_metric_out_with_links import JsonApiMetricOutWithLinks +from gooddata_api_client.models.json_api_user_group_out_with_links import JsonApiUserGroupOutWithLinks +from gooddata_api_client.models.json_api_user_out_with_links import JsonApiUserOutWithLinks +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIUSERDATAFILTEROUTINCLUDES_ONE_OF_SCHEMAS = ["JsonApiAttributeOutWithLinks", "JsonApiDatasetOutWithLinks", "JsonApiFactOutWithLinks", "JsonApiLabelOutWithLinks", "JsonApiMetricOutWithLinks", "JsonApiUserGroupOutWithLinks", "JsonApiUserOutWithLinks"] + +class JsonApiUserDataFilterOutIncludes(BaseModel): + """ + JsonApiUserDataFilterOutIncludes + """ + # data type: JsonApiUserOutWithLinks + oneof_schema_1_validator: Optional[JsonApiUserOutWithLinks] = None + # data type: JsonApiUserGroupOutWithLinks + oneof_schema_2_validator: Optional[JsonApiUserGroupOutWithLinks] = None + # data type: JsonApiFactOutWithLinks + oneof_schema_3_validator: Optional[JsonApiFactOutWithLinks] = None + # data type: JsonApiAttributeOutWithLinks + oneof_schema_4_validator: Optional[JsonApiAttributeOutWithLinks] = None + # data type: JsonApiLabelOutWithLinks + oneof_schema_5_validator: Optional[JsonApiLabelOutWithLinks] = None + # data type: JsonApiMetricOutWithLinks + oneof_schema_6_validator: Optional[JsonApiMetricOutWithLinks] = None + # data type: JsonApiDatasetOutWithLinks + oneof_schema_7_validator: Optional[JsonApiDatasetOutWithLinks] = None + actual_instance: Optional[Union[JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks, JsonApiLabelOutWithLinks, JsonApiMetricOutWithLinks, JsonApiUserGroupOutWithLinks, JsonApiUserOutWithLinks]] = None + one_of_schemas: Set[str] = { "JsonApiAttributeOutWithLinks", "JsonApiDatasetOutWithLinks", "JsonApiFactOutWithLinks", "JsonApiLabelOutWithLinks", "JsonApiMetricOutWithLinks", "JsonApiUserGroupOutWithLinks", "JsonApiUserOutWithLinks" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiUserDataFilterOutIncludes.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiUserOutWithLinks + if not isinstance(v, JsonApiUserOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiUserGroupOutWithLinks + if not isinstance(v, JsonApiUserGroupOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserGroupOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiFactOutWithLinks + if not isinstance(v, JsonApiFactOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiFactOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiAttributeOutWithLinks + if not isinstance(v, JsonApiAttributeOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAttributeOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiLabelOutWithLinks + if not isinstance(v, JsonApiLabelOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiLabelOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiMetricOutWithLinks + if not isinstance(v, JsonApiMetricOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiMetricOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiDatasetOutWithLinks + if not isinstance(v, JsonApiDatasetOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiDatasetOutWithLinks`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiUserDataFilterOutIncludes with oneOf schemas: JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks, JsonApiLabelOutWithLinks, JsonApiMetricOutWithLinks, JsonApiUserGroupOutWithLinks, JsonApiUserOutWithLinks. 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 + + # deserialize data into JsonApiUserOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiUserOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiUserGroupOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiUserGroupOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiFactOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiFactOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiAttributeOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAttributeOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiLabelOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiLabelOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiMetricOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiMetricOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiDatasetOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiDatasetOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiUserDataFilterOutIncludes with oneOf schemas: JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks, JsonApiLabelOutWithLinks, JsonApiMetricOutWithLinks, JsonApiUserGroupOutWithLinks, JsonApiUserOutWithLinks. 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], JsonApiAttributeOutWithLinks, JsonApiDatasetOutWithLinks, JsonApiFactOutWithLinks, JsonApiLabelOutWithLinks, JsonApiMetricOutWithLinks, JsonApiUserGroupOutWithLinks, JsonApiUserOutWithLinks]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_list.py new file mode 100644 index 000000000..25d691561 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_user_data_filter_out_includes import JsonApiUserDataFilterOutIncludes +from gooddata_api_client.models.json_api_user_data_filter_out_with_links import JsonApiUserDataFilterOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserDataFilterOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiUserDataFilterOutWithLinks] + included: Optional[List[JsonApiUserDataFilterOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiUserDataFilterOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserDataFilterOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiUserDataFilterOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiUserDataFilterOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_relationships.py new file mode 100644 index 000000000..e3917ed7b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_relationships.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_datasets import JsonApiAnalyticalDashboardOutRelationshipsDatasets +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_labels import JsonApiAnalyticalDashboardOutRelationshipsLabels +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_metrics import JsonApiAnalyticalDashboardOutRelationshipsMetrics +from gooddata_api_client.models.json_api_attribute_hierarchy_out_relationships_attributes import JsonApiAttributeHierarchyOutRelationshipsAttributes +from gooddata_api_client.models.json_api_dataset_out_relationships_facts import JsonApiDatasetOutRelationshipsFacts +from gooddata_api_client.models.json_api_filter_view_in_relationships_user import JsonApiFilterViewInRelationshipsUser +from gooddata_api_client.models.json_api_organization_out_relationships_bootstrap_user_group import JsonApiOrganizationOutRelationshipsBootstrapUserGroup +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserDataFilterOutRelationships(BaseModel): + """ + JsonApiUserDataFilterOutRelationships + """ # noqa: E501 + attributes: Optional[JsonApiAttributeHierarchyOutRelationshipsAttributes] = None + datasets: Optional[JsonApiAnalyticalDashboardOutRelationshipsDatasets] = None + facts: Optional[JsonApiDatasetOutRelationshipsFacts] = None + labels: Optional[JsonApiAnalyticalDashboardOutRelationshipsLabels] = None + metrics: Optional[JsonApiAnalyticalDashboardOutRelationshipsMetrics] = None + user: Optional[JsonApiFilterViewInRelationshipsUser] = None + user_group: Optional[JsonApiOrganizationOutRelationshipsBootstrapUserGroup] = Field(default=None, alias="userGroup") + __properties: ClassVar[List[str]] = ["attributes", "datasets", "facts", "labels", "metrics", "user", "userGroup"] + + 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 JsonApiUserDataFilterOutRelationships 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of datasets + if self.datasets: + _dict['datasets'] = self.datasets.to_dict() + # override the default output from pydantic by calling `to_dict()` of facts + if self.facts: + _dict['facts'] = self.facts.to_dict() + # override the default output from pydantic by calling `to_dict()` of labels + if self.labels: + _dict['labels'] = self.labels.to_dict() + # override the default output from pydantic by calling `to_dict()` of metrics + if self.metrics: + _dict['metrics'] = self.metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_group + if self.user_group: + _dict['userGroup'] = self.user_group.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserDataFilterOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiAttributeHierarchyOutRelationshipsAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "datasets": JsonApiAnalyticalDashboardOutRelationshipsDatasets.from_dict(obj["datasets"]) if obj.get("datasets") is not None else None, + "facts": JsonApiDatasetOutRelationshipsFacts.from_dict(obj["facts"]) if obj.get("facts") is not None else None, + "labels": JsonApiAnalyticalDashboardOutRelationshipsLabels.from_dict(obj["labels"]) if obj.get("labels") is not None else None, + "metrics": JsonApiAnalyticalDashboardOutRelationshipsMetrics.from_dict(obj["metrics"]) if obj.get("metrics") is not None else None, + "user": JsonApiFilterViewInRelationshipsUser.from_dict(obj["user"]) if obj.get("user") is not None else None, + "userGroup": JsonApiOrganizationOutRelationshipsBootstrapUserGroup.from_dict(obj["userGroup"]) if obj.get("userGroup") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_with_links.py new file mode 100644 index 000000000..59584ef87 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_user_data_filter_in_attributes import JsonApiUserDataFilterInAttributes +from gooddata_api_client.models.json_api_user_data_filter_out_relationships import JsonApiUserDataFilterOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserDataFilterOutWithLinks(BaseModel): + """ + JsonApiUserDataFilterOutWithLinks + """ # noqa: E501 + attributes: JsonApiUserDataFilterInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiUserDataFilterOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userDataFilter']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userDataFilter')") + 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 JsonApiUserDataFilterOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserDataFilterOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiUserDataFilterInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiUserDataFilterOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_patch.py new file mode 100644 index 000000000..322212cb2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_patch.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_data_filter_in_relationships import JsonApiUserDataFilterInRelationships +from gooddata_api_client.models.json_api_user_data_filter_patch_attributes import JsonApiUserDataFilterPatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserDataFilterPatch(BaseModel): + """ + JSON:API representation of patching userDataFilter entity. + """ # noqa: E501 + attributes: JsonApiUserDataFilterPatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiUserDataFilterInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userDataFilter']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userDataFilter')") + 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 JsonApiUserDataFilterPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserDataFilterPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiUserDataFilterPatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiUserDataFilterInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_patch_attributes.py new file mode 100644 index 000000000..1db7aa028 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_patch_attributes.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserDataFilterPatchAttributes(BaseModel): + """ + JsonApiUserDataFilterPatchAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + maql: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "description", "maql", "tags", "title"] + + 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 JsonApiUserDataFilterPatchAttributes 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 JsonApiUserDataFilterPatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "description": obj.get("description"), + "maql": obj.get("maql"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_patch_document.py new file mode 100644 index 000000000..3ec9d9b03 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_user_data_filter_patch import JsonApiUserDataFilterPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserDataFilterPatchDocument(BaseModel): + """ + JsonApiUserDataFilterPatchDocument + """ # noqa: E501 + data: JsonApiUserDataFilterPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiUserDataFilterPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserDataFilterPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserDataFilterPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_post_optional_id.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_post_optional_id.py new file mode 100644 index 000000000..a3de96d4a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_post_optional_id.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_data_filter_in_attributes import JsonApiUserDataFilterInAttributes +from gooddata_api_client.models.json_api_user_data_filter_in_relationships import JsonApiUserDataFilterInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserDataFilterPostOptionalId(BaseModel): + """ + JSON:API representation of userDataFilter entity. + """ # noqa: E501 + attributes: JsonApiUserDataFilterInAttributes + id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="API identifier of an object") + relationships: Optional[JsonApiUserDataFilterInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @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"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userDataFilter']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userDataFilter')") + 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 JsonApiUserDataFilterPostOptionalId 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserDataFilterPostOptionalId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiUserDataFilterInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiUserDataFilterInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_post_optional_id_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_post_optional_id_document.py new file mode 100644 index 000000000..787a1b40f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_data_filter_post_optional_id_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_user_data_filter_post_optional_id import JsonApiUserDataFilterPostOptionalId +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserDataFilterPostOptionalIdDocument(BaseModel): + """ + JsonApiUserDataFilterPostOptionalIdDocument + """ # noqa: E501 + data: JsonApiUserDataFilterPostOptionalId + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiUserDataFilterPostOptionalIdDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserDataFilterPostOptionalIdDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserDataFilterPostOptionalId.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_group_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_in.py new file mode 100644 index 000000000..71653b349 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_in.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_group_in_attributes import JsonApiUserGroupInAttributes +from gooddata_api_client.models.json_api_user_group_in_relationships import JsonApiUserGroupInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserGroupIn(BaseModel): + """ + JSON:API representation of userGroup entity. + """ # noqa: E501 + attributes: Optional[JsonApiUserGroupInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiUserGroupInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userGroup']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userGroup')") + 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 JsonApiUserGroupIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserGroupIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiUserGroupInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiUserGroupInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_attributes.py new file mode 100644 index 000000000..6618e3c9b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_attributes.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserGroupInAttributes(BaseModel): + """ + JsonApiUserGroupInAttributes + """ # noqa: E501 + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["name"] + + 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 JsonApiUserGroupInAttributes 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 JsonApiUserGroupInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_document.py new file mode 100644 index 000000000..00b918b8b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_user_group_in import JsonApiUserGroupIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserGroupInDocument(BaseModel): + """ + JsonApiUserGroupInDocument + """ # noqa: E501 + data: JsonApiUserGroupIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiUserGroupInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserGroupInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserGroupIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_relationships.py new file mode 100644 index 000000000..08a103bda --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_relationships.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_user_group_in_relationships_parents import JsonApiUserGroupInRelationshipsParents +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserGroupInRelationships(BaseModel): + """ + JsonApiUserGroupInRelationships + """ # noqa: E501 + parents: Optional[JsonApiUserGroupInRelationshipsParents] = None + __properties: ClassVar[List[str]] = ["parents"] + + 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 JsonApiUserGroupInRelationships 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 parents + if self.parents: + _dict['parents'] = self.parents.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserGroupInRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "parents": JsonApiUserGroupInRelationshipsParents.from_dict(obj["parents"]) if obj.get("parents") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_relationships_parents.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_relationships_parents.py new file mode 100644 index 000000000..3f5cb6d46 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_in_relationships_parents.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_user_group_linkage import JsonApiUserGroupLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserGroupInRelationshipsParents(BaseModel): + """ + JsonApiUserGroupInRelationshipsParents + """ # noqa: E501 + data: List[JsonApiUserGroupLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiUserGroupInRelationshipsParents 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserGroupInRelationshipsParents from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiUserGroupLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_group_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_linkage.py new file mode 100644 index 000000000..2e62cb3ae --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiUserGroupLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userGroup']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userGroup')") + 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 JsonApiUserGroupLinkage 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 JsonApiUserGroupLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_group_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_out.py new file mode 100644 index 000000000..c91abf6cb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_out.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_group_in_attributes import JsonApiUserGroupInAttributes +from gooddata_api_client.models.json_api_user_group_in_relationships import JsonApiUserGroupInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserGroupOut(BaseModel): + """ + JSON:API representation of userGroup entity. + """ # noqa: E501 + attributes: Optional[JsonApiUserGroupInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiUserGroupInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userGroup']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userGroup')") + 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 JsonApiUserGroupOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserGroupOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiUserGroupInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiUserGroupInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_group_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_out_document.py new file mode 100644 index 000000000..f7a4c8624 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_user_group_out import JsonApiUserGroupOut +from gooddata_api_client.models.json_api_user_group_out_with_links import JsonApiUserGroupOutWithLinks +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserGroupOutDocument(BaseModel): + """ + JsonApiUserGroupOutDocument + """ # noqa: E501 + data: JsonApiUserGroupOut + included: Optional[List[JsonApiUserGroupOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiUserGroupOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserGroupOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserGroupOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiUserGroupOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_group_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_out_list.py new file mode 100644 index 000000000..69d49f461 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_out_list.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_user_group_out_with_links import JsonApiUserGroupOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserGroupOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiUserGroupOutWithLinks] + included: Optional[List[JsonApiUserGroupOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiUserGroupOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserGroupOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiUserGroupOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiUserGroupOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_group_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_out_with_links.py new file mode 100644 index 000000000..848c5c947 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_out_with_links.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_group_in_attributes import JsonApiUserGroupInAttributes +from gooddata_api_client.models.json_api_user_group_in_relationships import JsonApiUserGroupInRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserGroupOutWithLinks(BaseModel): + """ + JsonApiUserGroupOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiUserGroupInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiUserGroupInRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userGroup']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userGroup')") + 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 JsonApiUserGroupOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserGroupOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiUserGroupInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiUserGroupInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_group_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_patch.py new file mode 100644 index 000000000..fd20263e8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_patch.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_group_in_attributes import JsonApiUserGroupInAttributes +from gooddata_api_client.models.json_api_user_group_in_relationships import JsonApiUserGroupInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserGroupPatch(BaseModel): + """ + JSON:API representation of patching userGroup entity. + """ # noqa: E501 + attributes: Optional[JsonApiUserGroupInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiUserGroupInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userGroup']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userGroup')") + 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 JsonApiUserGroupPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserGroupPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiUserGroupInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiUserGroupInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_group_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_patch_document.py new file mode 100644 index 000000000..2a58f7d45 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_user_group_patch import JsonApiUserGroupPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserGroupPatchDocument(BaseModel): + """ + JsonApiUserGroupPatchDocument + """ # noqa: E501 + data: JsonApiUserGroupPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiUserGroupPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserGroupPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserGroupPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_group_to_one_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_to_one_linkage.py new file mode 100644 index 000000000..34a596d81 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_group_to_one_linkage.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_group_linkage import JsonApiUserGroupLinkage +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIUSERGROUPTOONELINKAGE_ONE_OF_SCHEMAS = ["JsonApiUserGroupLinkage"] + +class JsonApiUserGroupToOneLinkage(BaseModel): + """ + References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + """ + # data type: JsonApiUserGroupLinkage + oneof_schema_1_validator: Optional[JsonApiUserGroupLinkage] = None + actual_instance: Optional[Union[JsonApiUserGroupLinkage]] = None + one_of_schemas: Set[str] = { "JsonApiUserGroupLinkage" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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): + if v is None: + return v + + instance = JsonApiUserGroupToOneLinkage.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiUserGroupLinkage + if not isinstance(v, JsonApiUserGroupLinkage): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserGroupLinkage`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiUserGroupToOneLinkage with oneOf schemas: JsonApiUserGroupLinkage. 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: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into JsonApiUserGroupLinkage + try: + if match == 0: + instance.actual_instance = JsonApiUserGroupLinkage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiUserGroupToOneLinkage with oneOf schemas: JsonApiUserGroupLinkage. 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], JsonApiUserGroupLinkage]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_linkage.py new file mode 100644 index 000000000..e59302466 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiUserIdentifierLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userIdentifier']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userIdentifier')") + 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 JsonApiUserIdentifierLinkage 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 JsonApiUserIdentifierLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out.py new file mode 100644 index 000000000..a7086fb0a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_identifier_out_attributes import JsonApiUserIdentifierOutAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserIdentifierOut(BaseModel): + """ + JSON:API representation of userIdentifier entity. + """ # noqa: E501 + attributes: Optional[JsonApiUserIdentifierOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userIdentifier']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userIdentifier')") + 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 JsonApiUserIdentifierOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserIdentifierOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiUserIdentifierOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_attributes.py new file mode 100644 index 000000000..9c3c019f2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_attributes.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserIdentifierOutAttributes(BaseModel): + """ + JsonApiUserIdentifierOutAttributes + """ # noqa: E501 + email: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + firstname: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + lastname: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["email", "firstname", "lastname"] + + 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 JsonApiUserIdentifierOutAttributes 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 JsonApiUserIdentifierOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_document.py new file mode 100644 index 000000000..a3dfe05c2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_user_identifier_out import JsonApiUserIdentifierOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserIdentifierOutDocument(BaseModel): + """ + JsonApiUserIdentifierOutDocument + """ # noqa: E501 + data: JsonApiUserIdentifierOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiUserIdentifierOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserIdentifierOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserIdentifierOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_list.py new file mode 100644 index 000000000..b41b9bb39 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_user_identifier_out_with_links import JsonApiUserIdentifierOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserIdentifierOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiUserIdentifierOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiUserIdentifierOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserIdentifierOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiUserIdentifierOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_with_links.py new file mode 100644 index 000000000..26bd1d566 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_identifier_out_attributes import JsonApiUserIdentifierOutAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserIdentifierOutWithLinks(BaseModel): + """ + JsonApiUserIdentifierOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiUserIdentifierOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userIdentifier']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userIdentifier')") + 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 JsonApiUserIdentifierOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserIdentifierOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiUserIdentifierOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_to_one_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_to_one_linkage.py new file mode 100644 index 000000000..5bcd721fe --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_identifier_to_one_linkage.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_identifier_linkage import JsonApiUserIdentifierLinkage +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIUSERIDENTIFIERTOONELINKAGE_ONE_OF_SCHEMAS = ["JsonApiUserIdentifierLinkage"] + +class JsonApiUserIdentifierToOneLinkage(BaseModel): + """ + References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + """ + # data type: JsonApiUserIdentifierLinkage + oneof_schema_1_validator: Optional[JsonApiUserIdentifierLinkage] = None + actual_instance: Optional[Union[JsonApiUserIdentifierLinkage]] = None + one_of_schemas: Set[str] = { "JsonApiUserIdentifierLinkage" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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): + if v is None: + return v + + instance = JsonApiUserIdentifierToOneLinkage.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiUserIdentifierLinkage + if not isinstance(v, JsonApiUserIdentifierLinkage): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserIdentifierLinkage`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiUserIdentifierToOneLinkage with oneOf schemas: JsonApiUserIdentifierLinkage. 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: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into JsonApiUserIdentifierLinkage + try: + if match == 0: + instance.actual_instance = JsonApiUserIdentifierLinkage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiUserIdentifierToOneLinkage with oneOf schemas: JsonApiUserIdentifierLinkage. 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], JsonApiUserIdentifierLinkage]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_user_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_in.py new file mode 100644 index 000000000..16be9fb1e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_in.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_in_attributes import JsonApiUserInAttributes +from gooddata_api_client.models.json_api_user_in_relationships import JsonApiUserInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserIn(BaseModel): + """ + JSON:API representation of user entity. + """ # noqa: E501 + attributes: Optional[JsonApiUserInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiUserInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('user')") + 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 JsonApiUserIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiUserInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiUserInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_in_attributes.py new file mode 100644 index 000000000..32e9a2822 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_in_attributes.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserInAttributes(BaseModel): + """ + JsonApiUserInAttributes + """ # noqa: E501 + authentication_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, alias="authenticationId") + email: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + firstname: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + lastname: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["authenticationId", "email", "firstname", "lastname"] + + 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 JsonApiUserInAttributes 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 JsonApiUserInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authenticationId": obj.get("authenticationId"), + "email": obj.get("email"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_in_document.py new file mode 100644 index 000000000..f1349ece2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_user_in import JsonApiUserIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserInDocument(BaseModel): + """ + JsonApiUserInDocument + """ # noqa: E501 + data: JsonApiUserIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiUserInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_in_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_in_relationships.py new file mode 100644 index 000000000..ef95a4387 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_in_relationships.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_user_group_in_relationships_parents import JsonApiUserGroupInRelationshipsParents +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserInRelationships(BaseModel): + """ + JsonApiUserInRelationships + """ # noqa: E501 + user_groups: Optional[JsonApiUserGroupInRelationshipsParents] = Field(default=None, alias="userGroups") + __properties: ClassVar[List[str]] = ["userGroups"] + + 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 JsonApiUserInRelationships 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 user_groups + if self.user_groups: + _dict['userGroups'] = self.user_groups.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserInRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userGroups": JsonApiUserGroupInRelationshipsParents.from_dict(obj["userGroups"]) if obj.get("userGroups") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_linkage.py new file mode 100644 index 000000000..07e053fe6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiUserLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('user')") + 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 JsonApiUserLinkage 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 JsonApiUserLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_out.py new file mode 100644 index 000000000..a2e25c6af --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_out.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_in_attributes import JsonApiUserInAttributes +from gooddata_api_client.models.json_api_user_in_relationships import JsonApiUserInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserOut(BaseModel): + """ + JSON:API representation of user entity. + """ # noqa: E501 + attributes: Optional[JsonApiUserInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiUserInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('user')") + 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 JsonApiUserOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiUserInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiUserInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_out_document.py new file mode 100644 index 000000000..01cc0c3c7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_user_group_out_with_links import JsonApiUserGroupOutWithLinks +from gooddata_api_client.models.json_api_user_out import JsonApiUserOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserOutDocument(BaseModel): + """ + JsonApiUserOutDocument + """ # noqa: E501 + data: JsonApiUserOut + included: Optional[List[JsonApiUserGroupOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiUserOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiUserGroupOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_out_list.py new file mode 100644 index 000000000..9ade572f6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_user_group_out_with_links import JsonApiUserGroupOutWithLinks +from gooddata_api_client.models.json_api_user_out_with_links import JsonApiUserOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiUserOutWithLinks] + included: Optional[List[JsonApiUserGroupOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiUserOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiUserOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiUserGroupOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_out_with_links.py new file mode 100644 index 000000000..5a4e7fc1b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_out_with_links.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_in_attributes import JsonApiUserInAttributes +from gooddata_api_client.models.json_api_user_in_relationships import JsonApiUserInRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserOutWithLinks(BaseModel): + """ + JsonApiUserOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiUserInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiUserInRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('user')") + 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 JsonApiUserOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiUserInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiUserInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_patch.py new file mode 100644 index 000000000..4ebc7daf0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_patch.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_in_attributes import JsonApiUserInAttributes +from gooddata_api_client.models.json_api_user_in_relationships import JsonApiUserInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserPatch(BaseModel): + """ + JSON:API representation of patching user entity. + """ # noqa: E501 + attributes: Optional[JsonApiUserInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiUserInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('user')") + 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 JsonApiUserPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiUserInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiUserInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_patch_document.py new file mode 100644 index 000000000..7b5aac030 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_user_patch import JsonApiUserPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserPatchDocument(BaseModel): + """ + JsonApiUserPatchDocument + """ # noqa: E501 + data: JsonApiUserPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiUserPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_in.py new file mode 100644 index 000000000..81562682a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_organization_setting_in_attributes import JsonApiOrganizationSettingInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserSettingIn(BaseModel): + """ + JSON:API representation of userSetting entity. + """ # noqa: E501 + attributes: Optional[JsonApiOrganizationSettingInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userSetting')") + 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 JsonApiUserSettingIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserSettingIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiOrganizationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_in_document.py new file mode 100644 index 000000000..18e18b2e5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_user_setting_in import JsonApiUserSettingIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserSettingInDocument(BaseModel): + """ + JsonApiUserSettingInDocument + """ # noqa: E501 + data: JsonApiUserSettingIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiUserSettingInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserSettingInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserSettingIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out.py new file mode 100644 index 000000000..d5599091d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_organization_setting_in_attributes import JsonApiOrganizationSettingInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserSettingOut(BaseModel): + """ + JSON:API representation of userSetting entity. + """ # noqa: E501 + attributes: Optional[JsonApiOrganizationSettingInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userSetting')") + 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 JsonApiUserSettingOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserSettingOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiOrganizationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out_document.py new file mode 100644 index 000000000..24da48ce3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_user_setting_out import JsonApiUserSettingOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserSettingOutDocument(BaseModel): + """ + JsonApiUserSettingOutDocument + """ # noqa: E501 + data: JsonApiUserSettingOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiUserSettingOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserSettingOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiUserSettingOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out_list.py new file mode 100644 index 000000000..175329b16 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_user_setting_out_with_links import JsonApiUserSettingOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserSettingOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiUserSettingOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiUserSettingOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserSettingOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiUserSettingOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out_with_links.py new file mode 100644 index 000000000..6c1c51d24 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_setting_out_with_links.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_organization_setting_in_attributes import JsonApiOrganizationSettingInAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiUserSettingOutWithLinks(BaseModel): + """ + JsonApiUserSettingOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiOrganizationSettingInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['userSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('userSetting')") + 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 JsonApiUserSettingOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiUserSettingOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiOrganizationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_user_to_one_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_user_to_one_linkage.py new file mode 100644 index 000000000..a9e898bf9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_user_to_one_linkage.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_user_linkage import JsonApiUserLinkage +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIUSERTOONELINKAGE_ONE_OF_SCHEMAS = ["JsonApiUserLinkage"] + +class JsonApiUserToOneLinkage(BaseModel): + """ + References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + """ + # data type: JsonApiUserLinkage + oneof_schema_1_validator: Optional[JsonApiUserLinkage] = None + actual_instance: Optional[Union[JsonApiUserLinkage]] = None + one_of_schemas: Set[str] = { "JsonApiUserLinkage" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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): + if v is None: + return v + + instance = JsonApiUserToOneLinkage.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiUserLinkage + if not isinstance(v, JsonApiUserLinkage): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserLinkage`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiUserToOneLinkage with oneOf schemas: JsonApiUserLinkage. 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: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into JsonApiUserLinkage + try: + if match == 0: + instance.actual_instance = JsonApiUserLinkage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiUserToOneLinkage with oneOf schemas: JsonApiUserLinkage. 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], JsonApiUserLinkage]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_in.py new file mode 100644 index 000000000..59df5d2cf --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_visualization_object_in_attributes import JsonApiVisualizationObjectInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiVisualizationObjectIn(BaseModel): + """ + JSON:API representation of visualizationObject entity. + """ # noqa: E501 + attributes: JsonApiVisualizationObjectInAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['visualizationObject']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('visualizationObject')") + 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 JsonApiVisualizationObjectIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiVisualizationObjectIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiVisualizationObjectInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_in_attributes.py new file mode 100644 index 000000000..d44671787 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_in_attributes.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiVisualizationObjectInAttributes(BaseModel): + """ + JsonApiVisualizationObjectInAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + content: Dict[str, Any] = Field(description="Free-form JSON content. Maximum supported length is 250000 characters.") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + is_hidden: Optional[StrictBool] = Field(default=None, alias="isHidden") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "content", "description", "isHidden", "tags", "title"] + + 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 JsonApiVisualizationObjectInAttributes 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 JsonApiVisualizationObjectInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "content": obj.get("content"), + "description": obj.get("description"), + "isHidden": obj.get("isHidden"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_in_document.py new file mode 100644 index 000000000..7e548e585 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_visualization_object_in import JsonApiVisualizationObjectIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiVisualizationObjectInDocument(BaseModel): + """ + JsonApiVisualizationObjectInDocument + """ # noqa: E501 + data: JsonApiVisualizationObjectIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiVisualizationObjectInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiVisualizationObjectInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiVisualizationObjectIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_linkage.py new file mode 100644 index 000000000..a25f4e67f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiVisualizationObjectLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['visualizationObject']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('visualizationObject')") + 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 JsonApiVisualizationObjectLinkage 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 JsonApiVisualizationObjectLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out.py new file mode 100644 index 000000000..d05d530e4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_metric_out_relationships import JsonApiMetricOutRelationships +from gooddata_api_client.models.json_api_visualization_object_out_attributes import JsonApiVisualizationObjectOutAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiVisualizationObjectOut(BaseModel): + """ + JSON:API representation of visualizationObject entity. + """ # noqa: E501 + attributes: JsonApiVisualizationObjectOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiMetricOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['visualizationObject']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('visualizationObject')") + 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 JsonApiVisualizationObjectOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiVisualizationObjectOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiVisualizationObjectOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiMetricOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_attributes.py new file mode 100644 index 000000000..9dab9f8df --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_attributes.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, 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 JsonApiVisualizationObjectOutAttributes(BaseModel): + """ + JsonApiVisualizationObjectOutAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + certification: Optional[StrictStr] = Field(default=None, description="Certification status of the entity.") + certification_message: Optional[StrictStr] = Field(default=None, description="Optional message associated with the certification.", alias="certificationMessage") + certified_at: Optional[datetime] = Field(default=None, description="Time when the certification was set.", alias="certifiedAt") + content: Dict[str, Any] = Field(description="Free-form JSON content. Maximum supported length is 250000 characters.") + created_at: Optional[datetime] = Field(default=None, description="Time of the entity creation.", alias="createdAt") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + is_hidden: Optional[StrictBool] = Field(default=None, alias="isHidden") + modified_at: Optional[datetime] = Field(default=None, description="Time of the last entity modification.", alias="modifiedAt") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "certification", "certificationMessage", "certifiedAt", "content", "createdAt", "description", "isHidden", "modifiedAt", "tags", "title"] + + @field_validator('certification') + def certification_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['CERTIFIED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('CERTIFIED')") + return value + + @field_validator('certified_at') + def certified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('created_at') + def created_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + return value + + @field_validator('modified_at') + def modified_at_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + if not re.match(r"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", value): + raise ValueError(r"must validate the regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}/") + 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 JsonApiVisualizationObjectOutAttributes 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 certification_message (nullable) is None + # and model_fields_set contains the field + if self.certification_message is None and "certification_message" in self.model_fields_set: + _dict['certificationMessage'] = None + + # set to None if certified_at (nullable) is None + # and model_fields_set contains the field + if self.certified_at is None and "certified_at" in self.model_fields_set: + _dict['certifiedAt'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if modified_at (nullable) is None + # and model_fields_set contains the field + if self.modified_at is None and "modified_at" in self.model_fields_set: + _dict['modifiedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiVisualizationObjectOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "certification": obj.get("certification"), + "certificationMessage": obj.get("certificationMessage"), + "certifiedAt": obj.get("certifiedAt"), + "content": obj.get("content"), + "createdAt": obj.get("createdAt"), + "description": obj.get("description"), + "isHidden": obj.get("isHidden"), + "modifiedAt": obj.get("modifiedAt"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_document.py new file mode 100644 index 000000000..60360045a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_metric_out_includes import JsonApiMetricOutIncludes +from gooddata_api_client.models.json_api_visualization_object_out import JsonApiVisualizationObjectOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiVisualizationObjectOutDocument(BaseModel): + """ + JsonApiVisualizationObjectOutDocument + """ # noqa: E501 + data: JsonApiVisualizationObjectOut + included: Optional[List[JsonApiMetricOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiVisualizationObjectOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiVisualizationObjectOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiVisualizationObjectOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiMetricOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_list.py new file mode 100644 index 000000000..e8401b97c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_metric_out_includes import JsonApiMetricOutIncludes +from gooddata_api_client.models.json_api_visualization_object_out_with_links import JsonApiVisualizationObjectOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiVisualizationObjectOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiVisualizationObjectOutWithLinks] + included: Optional[List[JsonApiMetricOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiVisualizationObjectOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiVisualizationObjectOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiVisualizationObjectOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiMetricOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_with_links.py new file mode 100644 index 000000000..8f9748124 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_metric_out_relationships import JsonApiMetricOutRelationships +from gooddata_api_client.models.json_api_visualization_object_out_attributes import JsonApiVisualizationObjectOutAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiVisualizationObjectOutWithLinks(BaseModel): + """ + JsonApiVisualizationObjectOutWithLinks + """ # noqa: E501 + attributes: JsonApiVisualizationObjectOutAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiMetricOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['visualizationObject']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('visualizationObject')") + 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 JsonApiVisualizationObjectOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiVisualizationObjectOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiVisualizationObjectOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiMetricOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_patch.py new file mode 100644 index 000000000..2c3d1f7f9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_visualization_object_patch_attributes import JsonApiVisualizationObjectPatchAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiVisualizationObjectPatch(BaseModel): + """ + JSON:API representation of patching visualizationObject entity. + """ # noqa: E501 + attributes: JsonApiVisualizationObjectPatchAttributes + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['visualizationObject']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('visualizationObject')") + 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 JsonApiVisualizationObjectPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiVisualizationObjectPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiVisualizationObjectPatchAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_patch_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_patch_attributes.py new file mode 100644 index 000000000..5e3396754 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_patch_attributes.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiVisualizationObjectPatchAttributes(BaseModel): + """ + JsonApiVisualizationObjectPatchAttributes + """ # noqa: E501 + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + content: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON content. Maximum supported length is 250000 characters.") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + is_hidden: Optional[StrictBool] = Field(default=None, alias="isHidden") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["areRelationsValid", "content", "description", "isHidden", "tags", "title"] + + 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 JsonApiVisualizationObjectPatchAttributes 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 JsonApiVisualizationObjectPatchAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "areRelationsValid": obj.get("areRelationsValid"), + "content": obj.get("content"), + "description": obj.get("description"), + "isHidden": obj.get("isHidden"), + "tags": obj.get("tags"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_patch_document.py new file mode 100644 index 000000000..5ccb7b6eb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_visualization_object_patch import JsonApiVisualizationObjectPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiVisualizationObjectPatchDocument(BaseModel): + """ + JsonApiVisualizationObjectPatchDocument + """ # noqa: E501 + data: JsonApiVisualizationObjectPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiVisualizationObjectPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiVisualizationObjectPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiVisualizationObjectPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_post_optional_id.py b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_post_optional_id.py new file mode 100644 index 000000000..0395016b2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_post_optional_id.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_visualization_object_in_attributes import JsonApiVisualizationObjectInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiVisualizationObjectPostOptionalId(BaseModel): + """ + JSON:API representation of visualizationObject entity. + """ # noqa: E501 + attributes: JsonApiVisualizationObjectInAttributes + id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @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"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['visualizationObject']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('visualizationObject')") + 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 JsonApiVisualizationObjectPostOptionalId 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiVisualizationObjectPostOptionalId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiVisualizationObjectInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_post_optional_id_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_post_optional_id_document.py new file mode 100644 index 000000000..600e46958 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_post_optional_id_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_visualization_object_post_optional_id import JsonApiVisualizationObjectPostOptionalId +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiVisualizationObjectPostOptionalIdDocument(BaseModel): + """ + JsonApiVisualizationObjectPostOptionalIdDocument + """ # noqa: E501 + data: JsonApiVisualizationObjectPostOptionalId + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiVisualizationObjectPostOptionalIdDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiVisualizationObjectPostOptionalIdDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiVisualizationObjectPostOptionalId.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_to_one_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_to_one_linkage.py new file mode 100644 index 000000000..01bb7cb0e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_visualization_object_to_one_linkage.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_visualization_object_linkage import JsonApiVisualizationObjectLinkage +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIVISUALIZATIONOBJECTTOONELINKAGE_ONE_OF_SCHEMAS = ["JsonApiVisualizationObjectLinkage"] + +class JsonApiVisualizationObjectToOneLinkage(BaseModel): + """ + References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + """ + # data type: JsonApiVisualizationObjectLinkage + oneof_schema_1_validator: Optional[JsonApiVisualizationObjectLinkage] = None + actual_instance: Optional[Union[JsonApiVisualizationObjectLinkage]] = None + one_of_schemas: Set[str] = { "JsonApiVisualizationObjectLinkage" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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): + if v is None: + return v + + instance = JsonApiVisualizationObjectToOneLinkage.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiVisualizationObjectLinkage + if not isinstance(v, JsonApiVisualizationObjectLinkage): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiVisualizationObjectLinkage`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiVisualizationObjectToOneLinkage with oneOf schemas: JsonApiVisualizationObjectLinkage. 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: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into JsonApiVisualizationObjectLinkage + try: + if match == 0: + instance.actual_instance = JsonApiVisualizationObjectLinkage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiVisualizationObjectToOneLinkage with oneOf schemas: JsonApiVisualizationObjectLinkage. 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], JsonApiVisualizationObjectLinkage]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out.py new file mode 100644 index 000000000..fdd5836a5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_workspace_automation_out_attributes import JsonApiWorkspaceAutomationOutAttributes +from gooddata_api_client.models.json_api_workspace_automation_out_relationships import JsonApiWorkspaceAutomationOutRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceAutomationOut(BaseModel): + """ + JSON:API representation of workspaceAutomation entity. + """ # noqa: E501 + attributes: Optional[JsonApiWorkspaceAutomationOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiWorkspaceAutomationOutRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceAutomation']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceAutomation')") + 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 JsonApiWorkspaceAutomationOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceAutomationOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiWorkspaceAutomationOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiWorkspaceAutomationOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_attributes.py new file mode 100644 index 000000000..4bbe12520 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_attributes.py @@ -0,0 +1,221 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_automation_in_attributes_alert import JsonApiAutomationInAttributesAlert +from gooddata_api_client.models.json_api_automation_in_attributes_dashboard_tabular_exports_inner import JsonApiAutomationInAttributesDashboardTabularExportsInner +from gooddata_api_client.models.json_api_automation_in_attributes_external_recipients_inner import JsonApiAutomationInAttributesExternalRecipientsInner +from gooddata_api_client.models.json_api_automation_in_attributes_image_exports_inner import JsonApiAutomationInAttributesImageExportsInner +from gooddata_api_client.models.json_api_automation_in_attributes_metadata import JsonApiAutomationInAttributesMetadata +from gooddata_api_client.models.json_api_automation_in_attributes_raw_exports_inner import JsonApiAutomationInAttributesRawExportsInner +from gooddata_api_client.models.json_api_automation_in_attributes_schedule import JsonApiAutomationInAttributesSchedule +from gooddata_api_client.models.json_api_automation_in_attributes_slides_exports_inner import JsonApiAutomationInAttributesSlidesExportsInner +from gooddata_api_client.models.json_api_automation_in_attributes_tabular_exports_inner import JsonApiAutomationInAttributesTabularExportsInner +from gooddata_api_client.models.json_api_automation_in_attributes_visual_exports_inner import JsonApiAutomationInAttributesVisualExportsInner +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceAutomationOutAttributes(BaseModel): + """ + JsonApiWorkspaceAutomationOutAttributes + """ # noqa: E501 + alert: Optional[JsonApiAutomationInAttributesAlert] = None + are_relations_valid: Optional[StrictBool] = Field(default=None, alias="areRelationsValid") + created_at: Optional[datetime] = Field(default=None, alias="createdAt") + dashboard_tabular_exports: Optional[List[JsonApiAutomationInAttributesDashboardTabularExportsInner]] = Field(default=None, alias="dashboardTabularExports") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + details: Optional[Dict[str, Any]] = Field(default=None, description="Additional details to be included in the automated message.") + evaluation_mode: Optional[StrictStr] = Field(default=None, description="Specify automation evaluation mode.", alias="evaluationMode") + external_recipients: Optional[List[JsonApiAutomationInAttributesExternalRecipientsInner]] = Field(default=None, description="External recipients of the automation action results.", alias="externalRecipients") + image_exports: Optional[List[JsonApiAutomationInAttributesImageExportsInner]] = Field(default=None, alias="imageExports") + metadata: Optional[JsonApiAutomationInAttributesMetadata] = None + modified_at: Optional[datetime] = Field(default=None, alias="modifiedAt") + raw_exports: Optional[List[JsonApiAutomationInAttributesRawExportsInner]] = Field(default=None, alias="rawExports") + schedule: Optional[JsonApiAutomationInAttributesSchedule] = None + slides_exports: Optional[List[JsonApiAutomationInAttributesSlidesExportsInner]] = Field(default=None, alias="slidesExports") + state: Optional[StrictStr] = Field(default=None, description="Current state of the automation.") + tabular_exports: Optional[List[JsonApiAutomationInAttributesTabularExportsInner]] = Field(default=None, alias="tabularExports") + tags: Optional[List[StrictStr]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + visual_exports: Optional[List[JsonApiAutomationInAttributesVisualExportsInner]] = Field(default=None, alias="visualExports") + __properties: ClassVar[List[str]] = ["alert", "areRelationsValid", "createdAt", "dashboardTabularExports", "description", "details", "evaluationMode", "externalRecipients", "imageExports", "metadata", "modifiedAt", "rawExports", "schedule", "slidesExports", "state", "tabularExports", "tags", "title", "visualExports"] + + @field_validator('evaluation_mode') + def evaluation_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['SHARED', 'PER_RECIPIENT']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SHARED', 'PER_RECIPIENT')") + return value + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ACTIVE', 'PAUSED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ACTIVE', 'PAUSED')") + 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 JsonApiWorkspaceAutomationOutAttributes 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 alert + if self.alert: + _dict['alert'] = self.alert.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in dashboard_tabular_exports (list) + _items = [] + if self.dashboard_tabular_exports: + for _item_dashboard_tabular_exports in self.dashboard_tabular_exports: + if _item_dashboard_tabular_exports: + _items.append(_item_dashboard_tabular_exports.to_dict()) + _dict['dashboardTabularExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in external_recipients (list) + _items = [] + if self.external_recipients: + for _item_external_recipients in self.external_recipients: + if _item_external_recipients: + _items.append(_item_external_recipients.to_dict()) + _dict['externalRecipients'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in image_exports (list) + _items = [] + if self.image_exports: + for _item_image_exports in self.image_exports: + if _item_image_exports: + _items.append(_item_image_exports.to_dict()) + _dict['imageExports'] = _items + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in raw_exports (list) + _items = [] + if self.raw_exports: + for _item_raw_exports in self.raw_exports: + if _item_raw_exports: + _items.append(_item_raw_exports.to_dict()) + _dict['rawExports'] = _items + # override the default output from pydantic by calling `to_dict()` of schedule + if self.schedule: + _dict['schedule'] = self.schedule.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in slides_exports (list) + _items = [] + if self.slides_exports: + for _item_slides_exports in self.slides_exports: + if _item_slides_exports: + _items.append(_item_slides_exports.to_dict()) + _dict['slidesExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in tabular_exports (list) + _items = [] + if self.tabular_exports: + for _item_tabular_exports in self.tabular_exports: + if _item_tabular_exports: + _items.append(_item_tabular_exports.to_dict()) + _dict['tabularExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in visual_exports (list) + _items = [] + if self.visual_exports: + for _item_visual_exports in self.visual_exports: + if _item_visual_exports: + _items.append(_item_visual_exports.to_dict()) + _dict['visualExports'] = _items + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceAutomationOutAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alert": JsonApiAutomationInAttributesAlert.from_dict(obj["alert"]) if obj.get("alert") is not None else None, + "areRelationsValid": obj.get("areRelationsValid"), + "createdAt": obj.get("createdAt"), + "dashboardTabularExports": [JsonApiAutomationInAttributesDashboardTabularExportsInner.from_dict(_item) for _item in obj["dashboardTabularExports"]] if obj.get("dashboardTabularExports") is not None else None, + "description": obj.get("description"), + "details": obj.get("details"), + "evaluationMode": obj.get("evaluationMode"), + "externalRecipients": [JsonApiAutomationInAttributesExternalRecipientsInner.from_dict(_item) for _item in obj["externalRecipients"]] if obj.get("externalRecipients") is not None else None, + "imageExports": [JsonApiAutomationInAttributesImageExportsInner.from_dict(_item) for _item in obj["imageExports"]] if obj.get("imageExports") is not None else None, + "metadata": JsonApiAutomationInAttributesMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "modifiedAt": obj.get("modifiedAt"), + "rawExports": [JsonApiAutomationInAttributesRawExportsInner.from_dict(_item) for _item in obj["rawExports"]] if obj.get("rawExports") is not None else None, + "schedule": JsonApiAutomationInAttributesSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None, + "slidesExports": [JsonApiAutomationInAttributesSlidesExportsInner.from_dict(_item) for _item in obj["slidesExports"]] if obj.get("slidesExports") is not None else None, + "state": obj.get("state"), + "tabularExports": [JsonApiAutomationInAttributesTabularExportsInner.from_dict(_item) for _item in obj["tabularExports"]] if obj.get("tabularExports") is not None else None, + "tags": obj.get("tags"), + "title": obj.get("title"), + "visualExports": [JsonApiAutomationInAttributesVisualExportsInner.from_dict(_item) for _item in obj["visualExports"]] if obj.get("visualExports") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_includes.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_includes.py new file mode 100644 index 000000000..a2fc105b1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_includes.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_analytical_dashboard_out_with_links import JsonApiAnalyticalDashboardOutWithLinks +from gooddata_api_client.models.json_api_automation_result_out_with_links import JsonApiAutomationResultOutWithLinks +from gooddata_api_client.models.json_api_export_definition_out_with_links import JsonApiExportDefinitionOutWithLinks +from gooddata_api_client.models.json_api_notification_channel_out_with_links import JsonApiNotificationChannelOutWithLinks +from gooddata_api_client.models.json_api_user_identifier_out_with_links import JsonApiUserIdentifierOutWithLinks +from gooddata_api_client.models.json_api_user_out_with_links import JsonApiUserOutWithLinks +from gooddata_api_client.models.json_api_workspace_out_with_links import JsonApiWorkspaceOutWithLinks +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIWORKSPACEAUTOMATIONOUTINCLUDES_ONE_OF_SCHEMAS = ["JsonApiAnalyticalDashboardOutWithLinks", "JsonApiAutomationResultOutWithLinks", "JsonApiExportDefinitionOutWithLinks", "JsonApiNotificationChannelOutWithLinks", "JsonApiUserIdentifierOutWithLinks", "JsonApiUserOutWithLinks", "JsonApiWorkspaceOutWithLinks"] + +class JsonApiWorkspaceAutomationOutIncludes(BaseModel): + """ + JsonApiWorkspaceAutomationOutIncludes + """ + # data type: JsonApiWorkspaceOutWithLinks + oneof_schema_1_validator: Optional[JsonApiWorkspaceOutWithLinks] = None + # data type: JsonApiNotificationChannelOutWithLinks + oneof_schema_2_validator: Optional[JsonApiNotificationChannelOutWithLinks] = None + # data type: JsonApiAnalyticalDashboardOutWithLinks + oneof_schema_3_validator: Optional[JsonApiAnalyticalDashboardOutWithLinks] = None + # data type: JsonApiUserIdentifierOutWithLinks + oneof_schema_4_validator: Optional[JsonApiUserIdentifierOutWithLinks] = None + # data type: JsonApiExportDefinitionOutWithLinks + oneof_schema_5_validator: Optional[JsonApiExportDefinitionOutWithLinks] = None + # data type: JsonApiUserOutWithLinks + oneof_schema_6_validator: Optional[JsonApiUserOutWithLinks] = None + # data type: JsonApiAutomationResultOutWithLinks + oneof_schema_7_validator: Optional[JsonApiAutomationResultOutWithLinks] = None + actual_instance: Optional[Union[JsonApiAnalyticalDashboardOutWithLinks, JsonApiAutomationResultOutWithLinks, JsonApiExportDefinitionOutWithLinks, JsonApiNotificationChannelOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiUserOutWithLinks, JsonApiWorkspaceOutWithLinks]] = None + one_of_schemas: Set[str] = { "JsonApiAnalyticalDashboardOutWithLinks", "JsonApiAutomationResultOutWithLinks", "JsonApiExportDefinitionOutWithLinks", "JsonApiNotificationChannelOutWithLinks", "JsonApiUserIdentifierOutWithLinks", "JsonApiUserOutWithLinks", "JsonApiWorkspaceOutWithLinks" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = JsonApiWorkspaceAutomationOutIncludes.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiWorkspaceOutWithLinks + if not isinstance(v, JsonApiWorkspaceOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiWorkspaceOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiNotificationChannelOutWithLinks + if not isinstance(v, JsonApiNotificationChannelOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiNotificationChannelOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiAnalyticalDashboardOutWithLinks + if not isinstance(v, JsonApiAnalyticalDashboardOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAnalyticalDashboardOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiUserIdentifierOutWithLinks + if not isinstance(v, JsonApiUserIdentifierOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserIdentifierOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiExportDefinitionOutWithLinks + if not isinstance(v, JsonApiExportDefinitionOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiExportDefinitionOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiUserOutWithLinks + if not isinstance(v, JsonApiUserOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiUserOutWithLinks`") + else: + match += 1 + # validate data type: JsonApiAutomationResultOutWithLinks + if not isinstance(v, JsonApiAutomationResultOutWithLinks): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiAutomationResultOutWithLinks`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiWorkspaceAutomationOutIncludes with oneOf schemas: JsonApiAnalyticalDashboardOutWithLinks, JsonApiAutomationResultOutWithLinks, JsonApiExportDefinitionOutWithLinks, JsonApiNotificationChannelOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiUserOutWithLinks, JsonApiWorkspaceOutWithLinks. 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 + + # deserialize data into JsonApiWorkspaceOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiWorkspaceOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiNotificationChannelOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiNotificationChannelOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiAnalyticalDashboardOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAnalyticalDashboardOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiUserIdentifierOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiUserIdentifierOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiExportDefinitionOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiExportDefinitionOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiUserOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiUserOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JsonApiAutomationResultOutWithLinks + try: + if match == 0: + instance.actual_instance = JsonApiAutomationResultOutWithLinks.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiWorkspaceAutomationOutIncludes with oneOf schemas: JsonApiAnalyticalDashboardOutWithLinks, JsonApiAutomationResultOutWithLinks, JsonApiExportDefinitionOutWithLinks, JsonApiNotificationChannelOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiUserOutWithLinks, JsonApiWorkspaceOutWithLinks. 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], JsonApiAnalyticalDashboardOutWithLinks, JsonApiAutomationResultOutWithLinks, JsonApiExportDefinitionOutWithLinks, JsonApiNotificationChannelOutWithLinks, JsonApiUserIdentifierOutWithLinks, JsonApiUserOutWithLinks, JsonApiWorkspaceOutWithLinks]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_list.py new file mode 100644 index 000000000..b981f5a92 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_workspace_automation_out_includes import JsonApiWorkspaceAutomationOutIncludes +from gooddata_api_client.models.json_api_workspace_automation_out_with_links import JsonApiWorkspaceAutomationOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceAutomationOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiWorkspaceAutomationOutWithLinks] + included: Optional[List[JsonApiWorkspaceAutomationOutIncludes]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiWorkspaceAutomationOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceAutomationOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiWorkspaceAutomationOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiWorkspaceAutomationOutIncludes.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_relationships.py new file mode 100644 index 000000000..ffc8187bd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_relationships.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_analytical_dashboard_out_relationships_certified_by import JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy +from gooddata_api_client.models.json_api_automation_in_relationships_analytical_dashboard import JsonApiAutomationInRelationshipsAnalyticalDashboard +from gooddata_api_client.models.json_api_automation_in_relationships_export_definitions import JsonApiAutomationInRelationshipsExportDefinitions +from gooddata_api_client.models.json_api_automation_in_relationships_notification_channel import JsonApiAutomationInRelationshipsNotificationChannel +from gooddata_api_client.models.json_api_automation_in_relationships_recipients import JsonApiAutomationInRelationshipsRecipients +from gooddata_api_client.models.json_api_automation_out_relationships_automation_results import JsonApiAutomationOutRelationshipsAutomationResults +from gooddata_api_client.models.json_api_workspace_automation_out_relationships_workspace import JsonApiWorkspaceAutomationOutRelationshipsWorkspace +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceAutomationOutRelationships(BaseModel): + """ + JsonApiWorkspaceAutomationOutRelationships + """ # noqa: E501 + analytical_dashboard: Optional[JsonApiAutomationInRelationshipsAnalyticalDashboard] = Field(default=None, alias="analyticalDashboard") + automation_results: Optional[JsonApiAutomationOutRelationshipsAutomationResults] = Field(default=None, alias="automationResults") + created_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="createdBy") + export_definitions: Optional[JsonApiAutomationInRelationshipsExportDefinitions] = Field(default=None, alias="exportDefinitions") + modified_by: Optional[JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy] = Field(default=None, alias="modifiedBy") + notification_channel: Optional[JsonApiAutomationInRelationshipsNotificationChannel] = Field(default=None, alias="notificationChannel") + recipients: Optional[JsonApiAutomationInRelationshipsRecipients] = None + workspace: Optional[JsonApiWorkspaceAutomationOutRelationshipsWorkspace] = None + __properties: ClassVar[List[str]] = ["analyticalDashboard", "automationResults", "createdBy", "exportDefinitions", "modifiedBy", "notificationChannel", "recipients", "workspace"] + + 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 JsonApiWorkspaceAutomationOutRelationships 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 analytical_dashboard + if self.analytical_dashboard: + _dict['analyticalDashboard'] = self.analytical_dashboard.to_dict() + # override the default output from pydantic by calling `to_dict()` of automation_results + if self.automation_results: + _dict['automationResults'] = self.automation_results.to_dict() + # override the default output from pydantic by calling `to_dict()` of created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of export_definitions + if self.export_definitions: + _dict['exportDefinitions'] = self.export_definitions.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of notification_channel + if self.notification_channel: + _dict['notificationChannel'] = self.notification_channel.to_dict() + # override the default output from pydantic by calling `to_dict()` of recipients + if self.recipients: + _dict['recipients'] = self.recipients.to_dict() + # override the default output from pydantic by calling `to_dict()` of workspace + if self.workspace: + _dict['workspace'] = self.workspace.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceAutomationOutRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analyticalDashboard": JsonApiAutomationInRelationshipsAnalyticalDashboard.from_dict(obj["analyticalDashboard"]) if obj.get("analyticalDashboard") is not None else None, + "automationResults": JsonApiAutomationOutRelationshipsAutomationResults.from_dict(obj["automationResults"]) if obj.get("automationResults") is not None else None, + "createdBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "exportDefinitions": JsonApiAutomationInRelationshipsExportDefinitions.from_dict(obj["exportDefinitions"]) if obj.get("exportDefinitions") is not None else None, + "modifiedBy": JsonApiAnalyticalDashboardOutRelationshipsCertifiedBy.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None, + "notificationChannel": JsonApiAutomationInRelationshipsNotificationChannel.from_dict(obj["notificationChannel"]) if obj.get("notificationChannel") is not None else None, + "recipients": JsonApiAutomationInRelationshipsRecipients.from_dict(obj["recipients"]) if obj.get("recipients") is not None else None, + "workspace": JsonApiWorkspaceAutomationOutRelationshipsWorkspace.from_dict(obj["workspace"]) if obj.get("workspace") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_relationships_workspace.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_relationships_workspace.py new file mode 100644 index 000000000..71fe092ba --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_relationships_workspace.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_workspace_to_one_linkage import JsonApiWorkspaceToOneLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceAutomationOutRelationshipsWorkspace(BaseModel): + """ + JsonApiWorkspaceAutomationOutRelationshipsWorkspace + """ # noqa: E501 + data: Optional[JsonApiWorkspaceToOneLinkage] + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiWorkspaceAutomationOutRelationshipsWorkspace 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceAutomationOutRelationshipsWorkspace from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiWorkspaceToOneLinkage.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_with_links.py new file mode 100644 index 000000000..eb78baf83 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_automation_out_with_links.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_workspace_automation_out_attributes import JsonApiWorkspaceAutomationOutAttributes +from gooddata_api_client.models.json_api_workspace_automation_out_relationships import JsonApiWorkspaceAutomationOutRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceAutomationOutWithLinks(BaseModel): + """ + JsonApiWorkspaceAutomationOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiWorkspaceAutomationOutAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiWorkspaceAutomationOutRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceAutomation']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceAutomation')") + 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 JsonApiWorkspaceAutomationOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceAutomationOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiWorkspaceAutomationOutAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiWorkspaceAutomationOutRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in.py new file mode 100644 index 000000000..fa769a1f9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_workspace_data_filter_in_attributes import JsonApiWorkspaceDataFilterInAttributes +from gooddata_api_client.models.json_api_workspace_data_filter_in_relationships import JsonApiWorkspaceDataFilterInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterIn(BaseModel): + """ + JSON:API representation of workspaceDataFilter entity. + """ # noqa: E501 + attributes: Optional[JsonApiWorkspaceDataFilterInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiWorkspaceDataFilterInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceDataFilter']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceDataFilter')") + 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 JsonApiWorkspaceDataFilterIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiWorkspaceDataFilterInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiWorkspaceDataFilterInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_attributes.py new file mode 100644 index 000000000..7d8e64436 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_attributes.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterInAttributes(BaseModel): + """ + JsonApiWorkspaceDataFilterInAttributes + """ # noqa: E501 + column_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, alias="columnName") + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["columnName", "description", "title"] + + 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 JsonApiWorkspaceDataFilterInAttributes 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 JsonApiWorkspaceDataFilterInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "columnName": obj.get("columnName"), + "description": obj.get("description"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_document.py new file mode 100644 index 000000000..f2d94c5fb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_workspace_data_filter_in import JsonApiWorkspaceDataFilterIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterInDocument(BaseModel): + """ + JsonApiWorkspaceDataFilterInDocument + """ # noqa: E501 + data: JsonApiWorkspaceDataFilterIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiWorkspaceDataFilterInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiWorkspaceDataFilterIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_relationships.py new file mode 100644 index 000000000..910ba58d3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_relationships.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_workspace_data_filter_in_relationships_filter_settings import JsonApiWorkspaceDataFilterInRelationshipsFilterSettings +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterInRelationships(BaseModel): + """ + JsonApiWorkspaceDataFilterInRelationships + """ # noqa: E501 + filter_settings: Optional[JsonApiWorkspaceDataFilterInRelationshipsFilterSettings] = Field(default=None, alias="filterSettings") + __properties: ClassVar[List[str]] = ["filterSettings"] + + 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 JsonApiWorkspaceDataFilterInRelationships 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 filter_settings + if self.filter_settings: + _dict['filterSettings'] = self.filter_settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterInRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filterSettings": JsonApiWorkspaceDataFilterInRelationshipsFilterSettings.from_dict(obj["filterSettings"]) if obj.get("filterSettings") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_relationships_filter_settings.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_relationships_filter_settings.py new file mode 100644 index 000000000..ad8023518 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_in_relationships_filter_settings.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_workspace_data_filter_setting_linkage import JsonApiWorkspaceDataFilterSettingLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterInRelationshipsFilterSettings(BaseModel): + """ + JsonApiWorkspaceDataFilterInRelationshipsFilterSettings + """ # noqa: E501 + data: List[JsonApiWorkspaceDataFilterSettingLinkage] = Field(description="References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.") + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiWorkspaceDataFilterInRelationshipsFilterSettings 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterInRelationshipsFilterSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiWorkspaceDataFilterSettingLinkage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_linkage.py new file mode 100644 index 000000000..d36e39ce2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiWorkspaceDataFilterLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceDataFilter']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceDataFilter')") + 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 JsonApiWorkspaceDataFilterLinkage 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 JsonApiWorkspaceDataFilterLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out.py new file mode 100644 index 000000000..fb18d498d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_workspace_data_filter_in_attributes import JsonApiWorkspaceDataFilterInAttributes +from gooddata_api_client.models.json_api_workspace_data_filter_in_relationships import JsonApiWorkspaceDataFilterInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterOut(BaseModel): + """ + JSON:API representation of workspaceDataFilter entity. + """ # noqa: E501 + attributes: Optional[JsonApiWorkspaceDataFilterInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiWorkspaceDataFilterInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceDataFilter']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceDataFilter')") + 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 JsonApiWorkspaceDataFilterOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiWorkspaceDataFilterInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiWorkspaceDataFilterInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out_document.py new file mode 100644 index 000000000..0a9728fe3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_workspace_data_filter_out import JsonApiWorkspaceDataFilterOut +from gooddata_api_client.models.json_api_workspace_data_filter_setting_out_with_links import JsonApiWorkspaceDataFilterSettingOutWithLinks +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterOutDocument(BaseModel): + """ + JsonApiWorkspaceDataFilterOutDocument + """ # noqa: E501 + data: JsonApiWorkspaceDataFilterOut + included: Optional[List[JsonApiWorkspaceDataFilterSettingOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiWorkspaceDataFilterOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiWorkspaceDataFilterOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiWorkspaceDataFilterSettingOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out_list.py new file mode 100644 index 000000000..3b2f5d115 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_workspace_data_filter_out_with_links import JsonApiWorkspaceDataFilterOutWithLinks +from gooddata_api_client.models.json_api_workspace_data_filter_setting_out_with_links import JsonApiWorkspaceDataFilterSettingOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiWorkspaceDataFilterOutWithLinks] + included: Optional[List[JsonApiWorkspaceDataFilterSettingOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiWorkspaceDataFilterOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiWorkspaceDataFilterOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiWorkspaceDataFilterSettingOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out_with_links.py new file mode 100644 index 000000000..5b0978bc5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_workspace_data_filter_in_attributes import JsonApiWorkspaceDataFilterInAttributes +from gooddata_api_client.models.json_api_workspace_data_filter_in_relationships import JsonApiWorkspaceDataFilterInRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterOutWithLinks(BaseModel): + """ + JsonApiWorkspaceDataFilterOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiWorkspaceDataFilterInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiWorkspaceDataFilterInRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceDataFilter']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceDataFilter')") + 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 JsonApiWorkspaceDataFilterOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiWorkspaceDataFilterInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiWorkspaceDataFilterInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_patch.py new file mode 100644 index 000000000..5bb9eafc2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_patch.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_workspace_data_filter_in_attributes import JsonApiWorkspaceDataFilterInAttributes +from gooddata_api_client.models.json_api_workspace_data_filter_in_relationships import JsonApiWorkspaceDataFilterInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterPatch(BaseModel): + """ + JSON:API representation of patching workspaceDataFilter entity. + """ # noqa: E501 + attributes: Optional[JsonApiWorkspaceDataFilterInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiWorkspaceDataFilterInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceDataFilter']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceDataFilter')") + 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 JsonApiWorkspaceDataFilterPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiWorkspaceDataFilterInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiWorkspaceDataFilterInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_patch_document.py new file mode 100644 index 000000000..1bdde7794 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_workspace_data_filter_patch import JsonApiWorkspaceDataFilterPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterPatchDocument(BaseModel): + """ + JsonApiWorkspaceDataFilterPatchDocument + """ # noqa: E501 + data: JsonApiWorkspaceDataFilterPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiWorkspaceDataFilterPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiWorkspaceDataFilterPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in.py new file mode 100644 index 000000000..fc4d3a972 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_workspace_data_filter_setting_in_attributes import JsonApiWorkspaceDataFilterSettingInAttributes +from gooddata_api_client.models.json_api_workspace_data_filter_setting_in_relationships import JsonApiWorkspaceDataFilterSettingInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterSettingIn(BaseModel): + """ + JSON:API representation of workspaceDataFilterSetting entity. + """ # noqa: E501 + attributes: Optional[JsonApiWorkspaceDataFilterSettingInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiWorkspaceDataFilterSettingInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceDataFilterSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceDataFilterSetting')") + 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 JsonApiWorkspaceDataFilterSettingIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterSettingIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiWorkspaceDataFilterSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiWorkspaceDataFilterSettingInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_attributes.py new file mode 100644 index 000000000..f0f8b5871 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_attributes.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterSettingInAttributes(BaseModel): + """ + JsonApiWorkspaceDataFilterSettingInAttributes + """ # noqa: E501 + description: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = None + filter_values: Optional[List[StrictStr]] = Field(default=None, alias="filterValues") + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + __properties: ClassVar[List[str]] = ["description", "filterValues", "title"] + + 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 JsonApiWorkspaceDataFilterSettingInAttributes 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 JsonApiWorkspaceDataFilterSettingInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "filterValues": obj.get("filterValues"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_document.py new file mode 100644 index 000000000..85a723a8e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_workspace_data_filter_setting_in import JsonApiWorkspaceDataFilterSettingIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterSettingInDocument(BaseModel): + """ + JsonApiWorkspaceDataFilterSettingInDocument + """ # noqa: E501 + data: JsonApiWorkspaceDataFilterSettingIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiWorkspaceDataFilterSettingInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterSettingInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiWorkspaceDataFilterSettingIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_relationships.py new file mode 100644 index 000000000..2176d6889 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_relationships.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_workspace_data_filter_setting_in_relationships_workspace_data_filter import JsonApiWorkspaceDataFilterSettingInRelationshipsWorkspaceDataFilter +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterSettingInRelationships(BaseModel): + """ + JsonApiWorkspaceDataFilterSettingInRelationships + """ # noqa: E501 + workspace_data_filter: Optional[JsonApiWorkspaceDataFilterSettingInRelationshipsWorkspaceDataFilter] = Field(default=None, alias="workspaceDataFilter") + __properties: ClassVar[List[str]] = ["workspaceDataFilter"] + + 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 JsonApiWorkspaceDataFilterSettingInRelationships 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 workspace_data_filter + if self.workspace_data_filter: + _dict['workspaceDataFilter'] = self.workspace_data_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterSettingInRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "workspaceDataFilter": JsonApiWorkspaceDataFilterSettingInRelationshipsWorkspaceDataFilter.from_dict(obj["workspaceDataFilter"]) if obj.get("workspaceDataFilter") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_relationships_workspace_data_filter.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_relationships_workspace_data_filter.py new file mode 100644 index 000000000..2b6fbf948 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_in_relationships_workspace_data_filter.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_workspace_data_filter_to_one_linkage import JsonApiWorkspaceDataFilterToOneLinkage +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterSettingInRelationshipsWorkspaceDataFilter(BaseModel): + """ + JsonApiWorkspaceDataFilterSettingInRelationshipsWorkspaceDataFilter + """ # noqa: E501 + data: Optional[JsonApiWorkspaceDataFilterToOneLinkage] + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiWorkspaceDataFilterSettingInRelationshipsWorkspaceDataFilter 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterSettingInRelationshipsWorkspaceDataFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiWorkspaceDataFilterToOneLinkage.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_linkage.py new file mode 100644 index 000000000..d7b645a7f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiWorkspaceDataFilterSettingLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceDataFilterSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceDataFilterSetting')") + 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 JsonApiWorkspaceDataFilterSettingLinkage 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 JsonApiWorkspaceDataFilterSettingLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out.py new file mode 100644 index 000000000..1d67a8f5f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_workspace_data_filter_setting_in_attributes import JsonApiWorkspaceDataFilterSettingInAttributes +from gooddata_api_client.models.json_api_workspace_data_filter_setting_in_relationships import JsonApiWorkspaceDataFilterSettingInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterSettingOut(BaseModel): + """ + JSON:API representation of workspaceDataFilterSetting entity. + """ # noqa: E501 + attributes: Optional[JsonApiWorkspaceDataFilterSettingInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiWorkspaceDataFilterSettingInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceDataFilterSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceDataFilterSetting')") + 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 JsonApiWorkspaceDataFilterSettingOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterSettingOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiWorkspaceDataFilterSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiWorkspaceDataFilterSettingInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out_document.py new file mode 100644 index 000000000..62364c61f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_workspace_data_filter_out_with_links import JsonApiWorkspaceDataFilterOutWithLinks +from gooddata_api_client.models.json_api_workspace_data_filter_setting_out import JsonApiWorkspaceDataFilterSettingOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterSettingOutDocument(BaseModel): + """ + JsonApiWorkspaceDataFilterSettingOutDocument + """ # noqa: E501 + data: JsonApiWorkspaceDataFilterSettingOut + included: Optional[List[JsonApiWorkspaceDataFilterOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiWorkspaceDataFilterSettingOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterSettingOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiWorkspaceDataFilterSettingOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiWorkspaceDataFilterOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out_list.py new file mode 100644 index 000000000..0d7c6bc70 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out_list.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_workspace_data_filter_out_with_links import JsonApiWorkspaceDataFilterOutWithLinks +from gooddata_api_client.models.json_api_workspace_data_filter_setting_out_with_links import JsonApiWorkspaceDataFilterSettingOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterSettingOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiWorkspaceDataFilterSettingOutWithLinks] + included: Optional[List[JsonApiWorkspaceDataFilterOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiWorkspaceDataFilterSettingOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterSettingOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiWorkspaceDataFilterSettingOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiWorkspaceDataFilterOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out_with_links.py new file mode 100644 index 000000000..73ea734e7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_workspace_data_filter_setting_in_attributes import JsonApiWorkspaceDataFilterSettingInAttributes +from gooddata_api_client.models.json_api_workspace_data_filter_setting_in_relationships import JsonApiWorkspaceDataFilterSettingInRelationships +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterSettingOutWithLinks(BaseModel): + """ + JsonApiWorkspaceDataFilterSettingOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiWorkspaceDataFilterSettingInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + relationships: Optional[JsonApiWorkspaceDataFilterSettingInRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceDataFilterSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceDataFilterSetting')") + 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 JsonApiWorkspaceDataFilterSettingOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterSettingOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiWorkspaceDataFilterSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiWorkspaceDataFilterSettingInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_patch.py new file mode 100644 index 000000000..afe03b0cb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_patch.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_workspace_data_filter_setting_in_attributes import JsonApiWorkspaceDataFilterSettingInAttributes +from gooddata_api_client.models.json_api_workspace_data_filter_setting_in_relationships import JsonApiWorkspaceDataFilterSettingInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterSettingPatch(BaseModel): + """ + JSON:API representation of patching workspaceDataFilterSetting entity. + """ # noqa: E501 + attributes: Optional[JsonApiWorkspaceDataFilterSettingInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiWorkspaceDataFilterSettingInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceDataFilterSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceDataFilterSetting')") + 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 JsonApiWorkspaceDataFilterSettingPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterSettingPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiWorkspaceDataFilterSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiWorkspaceDataFilterSettingInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_patch_document.py new file mode 100644 index 000000000..41623b6d5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_setting_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_workspace_data_filter_setting_patch import JsonApiWorkspaceDataFilterSettingPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceDataFilterSettingPatchDocument(BaseModel): + """ + JsonApiWorkspaceDataFilterSettingPatchDocument + """ # noqa: E501 + data: JsonApiWorkspaceDataFilterSettingPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiWorkspaceDataFilterSettingPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceDataFilterSettingPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiWorkspaceDataFilterSettingPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_to_one_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_to_one_linkage.py new file mode 100644 index 000000000..1ab4b0efb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_data_filter_to_one_linkage.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_workspace_data_filter_linkage import JsonApiWorkspaceDataFilterLinkage +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIWORKSPACEDATAFILTERTOONELINKAGE_ONE_OF_SCHEMAS = ["JsonApiWorkspaceDataFilterLinkage"] + +class JsonApiWorkspaceDataFilterToOneLinkage(BaseModel): + """ + References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + """ + # data type: JsonApiWorkspaceDataFilterLinkage + oneof_schema_1_validator: Optional[JsonApiWorkspaceDataFilterLinkage] = None + actual_instance: Optional[Union[JsonApiWorkspaceDataFilterLinkage]] = None + one_of_schemas: Set[str] = { "JsonApiWorkspaceDataFilterLinkage" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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): + if v is None: + return v + + instance = JsonApiWorkspaceDataFilterToOneLinkage.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiWorkspaceDataFilterLinkage + if not isinstance(v, JsonApiWorkspaceDataFilterLinkage): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiWorkspaceDataFilterLinkage`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiWorkspaceDataFilterToOneLinkage with oneOf schemas: JsonApiWorkspaceDataFilterLinkage. 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: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into JsonApiWorkspaceDataFilterLinkage + try: + if match == 0: + instance.actual_instance = JsonApiWorkspaceDataFilterLinkage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiWorkspaceDataFilterToOneLinkage with oneOf schemas: JsonApiWorkspaceDataFilterLinkage. 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], JsonApiWorkspaceDataFilterLinkage]]: + """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/gooddata-api-client/gooddata_api_client/models/json_api_workspace_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_in.py new file mode 100644 index 000000000..aafac8078 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_in.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_workspace_in_attributes import JsonApiWorkspaceInAttributes +from gooddata_api_client.models.json_api_workspace_in_relationships import JsonApiWorkspaceInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceIn(BaseModel): + """ + JSON:API representation of workspace entity. + """ # noqa: E501 + attributes: Optional[JsonApiWorkspaceInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiWorkspaceInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspace']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspace')") + 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 JsonApiWorkspaceIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiWorkspaceInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiWorkspaceInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_attributes.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_attributes.py new file mode 100644 index 000000000..ebc7f93de --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_attributes.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.json_api_workspace_in_attributes_data_source import JsonApiWorkspaceInAttributesDataSource +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceInAttributes(BaseModel): + """ + JsonApiWorkspaceInAttributes + """ # noqa: E501 + cache_extra_limit: Optional[StrictInt] = Field(default=None, alias="cacheExtraLimit") + data_source: Optional[JsonApiWorkspaceInAttributesDataSource] = Field(default=None, alias="dataSource") + description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + early_access: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The early access feature identifier. It is used to enable experimental features. Deprecated in favor of earlyAccessValues.", alias="earlyAccess") + early_access_values: Optional[List[Annotated[str, Field(strict=True, max_length=255)]]] = Field(default=None, description="The early access feature identifiers. They are used to enable experimental features.", alias="earlyAccessValues") + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + prefix: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Custom prefix of entity identifiers in workspace") + __properties: ClassVar[List[str]] = ["cacheExtraLimit", "dataSource", "description", "earlyAccess", "earlyAccessValues", "name", "prefix"] + + @field_validator('prefix') + def prefix_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 JsonApiWorkspaceInAttributes 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 data_source + if self.data_source: + _dict['dataSource'] = self.data_source.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if early_access (nullable) is None + # and model_fields_set contains the field + if self.early_access is None and "early_access" in self.model_fields_set: + _dict['earlyAccess'] = None + + # set to None if early_access_values (nullable) is None + # and model_fields_set contains the field + if self.early_access_values is None and "early_access_values" in self.model_fields_set: + _dict['earlyAccessValues'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if prefix (nullable) is None + # and model_fields_set contains the field + if self.prefix is None and "prefix" in self.model_fields_set: + _dict['prefix'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceInAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cacheExtraLimit": obj.get("cacheExtraLimit"), + "dataSource": JsonApiWorkspaceInAttributesDataSource.from_dict(obj["dataSource"]) if obj.get("dataSource") is not None else None, + "description": obj.get("description"), + "earlyAccess": obj.get("earlyAccess"), + "earlyAccessValues": obj.get("earlyAccessValues"), + "name": obj.get("name"), + "prefix": obj.get("prefix") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_attributes_data_source.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_attributes_data_source.py new file mode 100644 index 000000000..c96d368e5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_attributes_data_source.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiWorkspaceInAttributesDataSource(BaseModel): + """ + The data source used for the particular workspace instead of the one defined in the LDM inherited from its parent workspace. Such data source cannot be defined for a single or a top-parent workspace. + """ # noqa: E501 + id: StrictStr = Field(description="The ID of the used data source.") + schema_path: Optional[List[StrictStr]] = Field(default=None, description="The full schema path as array of its path parts. Will be rendered as subPath1.subPath2...", alias="schemaPath") + __properties: ClassVar[List[str]] = ["id", "schemaPath"] + + 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 JsonApiWorkspaceInAttributesDataSource 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 JsonApiWorkspaceInAttributesDataSource 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"), + "schemaPath": obj.get("schemaPath") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_document.py new file mode 100644 index 000000000..4f212d49e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_workspace_in import JsonApiWorkspaceIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceInDocument(BaseModel): + """ + JsonApiWorkspaceInDocument + """ # noqa: E501 + data: JsonApiWorkspaceIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiWorkspaceInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiWorkspaceIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_relationships.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_relationships.py new file mode 100644 index 000000000..7e5a97649 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_in_relationships.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_workspace_automation_out_relationships_workspace import JsonApiWorkspaceAutomationOutRelationshipsWorkspace +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceInRelationships(BaseModel): + """ + JsonApiWorkspaceInRelationships + """ # noqa: E501 + parent: Optional[JsonApiWorkspaceAutomationOutRelationshipsWorkspace] = None + __properties: ClassVar[List[str]] = ["parent"] + + 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 JsonApiWorkspaceInRelationships 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 parent + if self.parent: + _dict['parent'] = self.parent.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceInRelationships from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "parent": JsonApiWorkspaceAutomationOutRelationshipsWorkspace.from_dict(obj["parent"]) if obj.get("parent") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_linkage.py new file mode 100644 index 000000000..951db8a2b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_linkage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 JsonApiWorkspaceLinkage(BaseModel): + """ + The \\\"type\\\" and \\\"id\\\" to non-empty members. + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspace']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspace')") + 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 JsonApiWorkspaceLinkage 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 JsonApiWorkspaceLinkage 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out.py new file mode 100644 index 000000000..989f56397 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_workspace_in_attributes import JsonApiWorkspaceInAttributes +from gooddata_api_client.models.json_api_workspace_in_relationships import JsonApiWorkspaceInRelationships +from gooddata_api_client.models.json_api_workspace_out_meta import JsonApiWorkspaceOutMeta +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceOut(BaseModel): + """ + JSON:API representation of workspace entity. + """ # noqa: E501 + attributes: Optional[JsonApiWorkspaceInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiWorkspaceOutMeta] = None + relationships: Optional[JsonApiWorkspaceInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspace']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspace')") + 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 JsonApiWorkspaceOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiWorkspaceInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiWorkspaceOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiWorkspaceInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_document.py new file mode 100644 index 000000000..c9a096933 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_document.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_workspace_out import JsonApiWorkspaceOut +from gooddata_api_client.models.json_api_workspace_out_with_links import JsonApiWorkspaceOutWithLinks +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceOutDocument(BaseModel): + """ + JsonApiWorkspaceOutDocument + """ # noqa: E501 + data: JsonApiWorkspaceOut + included: Optional[List[JsonApiWorkspaceOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "included", "links"] + + 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 JsonApiWorkspaceOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiWorkspaceOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "included": [JsonApiWorkspaceOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_list.py new file mode 100644 index 000000000..98e1b9d2d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_list.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_workspace_out_with_links import JsonApiWorkspaceOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiWorkspaceOutWithLinks] + included: Optional[List[JsonApiWorkspaceOutWithLinks]] = Field(default=None, description="Included resources") + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "included", "links", "meta"] + + 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 JsonApiWorkspaceOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in included (list) + _items = [] + if self.included: + for _item_included in self.included: + if _item_included: + _items.append(_item_included.to_dict()) + _dict['included'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiWorkspaceOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "included": [JsonApiWorkspaceOutWithLinks.from_dict(_item) for _item in obj["included"]] if obj.get("included") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta.py new file mode 100644 index 000000000..09486cfbe --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_workspace_out_meta_config import JsonApiWorkspaceOutMetaConfig +from gooddata_api_client.models.json_api_workspace_out_meta_data_model import JsonApiWorkspaceOutMetaDataModel +from gooddata_api_client.models.json_api_workspace_out_meta_hierarchy import JsonApiWorkspaceOutMetaHierarchy +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceOutMeta(BaseModel): + """ + JsonApiWorkspaceOutMeta + """ # noqa: E501 + config: Optional[JsonApiWorkspaceOutMetaConfig] = None + data_model: Optional[JsonApiWorkspaceOutMetaDataModel] = Field(default=None, alias="dataModel") + hierarchy: Optional[JsonApiWorkspaceOutMetaHierarchy] = None + permissions: Optional[List[StrictStr]] = Field(default=None, description="List of valid permissions for a logged-in user.") + __properties: ClassVar[List[str]] = ["config", "dataModel", "hierarchy", "permissions"] + + @field_validator('permissions') + def permissions_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['MANAGE', 'ANALYZE', 'EXPORT', 'EXPORT_TABULAR', 'EXPORT_PDF', 'CREATE_AUTOMATION', 'USE_AI_ASSISTANT', 'WRITE_KNOWLEDGE_DOCUMENTS', 'READ_KNOWLEDGE_DOCUMENTS', 'CREATE_FILTER_VIEW', 'VIEW']): + raise ValueError("each list item must be one of ('MANAGE', 'ANALYZE', 'EXPORT', 'EXPORT_TABULAR', 'EXPORT_PDF', 'CREATE_AUTOMATION', 'USE_AI_ASSISTANT', 'WRITE_KNOWLEDGE_DOCUMENTS', 'READ_KNOWLEDGE_DOCUMENTS', 'CREATE_FILTER_VIEW', 'VIEW')") + 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 JsonApiWorkspaceOutMeta 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 config + if self.config: + _dict['config'] = self.config.to_dict() + # override the default output from pydantic by calling `to_dict()` of data_model + if self.data_model: + _dict['dataModel'] = self.data_model.to_dict() + # override the default output from pydantic by calling `to_dict()` of hierarchy + if self.hierarchy: + _dict['hierarchy'] = self.hierarchy.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceOutMeta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "config": JsonApiWorkspaceOutMetaConfig.from_dict(obj["config"]) if obj.get("config") is not None else None, + "dataModel": JsonApiWorkspaceOutMetaDataModel.from_dict(obj["dataModel"]) if obj.get("dataModel") is not None else None, + "hierarchy": JsonApiWorkspaceOutMetaHierarchy.from_dict(obj["hierarchy"]) if obj.get("hierarchy") is not None else None, + "permissions": obj.get("permissions") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta_config.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta_config.py new file mode 100644 index 000000000..07433563a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta_config.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceOutMetaConfig(BaseModel): + """ + JsonApiWorkspaceOutMetaConfig + """ # noqa: E501 + approximate_count_available: Optional[StrictBool] = Field(default=False, description="is approximate count enabled - based on type of data-source connected to this workspace", alias="approximateCountAvailable") + data_sampling_available: Optional[StrictBool] = Field(default=False, description="is sampling enabled - based on type of data-source connected to this workspace", alias="dataSamplingAvailable") + show_all_values_on_dates_available: Optional[StrictBool] = Field(default=False, description="is 'show all values' displayed for dates - based on type of data-source connected to this workspace", alias="showAllValuesOnDatesAvailable") + __properties: ClassVar[List[str]] = ["approximateCountAvailable", "dataSamplingAvailable", "showAllValuesOnDatesAvailable"] + + 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 JsonApiWorkspaceOutMetaConfig 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 JsonApiWorkspaceOutMetaConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "approximateCountAvailable": obj.get("approximateCountAvailable") if obj.get("approximateCountAvailable") is not None else False, + "dataSamplingAvailable": obj.get("dataSamplingAvailable") if obj.get("dataSamplingAvailable") is not None else False, + "showAllValuesOnDatesAvailable": obj.get("showAllValuesOnDatesAvailable") if obj.get("showAllValuesOnDatesAvailable") is not None else False + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta_data_model.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta_data_model.py new file mode 100644 index 000000000..23c8045b0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta_data_model.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceOutMetaDataModel(BaseModel): + """ + JsonApiWorkspaceOutMetaDataModel + """ # noqa: E501 + dataset_count: StrictInt = Field(description="include the number of dataset of each workspace", alias="datasetCount") + __properties: ClassVar[List[str]] = ["datasetCount"] + + 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 JsonApiWorkspaceOutMetaDataModel 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 JsonApiWorkspaceOutMetaDataModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "datasetCount": obj.get("datasetCount") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta_hierarchy.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta_hierarchy.py new file mode 100644 index 000000000..460ce3696 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_meta_hierarchy.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceOutMetaHierarchy(BaseModel): + """ + JsonApiWorkspaceOutMetaHierarchy + """ # noqa: E501 + children_count: StrictInt = Field(description="include the number of direct children of each workspace", alias="childrenCount") + __properties: ClassVar[List[str]] = ["childrenCount"] + + 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 JsonApiWorkspaceOutMetaHierarchy 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 JsonApiWorkspaceOutMetaHierarchy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "childrenCount": obj.get("childrenCount") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_with_links.py new file mode 100644 index 000000000..b623b1c8a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_out_with_links.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_workspace_in_attributes import JsonApiWorkspaceInAttributes +from gooddata_api_client.models.json_api_workspace_in_relationships import JsonApiWorkspaceInRelationships +from gooddata_api_client.models.json_api_workspace_out_meta import JsonApiWorkspaceOutMeta +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceOutWithLinks(BaseModel): + """ + JsonApiWorkspaceOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiWorkspaceInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiWorkspaceOutMeta] = None + relationships: Optional[JsonApiWorkspaceInRelationships] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "relationships", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspace']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspace')") + 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 JsonApiWorkspaceOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiWorkspaceInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiWorkspaceOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "relationships": JsonApiWorkspaceInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_patch.py new file mode 100644 index 000000000..de006a8db --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_patch.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_workspace_in_attributes import JsonApiWorkspaceInAttributes +from gooddata_api_client.models.json_api_workspace_in_relationships import JsonApiWorkspaceInRelationships +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspacePatch(BaseModel): + """ + JSON:API representation of patching workspace entity. + """ # noqa: E501 + attributes: Optional[JsonApiWorkspaceInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + relationships: Optional[JsonApiWorkspaceInRelationships] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "relationships", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspace']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspace')") + 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 JsonApiWorkspacePatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of relationships + if self.relationships: + _dict['relationships'] = self.relationships.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspacePatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiWorkspaceInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "relationships": JsonApiWorkspaceInRelationships.from_dict(obj["relationships"]) if obj.get("relationships") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_patch_document.py new file mode 100644 index 000000000..dc00bd121 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_workspace_patch import JsonApiWorkspacePatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspacePatchDocument(BaseModel): + """ + JsonApiWorkspacePatchDocument + """ # noqa: E501 + data: JsonApiWorkspacePatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiWorkspacePatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspacePatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiWorkspacePatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_in.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_in.py new file mode 100644 index 000000000..86a0251d1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_in.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_organization_setting_in_attributes import JsonApiOrganizationSettingInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceSettingIn(BaseModel): + """ + JSON:API representation of workspaceSetting entity. + """ # noqa: E501 + attributes: Optional[JsonApiOrganizationSettingInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceSetting')") + 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 JsonApiWorkspaceSettingIn 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceSettingIn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiOrganizationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_in_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_in_document.py new file mode 100644 index 000000000..3d569b11e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_in_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_workspace_setting_in import JsonApiWorkspaceSettingIn +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceSettingInDocument(BaseModel): + """ + JsonApiWorkspaceSettingInDocument + """ # noqa: E501 + data: JsonApiWorkspaceSettingIn + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiWorkspaceSettingInDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceSettingInDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiWorkspaceSettingIn.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out.py new file mode 100644 index 000000000..56c20218b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_organization_setting_in_attributes import JsonApiOrganizationSettingInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceSettingOut(BaseModel): + """ + JSON:API representation of workspaceSetting entity. + """ # noqa: E501 + attributes: Optional[JsonApiOrganizationSettingInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceSetting')") + 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 JsonApiWorkspaceSettingOut 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceSettingOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiOrganizationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out_document.py new file mode 100644 index 000000000..8ea6be441 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out_document.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_workspace_setting_out import JsonApiWorkspaceSettingOut +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceSettingOutDocument(BaseModel): + """ + JsonApiWorkspaceSettingOutDocument + """ # noqa: E501 + data: JsonApiWorkspaceSettingOut + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["data", "links"] + + 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 JsonApiWorkspaceSettingOutDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceSettingOutDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiWorkspaceSettingOut.from_dict(obj["data"]) if obj.get("data") is not None else None, + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out_list.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out_list.py new file mode 100644 index 000000000..869b6fa4a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out_list.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.json_api_aggregated_fact_out_list_meta import JsonApiAggregatedFactOutListMeta +from gooddata_api_client.models.json_api_workspace_setting_out_with_links import JsonApiWorkspaceSettingOutWithLinks +from gooddata_api_client.models.list_links import ListLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceSettingOutList(BaseModel): + """ + A JSON:API document with a list of resources + """ # noqa: E501 + data: List[JsonApiWorkspaceSettingOutWithLinks] + links: Optional[ListLinks] = None + meta: Optional[JsonApiAggregatedFactOutListMeta] = None + __properties: ClassVar[List[str]] = ["data", "links", "meta"] + + 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 JsonApiWorkspaceSettingOutList 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceSettingOutList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [JsonApiWorkspaceSettingOutWithLinks.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "links": ListLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": JsonApiAggregatedFactOutListMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out_with_links.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out_with_links.py new file mode 100644 index 000000000..98794aea6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_out_with_links.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_aggregated_fact_out_meta import JsonApiAggregatedFactOutMeta +from gooddata_api_client.models.json_api_organization_setting_in_attributes import JsonApiOrganizationSettingInAttributes +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceSettingOutWithLinks(BaseModel): + """ + JsonApiWorkspaceSettingOutWithLinks + """ # noqa: E501 + attributes: Optional[JsonApiOrganizationSettingInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + meta: Optional[JsonApiAggregatedFactOutMeta] = None + type: StrictStr = Field(description="Object type") + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["attributes", "id", "meta", "type", "links"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceSetting')") + 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 JsonApiWorkspaceSettingOutWithLinks 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceSettingOutWithLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiOrganizationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "meta": JsonApiAggregatedFactOutMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "type": obj.get("type"), + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_patch.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_patch.py new file mode 100644 index 000000000..0c2ca62f4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_organization_setting_in_attributes import JsonApiOrganizationSettingInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceSettingPatch(BaseModel): + """ + JSON:API representation of patching workspaceSetting entity. + """ # noqa: E501 + attributes: Optional[JsonApiOrganizationSettingInAttributes] = None + id: Annotated[str, Field(strict=True)] = Field(description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceSetting')") + 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 JsonApiWorkspaceSettingPatch 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceSettingPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiOrganizationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_patch_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_patch_document.py new file mode 100644 index 000000000..23e59a028 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_patch_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_workspace_setting_patch import JsonApiWorkspaceSettingPatch +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceSettingPatchDocument(BaseModel): + """ + JsonApiWorkspaceSettingPatchDocument + """ # noqa: E501 + data: JsonApiWorkspaceSettingPatch + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiWorkspaceSettingPatchDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceSettingPatchDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiWorkspaceSettingPatch.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_post_optional_id.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_post_optional_id.py new file mode 100644 index 000000000..9dd1add20 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_post_optional_id.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_organization_setting_in_attributes import JsonApiOrganizationSettingInAttributes +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceSettingPostOptionalId(BaseModel): + """ + JSON:API representation of workspaceSetting entity. + """ # noqa: E501 + attributes: Optional[JsonApiOrganizationSettingInAttributes] = None + id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="API identifier of an object") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["attributes", "id", "type"] + + @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"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspaceSetting']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspaceSetting')") + 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 JsonApiWorkspaceSettingPostOptionalId 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 attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceSettingPostOptionalId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": JsonApiOrganizationSettingInAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_post_optional_id_document.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_post_optional_id_document.py new file mode 100644 index 000000000..f3cfdcb2e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_setting_post_optional_id_document.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.json_api_workspace_setting_post_optional_id import JsonApiWorkspaceSettingPostOptionalId +from typing import Optional, Set +from typing_extensions import Self + +class JsonApiWorkspaceSettingPostOptionalIdDocument(BaseModel): + """ + JsonApiWorkspaceSettingPostOptionalIdDocument + """ # noqa: E501 + data: JsonApiWorkspaceSettingPostOptionalId + __properties: ClassVar[List[str]] = ["data"] + + 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 JsonApiWorkspaceSettingPostOptionalIdDocument 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonApiWorkspaceSettingPostOptionalIdDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": JsonApiWorkspaceSettingPostOptionalId.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/json_api_workspace_to_one_linkage.py b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_to_one_linkage.py new file mode 100644 index 000000000..4693bc7f6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/json_api_workspace_to_one_linkage.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.json_api_workspace_linkage import JsonApiWorkspaceLinkage +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JSONAPIWORKSPACETOONELINKAGE_ONE_OF_SCHEMAS = ["JsonApiWorkspaceLinkage"] + +class JsonApiWorkspaceToOneLinkage(BaseModel): + """ + References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + """ + # data type: JsonApiWorkspaceLinkage + oneof_schema_1_validator: Optional[JsonApiWorkspaceLinkage] = None + actual_instance: Optional[Union[JsonApiWorkspaceLinkage]] = None + one_of_schemas: Set[str] = { "JsonApiWorkspaceLinkage" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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): + if v is None: + return v + + instance = JsonApiWorkspaceToOneLinkage.model_construct() + error_messages = [] + match = 0 + # validate data type: JsonApiWorkspaceLinkage + if not isinstance(v, JsonApiWorkspaceLinkage): + error_messages.append(f"Error! Input type `{type(v)}` is not `JsonApiWorkspaceLinkage`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JsonApiWorkspaceToOneLinkage with oneOf schemas: JsonApiWorkspaceLinkage. 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: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into JsonApiWorkspaceLinkage + try: + if match == 0: + instance.actual_instance = JsonApiWorkspaceLinkage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JsonApiWorkspaceToOneLinkage with oneOf schemas: JsonApiWorkspaceLinkage. 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], JsonApiWorkspaceLinkage]]: + """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/gooddata-api-client/gooddata_api_client/models/key_drivers_dimension.py b/gooddata-api-client/gooddata_api_client/models/key_drivers_dimension.py new file mode 100644 index 000000000..35f2b33aa --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/key_drivers_dimension.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.attribute_format import AttributeFormat +from gooddata_api_client.models.rest_api_identifier import RestApiIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class KeyDriversDimension(BaseModel): + """ + KeyDriversDimension + """ # noqa: E501 + attribute: RestApiIdentifier + attribute_name: StrictStr = Field(alias="attributeName") + format: Optional[AttributeFormat] = None + granularity: Optional[StrictStr] = None + label: RestApiIdentifier + label_name: StrictStr = Field(alias="labelName") + value_type: Optional[StrictStr] = Field(default=None, alias="valueType") + __properties: ClassVar[List[str]] = ["attribute", "attributeName", "format", "granularity", "label", "labelName", "valueType"] + + @field_validator('granularity') + def granularity_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR')") + return value + + @field_validator('value_type') + def value_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['TEXT', 'HYPERLINK', 'GEO', 'GEO_LONGITUDE', 'GEO_LATITUDE', 'GEO_AREA', 'IMAGE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('TEXT', 'HYPERLINK', 'GEO', 'GEO_LONGITUDE', 'GEO_LATITUDE', 'GEO_AREA', 'IMAGE')") + 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 KeyDriversDimension 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 attribute + if self.attribute: + _dict['attribute'] = self.attribute.to_dict() + # override the default output from pydantic by calling `to_dict()` of format + if self.format: + _dict['format'] = self.format.to_dict() + # override the default output from pydantic by calling `to_dict()` of label + if self.label: + _dict['label'] = self.label.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KeyDriversDimension from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attribute": RestApiIdentifier.from_dict(obj["attribute"]) if obj.get("attribute") is not None else None, + "attributeName": obj.get("attributeName"), + "format": AttributeFormat.from_dict(obj["format"]) if obj.get("format") is not None else None, + "granularity": obj.get("granularity"), + "label": RestApiIdentifier.from_dict(obj["label"]) if obj.get("label") is not None else None, + "labelName": obj.get("labelName"), + "valueType": obj.get("valueType") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/key_drivers_request.py b/gooddata-api-client/gooddata_api_client/models/key_drivers_request.py new file mode 100644 index 000000000..d6fc00ee5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/key_drivers_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.measure_item import MeasureItem +from typing import Optional, Set +from typing_extensions import Self + +class KeyDriversRequest(BaseModel): + """ + KeyDriversRequest + """ # noqa: E501 + aux_metrics: Optional[List[MeasureItem]] = Field(default=None, description="Additional metrics to be included in the computation, but excluded from the analysis.", alias="auxMetrics") + metric: MeasureItem + sort_direction: Optional[StrictStr] = Field(default='DESC', description="Sorting elements - ascending/descending order.", alias="sortDirection") + __properties: ClassVar[List[str]] = ["auxMetrics", "metric", "sortDirection"] + + @field_validator('sort_direction') + def sort_direction_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ASC', 'DESC']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ASC', 'DESC')") + 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 KeyDriversRequest 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 each item in aux_metrics (list) + _items = [] + if self.aux_metrics: + for _item_aux_metrics in self.aux_metrics: + if _item_aux_metrics: + _items.append(_item_aux_metrics.to_dict()) + _dict['auxMetrics'] = _items + # override the default output from pydantic by calling `to_dict()` of metric + if self.metric: + _dict['metric'] = self.metric.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KeyDriversRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "auxMetrics": [MeasureItem.from_dict(_item) for _item in obj["auxMetrics"]] if obj.get("auxMetrics") is not None else None, + "metric": MeasureItem.from_dict(obj["metric"]) if obj.get("metric") is not None else None, + "sortDirection": obj.get("sortDirection") if obj.get("sortDirection") is not None else 'DESC' + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/key_drivers_response.py b/gooddata-api-client/gooddata_api_client/models/key_drivers_response.py new file mode 100644 index 000000000..5bcaff777 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/key_drivers_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.execution_links import ExecutionLinks +from gooddata_api_client.models.key_drivers_dimension import KeyDriversDimension +from typing import Optional, Set +from typing_extensions import Self + +class KeyDriversResponse(BaseModel): + """ + KeyDriversResponse + """ # noqa: E501 + dimensions: List[KeyDriversDimension] + links: ExecutionLinks + __properties: ClassVar[List[str]] = ["dimensions", "links"] + + 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 KeyDriversResponse 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 each item in dimensions (list) + _items = [] + if self.dimensions: + for _item_dimensions in self.dimensions: + if _item_dimensions: + _items.append(_item_dimensions.to_dict()) + _dict['dimensions'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KeyDriversResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dimensions": [KeyDriversDimension.from_dict(_item) for _item in obj["dimensions"]] if obj.get("dimensions") is not None else None, + "links": ExecutionLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/key_drivers_result.py b/gooddata-api-client/gooddata_api_client/models/key_drivers_result.py new file mode 100644 index 000000000..65acf820b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/key_drivers_result.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class KeyDriversResult(BaseModel): + """ + KeyDriversResult + """ # noqa: E501 + data: Dict[str, Any] + __properties: ClassVar[List[str]] = ["data"] + + 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 KeyDriversResult 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 KeyDriversResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": obj.get("data") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/knowledge_document_metadata_dto.py b/gooddata-api-client/gooddata_api_client/models/knowledge_document_metadata_dto.py new file mode 100644 index 000000000..a9e41bd6f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/knowledge_document_metadata_dto.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class KnowledgeDocumentMetadataDto(BaseModel): + """ + KnowledgeDocumentMetadataDto + """ # noqa: E501 + created_at: StrictStr = Field(alias="createdAt") + created_by: StrictStr = Field(alias="createdBy") + filename: StrictStr + is_disabled: Optional[StrictBool] = Field(default=None, alias="isDisabled") + num_chunks: StrictInt = Field(alias="numChunks") + scopes: List[StrictStr] + title: Optional[StrictStr] = None + updated_at: StrictStr = Field(alias="updatedAt") + updated_by: StrictStr = Field(alias="updatedBy") + workspace_id: Optional[StrictStr] = Field(default=None, alias="workspaceId") + __properties: ClassVar[List[str]] = ["createdAt", "createdBy", "filename", "isDisabled", "numChunks", "scopes", "title", "updatedAt", "updatedBy", "workspaceId"] + + 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 KnowledgeDocumentMetadataDto 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 KnowledgeDocumentMetadataDto 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"), + "filename": obj.get("filename"), + "isDisabled": obj.get("isDisabled"), + "numChunks": obj.get("numChunks"), + "scopes": obj.get("scopes"), + "title": obj.get("title"), + "updatedAt": obj.get("updatedAt"), + "updatedBy": obj.get("updatedBy"), + "workspaceId": obj.get("workspaceId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/knowledge_search_result_dto.py b/gooddata-api-client/gooddata_api_client/models/knowledge_search_result_dto.py new file mode 100644 index 000000000..333f027f9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/knowledge_search_result_dto.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class KnowledgeSearchResultDto(BaseModel): + """ + KnowledgeSearchResultDto + """ # noqa: E501 + chunk_index: StrictInt = Field(alias="chunkIndex") + content: StrictStr + filename: StrictStr + page_numbers: List[StrictInt] = Field(alias="pageNumbers") + scopes: List[StrictStr] + score: Union[StrictFloat, StrictInt] + title: Optional[StrictStr] = None + total_chunks: StrictInt = Field(alias="totalChunks") + workspace_id: Optional[StrictStr] = Field(default=None, alias="workspaceId") + __properties: ClassVar[List[str]] = ["chunkIndex", "content", "filename", "pageNumbers", "scopes", "score", "title", "totalChunks", "workspaceId"] + + 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 KnowledgeSearchResultDto 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 KnowledgeSearchResultDto from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "chunkIndex": obj.get("chunkIndex"), + "content": obj.get("content"), + "filename": obj.get("filename"), + "pageNumbers": obj.get("pageNumbers"), + "scopes": obj.get("scopes"), + "score": obj.get("score"), + "title": obj.get("title"), + "totalChunks": obj.get("totalChunks"), + "workspaceId": obj.get("workspaceId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/label_identifier.py b/gooddata-api-client/gooddata_api_client/models/label_identifier.py new file mode 100644 index 000000000..7c6970c87 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/label_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class LabelIdentifier(BaseModel): + """ + A label identifier. + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="Label ID.") + type: StrictStr = Field(description="A type of the label.") + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['label']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('label')") + 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 LabelIdentifier 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 LabelIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/list_database_instances_response.py b/gooddata-api-client/gooddata_api_client/models/list_database_instances_response.py new file mode 100644 index 000000000..90fa60ce1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/list_database_instances_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.database_instance import DatabaseInstance +from typing import Optional, Set +from typing_extensions import Self + +class ListDatabaseInstancesResponse(BaseModel): + """ + Paged response for listing AI Lake database instances + """ # noqa: E501 + databases: List[DatabaseInstance] = Field(description="List of database instances") + total_count: Optional[StrictInt] = Field(default=None, description="Total count of items (only set when metaInclude=page)", alias="totalCount") + __properties: ClassVar[List[str]] = ["databases", "totalCount"] + + 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 ListDatabaseInstancesResponse 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 each item in databases (list) + _items = [] + if self.databases: + for _item_databases in self.databases: + if _item_databases: + _items.append(_item_databases.to_dict()) + _dict['databases'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListDatabaseInstancesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "databases": [DatabaseInstance.from_dict(_item) for _item in obj["databases"]] if obj.get("databases") is not None else None, + "totalCount": obj.get("totalCount") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/list_knowledge_documents_response_dto.py b/gooddata-api-client/gooddata_api_client/models/list_knowledge_documents_response_dto.py new file mode 100644 index 000000000..1bc868a4f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/list_knowledge_documents_response_dto.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.knowledge_document_metadata_dto import KnowledgeDocumentMetadataDto +from typing import Optional, Set +from typing_extensions import Self + +class ListKnowledgeDocumentsResponseDto(BaseModel): + """ + ListKnowledgeDocumentsResponseDto + """ # noqa: E501 + documents: List[KnowledgeDocumentMetadataDto] + next_page_token: Optional[StrictStr] = Field(default=None, alias="nextPageToken") + total_count: Optional[StrictInt] = Field(default=None, alias="totalCount") + __properties: ClassVar[List[str]] = ["documents", "nextPageToken", "totalCount"] + + 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 ListKnowledgeDocumentsResponseDto 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 each item in documents (list) + _items = [] + if self.documents: + for _item_documents in self.documents: + if _item_documents: + _items.append(_item_documents.to_dict()) + _dict['documents'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListKnowledgeDocumentsResponseDto from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "documents": [KnowledgeDocumentMetadataDto.from_dict(_item) for _item in obj["documents"]] if obj.get("documents") is not None else None, + "nextPageToken": obj.get("nextPageToken"), + "totalCount": obj.get("totalCount") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/list_links.py b/gooddata-api-client/gooddata_api_client/models/list_links.py new file mode 100644 index 000000000..4b1d2f744 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/list_links.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 ListLinks(BaseModel): + """ + ListLinks + """ # noqa: E501 + var_self: StrictStr = Field(description="A string containing the link's URL.", alias="self") + next: Optional[StrictStr] = Field(default=None, description="A string containing the link's URL for the next page of data.") + __properties: ClassVar[List[str]] = ["self", "next"] + + 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 ListLinks 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 ListLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": obj.get("self"), + "next": obj.get("next") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/list_services_response.py b/gooddata-api-client/gooddata_api_client/models/list_services_response.py new file mode 100644 index 000000000..eeabfa77f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/list_services_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.service_info import ServiceInfo +from typing import Optional, Set +from typing_extensions import Self + +class ListServicesResponse(BaseModel): + """ + Paged response for listing AI Lake services + """ # noqa: E501 + services: List[ServiceInfo] = Field(description="List of services") + total_count: Optional[StrictInt] = Field(default=None, description="Total count of items (only set when metaInclude=page)", alias="totalCount") + __properties: ClassVar[List[str]] = ["services", "totalCount"] + + 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 ListServicesResponse 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 each item in services (list) + _items = [] + if self.services: + for _item_services in self.services: + if _item_services: + _items.append(_item_services.to_dict()) + _dict['services'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListServicesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "services": [ServiceInfo.from_dict(_item) for _item in obj["services"]] if obj.get("services") is not None else None, + "totalCount": obj.get("totalCount") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/llm_model.py b/gooddata-api-client/gooddata_api_client/models/llm_model.py new file mode 100644 index 000000000..3428ca091 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/llm_model.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class LlmModel(BaseModel): + """ + LLM Model configuration (id, family) within a provider. + """ # noqa: E501 + family: StrictStr = Field(description="Family of LLM models.") + id: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Unique identifier of the model (e.g., gpt-5.3, claude-4.6).") + __properties: ClassVar[List[str]] = ["family", "id"] + + @field_validator('family') + def family_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['OPENAI', 'ANTHROPIC', 'META', 'MISTRAL', 'AMAZON', 'GOOGLE', 'COHERE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('OPENAI', 'ANTHROPIC', 'META', 'MISTRAL', 'AMAZON', 'GOOGLE', 'COHERE')") + 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 LlmModel 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 LlmModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "family": obj.get("family"), + "id": obj.get("id") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/llm_provider_auth.py b/gooddata-api-client/gooddata_api_client/models/llm_provider_auth.py new file mode 100644 index 000000000..893562e80 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/llm_provider_auth.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class LlmProviderAuth(BaseModel): + """ + LlmProviderAuth + """ # noqa: E501 + type: StrictStr + __properties: ClassVar[List[str]] = ["type"] + + 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 LlmProviderAuth 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 LlmProviderAuth from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/llm_provider_config.py b/gooddata-api-client/gooddata_api_client/models/llm_provider_config.py new file mode 100644 index 000000000..1144d614e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/llm_provider_config.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.aws_bedrock_provider_config import AwsBedrockProviderConfig +from gooddata_api_client.models.azure_foundry_provider_config import AzureFoundryProviderConfig +from gooddata_api_client.models.open_ai_provider_config import OpenAIProviderConfig +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +LLMPROVIDERCONFIG_ONE_OF_SCHEMAS = ["AwsBedrockProviderConfig", "AzureFoundryProviderConfig", "OpenAIProviderConfig"] + +class LlmProviderConfig(BaseModel): + """ + Provider configuration to test. + """ + # data type: AwsBedrockProviderConfig + oneof_schema_1_validator: Optional[AwsBedrockProviderConfig] = None + # data type: AzureFoundryProviderConfig + oneof_schema_2_validator: Optional[AzureFoundryProviderConfig] = None + # data type: OpenAIProviderConfig + oneof_schema_3_validator: Optional[OpenAIProviderConfig] = None + actual_instance: Optional[Union[AwsBedrockProviderConfig, AzureFoundryProviderConfig, OpenAIProviderConfig]] = None + one_of_schemas: Set[str] = { "AwsBedrockProviderConfig", "AzureFoundryProviderConfig", "OpenAIProviderConfig" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = LlmProviderConfig.model_construct() + error_messages = [] + match = 0 + # validate data type: AwsBedrockProviderConfig + if not isinstance(v, AwsBedrockProviderConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `AwsBedrockProviderConfig`") + else: + match += 1 + # validate data type: AzureFoundryProviderConfig + if not isinstance(v, AzureFoundryProviderConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `AzureFoundryProviderConfig`") + else: + match += 1 + # validate data type: OpenAIProviderConfig + if not isinstance(v, OpenAIProviderConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIProviderConfig`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in LlmProviderConfig with oneOf schemas: AwsBedrockProviderConfig, AzureFoundryProviderConfig, OpenAIProviderConfig. 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 + + # deserialize data into AwsBedrockProviderConfig + try: + if match == 0: + instance.actual_instance = AwsBedrockProviderConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AzureFoundryProviderConfig + try: + if match == 0: + instance.actual_instance = AzureFoundryProviderConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OpenAIProviderConfig + try: + if match == 0: + instance.actual_instance = OpenAIProviderConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into LlmProviderConfig with oneOf schemas: AwsBedrockProviderConfig, AzureFoundryProviderConfig, OpenAIProviderConfig. 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], AwsBedrockProviderConfig, AzureFoundryProviderConfig, OpenAIProviderConfig]]: + """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/gooddata-api-client/gooddata_api_client/models/local_identifier.py b/gooddata-api-client/gooddata_api_client/models/local_identifier.py new file mode 100644 index 000000000..e2e84ba06 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/local_identifier.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class LocalIdentifier(BaseModel): + """ + LocalIdentifier + """ # noqa: E501 + format: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default='#,##0.00', description="Metric format.") + local_identifier: StrictStr = Field(description="Local identifier of the metric to be compared.", alias="localIdentifier") + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Metric title.") + __properties: ClassVar[List[str]] = ["format", "localIdentifier", "title"] + + 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 LocalIdentifier 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 format (nullable) is None + # and model_fields_set contains the field + if self.format is None and "format" in self.model_fields_set: + _dict['format'] = None + + # set to None if title (nullable) is None + # and model_fields_set contains the field + if self.title is None and "title" in self.model_fields_set: + _dict['title'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LocalIdentifier from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "format": obj.get("format") if obj.get("format") is not None else '#,##0.00', + "localIdentifier": obj.get("localIdentifier"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/locale_request.py b/gooddata-api-client/gooddata_api_client/models/locale_request.py new file mode 100644 index 000000000..3b283d067 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/locale_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class LocaleRequest(BaseModel): + """ + LocaleRequest + """ # noqa: E501 + locale: StrictStr = Field(description="Requested locale in the form of language tag (see RFC 5646).") + __properties: ClassVar[List[str]] = ["locale"] + + 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 LocaleRequest 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 LocaleRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "locale": obj.get("locale") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/manage_dashboard_permissions_request_inner.py b/gooddata-api-client/gooddata_api_client/models/manage_dashboard_permissions_request_inner.py new file mode 100644 index 000000000..733f3131c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/manage_dashboard_permissions_request_inner.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.permissions_for_assignee import PermissionsForAssignee +from gooddata_api_client.models.permissions_for_assignee_rule import PermissionsForAssigneeRule +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +MANAGEDASHBOARDPERMISSIONSREQUESTINNER_ONE_OF_SCHEMAS = ["PermissionsForAssignee", "PermissionsForAssigneeRule"] + +class ManageDashboardPermissionsRequestInner(BaseModel): + """ + ManageDashboardPermissionsRequestInner + """ + # data type: PermissionsForAssignee + oneof_schema_1_validator: Optional[PermissionsForAssignee] = None + # data type: PermissionsForAssigneeRule + oneof_schema_2_validator: Optional[PermissionsForAssigneeRule] = None + actual_instance: Optional[Union[PermissionsForAssignee, PermissionsForAssigneeRule]] = None + one_of_schemas: Set[str] = { "PermissionsForAssignee", "PermissionsForAssigneeRule" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = ManageDashboardPermissionsRequestInner.model_construct() + error_messages = [] + match = 0 + # validate data type: PermissionsForAssignee + if not isinstance(v, PermissionsForAssignee): + error_messages.append(f"Error! Input type `{type(v)}` is not `PermissionsForAssignee`") + else: + match += 1 + # validate data type: PermissionsForAssigneeRule + if not isinstance(v, PermissionsForAssigneeRule): + error_messages.append(f"Error! Input type `{type(v)}` is not `PermissionsForAssigneeRule`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ManageDashboardPermissionsRequestInner with oneOf schemas: PermissionsForAssignee, PermissionsForAssigneeRule. 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 + + # deserialize data into PermissionsForAssignee + try: + if match == 0: + instance.actual_instance = PermissionsForAssignee.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PermissionsForAssigneeRule + try: + if match == 0: + instance.actual_instance = PermissionsForAssigneeRule.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ManageDashboardPermissionsRequestInner with oneOf schemas: PermissionsForAssignee, PermissionsForAssigneeRule. 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], PermissionsForAssignee, PermissionsForAssigneeRule]]: + """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/gooddata-api-client/gooddata_api_client/models/match_attribute_filter.py b/gooddata-api-client/gooddata_api_client/models/match_attribute_filter.py new file mode 100644 index 000000000..7b232699b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/match_attribute_filter.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.match_attribute_filter_match_attribute_filter import MatchAttributeFilterMatchAttributeFilter +from typing import Optional, Set +from typing_extensions import Self + +class MatchAttributeFilter(BaseModel): + """ + Filter via label with given match type and literal value. + """ # noqa: E501 + match_attribute_filter: MatchAttributeFilterMatchAttributeFilter = Field(alias="matchAttributeFilter") + __properties: ClassVar[List[str]] = ["matchAttributeFilter"] + + 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 MatchAttributeFilter 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 match_attribute_filter + if self.match_attribute_filter: + _dict['matchAttributeFilter'] = self.match_attribute_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MatchAttributeFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "matchAttributeFilter": MatchAttributeFilterMatchAttributeFilter.from_dict(obj["matchAttributeFilter"]) if obj.get("matchAttributeFilter") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/match_attribute_filter_match_attribute_filter.py b/gooddata-api-client/gooddata_api_client/models/match_attribute_filter_match_attribute_filter.py new file mode 100644 index 000000000..3e785a1d2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/match_attribute_filter_match_attribute_filter.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.afm_identifier import AfmIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class MatchAttributeFilterMatchAttributeFilter(BaseModel): + """ + MatchAttributeFilterMatchAttributeFilter + """ # noqa: E501 + apply_on_result: Optional[StrictBool] = Field(default=None, alias="applyOnResult") + case_sensitive: Optional[StrictBool] = Field(default=False, description="Indicates whether the filter match is evaluated in case-sensitive mode or not.", alias="caseSensitive") + label: AfmIdentifier + literal: StrictStr = Field(description="Literal used to limit label values.") + local_identifier: Optional[StrictStr] = Field(default=None, alias="localIdentifier") + match_type: StrictStr = Field(description="Requested match type.", alias="matchType") + negate: Optional[StrictBool] = Field(default=False, description="Indicates whether the filter should negate the match.") + __properties: ClassVar[List[str]] = ["applyOnResult", "caseSensitive", "label", "literal", "localIdentifier", "matchType", "negate"] + + @field_validator('match_type') + def match_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['STARTS_WITH', 'ENDS_WITH', 'CONTAINS']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('STARTS_WITH', 'ENDS_WITH', 'CONTAINS')") + 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 MatchAttributeFilterMatchAttributeFilter 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 label + if self.label: + _dict['label'] = self.label.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MatchAttributeFilterMatchAttributeFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applyOnResult": obj.get("applyOnResult"), + "caseSensitive": obj.get("caseSensitive") if obj.get("caseSensitive") is not None else False, + "label": AfmIdentifier.from_dict(obj["label"]) if obj.get("label") is not None else None, + "literal": obj.get("literal"), + "localIdentifier": obj.get("localIdentifier"), + "matchType": obj.get("matchType"), + "negate": obj.get("negate") if obj.get("negate") is not None else False + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/measure_definition.py b/gooddata-api-client/gooddata_api_client/models/measure_definition.py new file mode 100644 index 000000000..6515ac82c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/measure_definition.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.arithmetic_measure_definition import ArithmeticMeasureDefinition +from gooddata_api_client.models.inline_measure_definition import InlineMeasureDefinition +from gooddata_api_client.models.pop_measure_definition import PopMeasureDefinition +from gooddata_api_client.models.simple_measure_definition import SimpleMeasureDefinition +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +MEASUREDEFINITION_ONE_OF_SCHEMAS = ["ArithmeticMeasureDefinition", "InlineMeasureDefinition", "PopMeasureDefinition", "SimpleMeasureDefinition"] + +class MeasureDefinition(BaseModel): + """ + Abstract metric definition type + """ + # data type: InlineMeasureDefinition + oneof_schema_1_validator: Optional[InlineMeasureDefinition] = None + # data type: ArithmeticMeasureDefinition + oneof_schema_2_validator: Optional[ArithmeticMeasureDefinition] = None + # data type: SimpleMeasureDefinition + oneof_schema_3_validator: Optional[SimpleMeasureDefinition] = None + # data type: PopMeasureDefinition + oneof_schema_4_validator: Optional[PopMeasureDefinition] = None + actual_instance: Optional[Union[ArithmeticMeasureDefinition, InlineMeasureDefinition, PopMeasureDefinition, SimpleMeasureDefinition]] = None + one_of_schemas: Set[str] = { "ArithmeticMeasureDefinition", "InlineMeasureDefinition", "PopMeasureDefinition", "SimpleMeasureDefinition" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = MeasureDefinition.model_construct() + error_messages = [] + match = 0 + # validate data type: InlineMeasureDefinition + if not isinstance(v, InlineMeasureDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `InlineMeasureDefinition`") + else: + match += 1 + # validate data type: ArithmeticMeasureDefinition + if not isinstance(v, ArithmeticMeasureDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `ArithmeticMeasureDefinition`") + else: + match += 1 + # validate data type: SimpleMeasureDefinition + if not isinstance(v, SimpleMeasureDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `SimpleMeasureDefinition`") + else: + match += 1 + # validate data type: PopMeasureDefinition + if not isinstance(v, PopMeasureDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `PopMeasureDefinition`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in MeasureDefinition with oneOf schemas: ArithmeticMeasureDefinition, InlineMeasureDefinition, PopMeasureDefinition, SimpleMeasureDefinition. 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 + + # deserialize data into InlineMeasureDefinition + try: + if match == 0: + instance.actual_instance = InlineMeasureDefinition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ArithmeticMeasureDefinition + try: + if match == 0: + instance.actual_instance = ArithmeticMeasureDefinition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SimpleMeasureDefinition + try: + if match == 0: + instance.actual_instance = SimpleMeasureDefinition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PopMeasureDefinition + try: + if match == 0: + instance.actual_instance = PopMeasureDefinition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into MeasureDefinition with oneOf schemas: ArithmeticMeasureDefinition, InlineMeasureDefinition, PopMeasureDefinition, SimpleMeasureDefinition. 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], ArithmeticMeasureDefinition, InlineMeasureDefinition, PopMeasureDefinition, SimpleMeasureDefinition]]: + """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/gooddata-api-client/gooddata_api_client/models/measure_execution_result_header.py b/gooddata-api-client/gooddata_api_client/models/measure_execution_result_header.py new file mode 100644 index 000000000..906772553 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/measure_execution_result_header.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.measure_result_header import MeasureResultHeader +from typing import Optional, Set +from typing_extensions import Self + +class MeasureExecutionResultHeader(BaseModel): + """ + MeasureExecutionResultHeader + """ # noqa: E501 + measure_header: MeasureResultHeader = Field(alias="measureHeader") + __properties: ClassVar[List[str]] = ["measureHeader"] + + 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 MeasureExecutionResultHeader 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 measure_header + if self.measure_header: + _dict['measureHeader'] = self.measure_header.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MeasureExecutionResultHeader from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "measureHeader": MeasureResultHeader.from_dict(obj["measureHeader"]) if obj.get("measureHeader") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/measure_group_headers.py b/gooddata-api-client/gooddata_api_client/models/measure_group_headers.py new file mode 100644 index 000000000..eb93592ed --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/measure_group_headers.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.measure_header import MeasureHeader +from typing import Optional, Set +from typing_extensions import Self + +class MeasureGroupHeaders(BaseModel): + """ + Measure group headers + """ # noqa: E501 + measure_group_headers: Optional[List[MeasureHeader]] = Field(default=None, alias="measureGroupHeaders") + __properties: ClassVar[List[str]] = ["measureGroupHeaders"] + + 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 MeasureGroupHeaders 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 each item in measure_group_headers (list) + _items = [] + if self.measure_group_headers: + for _item_measure_group_headers in self.measure_group_headers: + if _item_measure_group_headers: + _items.append(_item_measure_group_headers.to_dict()) + _dict['measureGroupHeaders'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MeasureGroupHeaders from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "measureGroupHeaders": [MeasureHeader.from_dict(_item) for _item in obj["measureGroupHeaders"]] if obj.get("measureGroupHeaders") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/measure_header.py b/gooddata-api-client/gooddata_api_client/models/measure_header.py new file mode 100644 index 000000000..9887e5b57 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/measure_header.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 MeasureHeader(BaseModel): + """ + MeasureHeader + """ # noqa: E501 + format: Optional[StrictStr] = Field(default=None, description="Format to be used to format the measure data.") + local_identifier: StrictStr = Field(description="Local identifier of the measure this header relates to.", alias="localIdentifier") + name: Optional[StrictStr] = Field(default=None, description="Name of the measure.") + __properties: ClassVar[List[str]] = ["format", "localIdentifier", "name"] + + 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 MeasureHeader 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 MeasureHeader from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "format": obj.get("format"), + "localIdentifier": obj.get("localIdentifier"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/measure_item.py b/gooddata-api-client/gooddata_api_client/models/measure_item.py new file mode 100644 index 000000000..35983fbc7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/measure_item.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from gooddata_api_client.models.measure_item_definition import MeasureItemDefinition +from typing import Optional, Set +from typing_extensions import Self + +class MeasureItem(BaseModel): + """ + Metric is a quantity that is calculated from the data. + """ # noqa: E501 + definition: MeasureItemDefinition + local_identifier: Annotated[str, Field(strict=True)] = Field(description="Local identifier of the metric. This can be used to reference the metric in other parts of the execution definition.", alias="localIdentifier") + __properties: ClassVar[List[str]] = ["definition", "localIdentifier"] + + @field_validator('local_identifier') + def local_identifier_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[.a-zA-Z0-9_-]+$", value): + raise ValueError(r"must validate the regular expression /^[.a-zA-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 MeasureItem 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 definition + if self.definition: + _dict['definition'] = self.definition.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MeasureItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "definition": MeasureItemDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "localIdentifier": obj.get("localIdentifier") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/measure_item_definition.py b/gooddata-api-client/gooddata_api_client/models/measure_item_definition.py new file mode 100644 index 000000000..4a3e4fab3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/measure_item_definition.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.arithmetic_measure_definition import ArithmeticMeasureDefinition +from gooddata_api_client.models.inline_measure_definition import InlineMeasureDefinition +from gooddata_api_client.models.pop_dataset_measure_definition import PopDatasetMeasureDefinition +from gooddata_api_client.models.pop_date_measure_definition import PopDateMeasureDefinition +from gooddata_api_client.models.pop_measure_definition import PopMeasureDefinition +from gooddata_api_client.models.simple_measure_definition import SimpleMeasureDefinition +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +MEASUREITEMDEFINITION_ONE_OF_SCHEMAS = ["ArithmeticMeasureDefinition", "InlineMeasureDefinition", "PopDatasetMeasureDefinition", "PopDateMeasureDefinition", "PopMeasureDefinition", "SimpleMeasureDefinition"] + +class MeasureItemDefinition(BaseModel): + """ + MeasureItemDefinition + """ + # data type: ArithmeticMeasureDefinition + oneof_schema_1_validator: Optional[ArithmeticMeasureDefinition] = None + # data type: InlineMeasureDefinition + oneof_schema_2_validator: Optional[InlineMeasureDefinition] = None + # data type: PopDatasetMeasureDefinition + oneof_schema_3_validator: Optional[PopDatasetMeasureDefinition] = None + # data type: PopDateMeasureDefinition + oneof_schema_4_validator: Optional[PopDateMeasureDefinition] = None + # data type: PopMeasureDefinition + oneof_schema_5_validator: Optional[PopMeasureDefinition] = None + # data type: SimpleMeasureDefinition + oneof_schema_6_validator: Optional[SimpleMeasureDefinition] = None + actual_instance: Optional[Union[ArithmeticMeasureDefinition, InlineMeasureDefinition, PopDatasetMeasureDefinition, PopDateMeasureDefinition, PopMeasureDefinition, SimpleMeasureDefinition]] = None + one_of_schemas: Set[str] = { "ArithmeticMeasureDefinition", "InlineMeasureDefinition", "PopDatasetMeasureDefinition", "PopDateMeasureDefinition", "PopMeasureDefinition", "SimpleMeasureDefinition" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = MeasureItemDefinition.model_construct() + error_messages = [] + match = 0 + # validate data type: ArithmeticMeasureDefinition + if not isinstance(v, ArithmeticMeasureDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `ArithmeticMeasureDefinition`") + else: + match += 1 + # validate data type: InlineMeasureDefinition + if not isinstance(v, InlineMeasureDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `InlineMeasureDefinition`") + else: + match += 1 + # validate data type: PopDatasetMeasureDefinition + if not isinstance(v, PopDatasetMeasureDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `PopDatasetMeasureDefinition`") + else: + match += 1 + # validate data type: PopDateMeasureDefinition + if not isinstance(v, PopDateMeasureDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `PopDateMeasureDefinition`") + else: + match += 1 + # validate data type: PopMeasureDefinition + if not isinstance(v, PopMeasureDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `PopMeasureDefinition`") + else: + match += 1 + # validate data type: SimpleMeasureDefinition + if not isinstance(v, SimpleMeasureDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `SimpleMeasureDefinition`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in MeasureItemDefinition with oneOf schemas: ArithmeticMeasureDefinition, InlineMeasureDefinition, PopDatasetMeasureDefinition, PopDateMeasureDefinition, PopMeasureDefinition, SimpleMeasureDefinition. 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 + + # deserialize data into ArithmeticMeasureDefinition + try: + if match == 0: + instance.actual_instance = ArithmeticMeasureDefinition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into InlineMeasureDefinition + try: + if match == 0: + instance.actual_instance = InlineMeasureDefinition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PopDatasetMeasureDefinition + try: + if match == 0: + instance.actual_instance = PopDatasetMeasureDefinition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PopDateMeasureDefinition + try: + if match == 0: + instance.actual_instance = PopDateMeasureDefinition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PopMeasureDefinition + try: + if match == 0: + instance.actual_instance = PopMeasureDefinition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SimpleMeasureDefinition + try: + if match == 0: + instance.actual_instance = SimpleMeasureDefinition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into MeasureItemDefinition with oneOf schemas: ArithmeticMeasureDefinition, InlineMeasureDefinition, PopDatasetMeasureDefinition, PopDateMeasureDefinition, PopMeasureDefinition, SimpleMeasureDefinition. 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], ArithmeticMeasureDefinition, InlineMeasureDefinition, PopDatasetMeasureDefinition, PopDateMeasureDefinition, PopMeasureDefinition, SimpleMeasureDefinition]]: + """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/gooddata-api-client/gooddata_api_client/models/measure_result_header.py b/gooddata-api-client/gooddata_api_client/models/measure_result_header.py new file mode 100644 index 000000000..c9df3cb1b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/measure_result_header.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class MeasureResultHeader(BaseModel): + """ + Header containing the information related to metrics. + """ # noqa: E501 + measure_index: StrictInt = Field(description="Metric index. Starts at 0.", alias="measureIndex") + __properties: ClassVar[List[str]] = ["measureIndex"] + + 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 MeasureResultHeader 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 MeasureResultHeader from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "measureIndex": obj.get("measureIndex") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/measure_value_condition.py b/gooddata-api-client/gooddata_api_client/models/measure_value_condition.py new file mode 100644 index 000000000..8e80f2f7a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/measure_value_condition.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.comparison_condition import ComparisonCondition +from gooddata_api_client.models.range_condition import RangeCondition +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +MEASUREVALUECONDITION_ONE_OF_SCHEMAS = ["ComparisonCondition", "RangeCondition"] + +class MeasureValueCondition(BaseModel): + """ + A condition for filtering by measure value. Can be either a comparison or a range condition. + """ + # data type: ComparisonCondition + oneof_schema_1_validator: Optional[ComparisonCondition] = None + # data type: RangeCondition + oneof_schema_2_validator: Optional[RangeCondition] = None + actual_instance: Optional[Union[ComparisonCondition, RangeCondition]] = None + one_of_schemas: Set[str] = { "ComparisonCondition", "RangeCondition" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = MeasureValueCondition.model_construct() + error_messages = [] + match = 0 + # validate data type: ComparisonCondition + if not isinstance(v, ComparisonCondition): + error_messages.append(f"Error! Input type `{type(v)}` is not `ComparisonCondition`") + else: + match += 1 + # validate data type: RangeCondition + if not isinstance(v, RangeCondition): + error_messages.append(f"Error! Input type `{type(v)}` is not `RangeCondition`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in MeasureValueCondition with oneOf schemas: ComparisonCondition, RangeCondition. 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 + + # deserialize data into ComparisonCondition + try: + if match == 0: + instance.actual_instance = ComparisonCondition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RangeCondition + try: + if match == 0: + instance.actual_instance = RangeCondition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into MeasureValueCondition with oneOf schemas: ComparisonCondition, RangeCondition. 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], ComparisonCondition, RangeCondition]]: + """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/gooddata-api-client/gooddata_api_client/models/measure_value_filter.py b/gooddata-api-client/gooddata_api_client/models/measure_value_filter.py new file mode 100644 index 000000000..a35a2a304 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/measure_value_filter.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.comparison_measure_value_filter import ComparisonMeasureValueFilter +from gooddata_api_client.models.compound_measure_value_filter import CompoundMeasureValueFilter +from gooddata_api_client.models.range_measure_value_filter import RangeMeasureValueFilter +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +MEASUREVALUEFILTER_ONE_OF_SCHEMAS = ["ComparisonMeasureValueFilter", "CompoundMeasureValueFilter", "RangeMeasureValueFilter"] + +class MeasureValueFilter(BaseModel): + """ + Abstract filter definition type filtering by the value of the metric. + """ + # data type: ComparisonMeasureValueFilter + oneof_schema_1_validator: Optional[ComparisonMeasureValueFilter] = None + # data type: RangeMeasureValueFilter + oneof_schema_2_validator: Optional[RangeMeasureValueFilter] = None + # data type: CompoundMeasureValueFilter + oneof_schema_3_validator: Optional[CompoundMeasureValueFilter] = None + actual_instance: Optional[Union[ComparisonMeasureValueFilter, CompoundMeasureValueFilter, RangeMeasureValueFilter]] = None + one_of_schemas: Set[str] = { "ComparisonMeasureValueFilter", "CompoundMeasureValueFilter", "RangeMeasureValueFilter" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = MeasureValueFilter.model_construct() + error_messages = [] + match = 0 + # validate data type: ComparisonMeasureValueFilter + if not isinstance(v, ComparisonMeasureValueFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `ComparisonMeasureValueFilter`") + else: + match += 1 + # validate data type: RangeMeasureValueFilter + if not isinstance(v, RangeMeasureValueFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `RangeMeasureValueFilter`") + else: + match += 1 + # validate data type: CompoundMeasureValueFilter + if not isinstance(v, CompoundMeasureValueFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `CompoundMeasureValueFilter`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in MeasureValueFilter with oneOf schemas: ComparisonMeasureValueFilter, CompoundMeasureValueFilter, RangeMeasureValueFilter. 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 + + # deserialize data into ComparisonMeasureValueFilter + try: + if match == 0: + instance.actual_instance = ComparisonMeasureValueFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RangeMeasureValueFilter + try: + if match == 0: + instance.actual_instance = RangeMeasureValueFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CompoundMeasureValueFilter + try: + if match == 0: + instance.actual_instance = CompoundMeasureValueFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into MeasureValueFilter with oneOf schemas: ComparisonMeasureValueFilter, CompoundMeasureValueFilter, RangeMeasureValueFilter. 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], ComparisonMeasureValueFilter, CompoundMeasureValueFilter, RangeMeasureValueFilter]]: + """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/gooddata-api-client/gooddata_api_client/models/memory_item_created_by_users.py b/gooddata-api-client/gooddata_api_client/models/memory_item_created_by_users.py new file mode 100644 index 000000000..80439931b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/memory_item_created_by_users.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.memory_item_user import MemoryItemUser +from typing import Optional, Set +from typing_extensions import Self + +class MemoryItemCreatedByUsers(BaseModel): + """ + MemoryItemCreatedByUsers + """ # noqa: E501 + reasoning: StrictStr = Field(description="Reasoning for error states") + users: List[MemoryItemUser] = Field(description="Users who created memory item") + __properties: ClassVar[List[str]] = ["reasoning", "users"] + + 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 MemoryItemCreatedByUsers 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 each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MemoryItemCreatedByUsers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reasoning": obj.get("reasoning"), + "users": [MemoryItemUser.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/memory_item_user.py b/gooddata-api-client/gooddata_api_client/models/memory_item_user.py new file mode 100644 index 000000000..3bd6f8b8c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/memory_item_user.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class MemoryItemUser(BaseModel): + """ + Users who created memory item + """ # noqa: E501 + firstname: StrictStr = Field(description="First name of the user who created memory item") + lastname: StrictStr = Field(description="Last name of the user who created memory item") + user_id: StrictStr = Field(description="User ID of the user who created memory item", alias="userId") + __properties: ClassVar[List[str]] = ["firstname", "lastname", "userId"] + + 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 MemoryItemUser 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 MemoryItemUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "userId": obj.get("userId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/metric.py b/gooddata-api-client/gooddata_api_client/models/metric.py new file mode 100644 index 000000000..e959d73ce --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/metric.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class Metric(BaseModel): + """ + List of metrics to be used in the new visualization + """ # noqa: E501 + agg_function: Optional[StrictStr] = Field(default=None, description="Agg function. Empty if a stored metric is used.", alias="aggFunction") + id: StrictStr = Field(description="ID of the object") + title: StrictStr = Field(description="Title of metric.") + type: StrictStr = Field(description="Object type") + __properties: ClassVar[List[str]] = ["aggFunction", "id", "title", "type"] + + @field_validator('agg_function') + def agg_function_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['COUNT', 'SUM', 'MIN', 'MAX', 'AVG', 'MEDIAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('COUNT', 'SUM', 'MIN', 'MAX', 'AVG', 'MEDIAN')") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['metric', 'fact', 'attribute']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('metric', 'fact', 'attribute')") + 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 Metric 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 Metric from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aggFunction": obj.get("aggFunction"), + "id": obj.get("id"), + "title": obj.get("title"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/metric_definition_override.py b/gooddata-api-client/gooddata_api_client/models/metric_definition_override.py new file mode 100644 index 000000000..442e1a3e0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/metric_definition_override.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.afm_object_identifier_core import AfmObjectIdentifierCore +from gooddata_api_client.models.inline_measure_definition import InlineMeasureDefinition +from typing import Optional, Set +from typing_extensions import Self + +class MetricDefinitionOverride(BaseModel): + """ + (EXPERIMENTAL) Override for a catalog metric definition. + """ # noqa: E501 + definition: InlineMeasureDefinition + item: AfmObjectIdentifierCore + __properties: ClassVar[List[str]] = ["definition", "item"] + + 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 MetricDefinitionOverride 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 definition + if self.definition: + _dict['definition'] = self.definition.to_dict() + # override the default output from pydantic by calling `to_dict()` of item + if self.item: + _dict['item'] = self.item.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MetricDefinitionOverride from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "definition": InlineMeasureDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "item": AfmObjectIdentifierCore.from_dict(obj["item"]) if obj.get("item") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/metric_record.py b/gooddata-api-client/gooddata_api_client/models/metric_record.py new file mode 100644 index 000000000..79dad87e8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/metric_record.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class MetricRecord(BaseModel): + """ + MetricRecord + """ # noqa: E501 + formatted_value: Optional[StrictStr] = Field(default=None, alias="formattedValue") + value: Union[StrictFloat, StrictInt] + __properties: ClassVar[List[str]] = ["formattedValue", "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 MetricRecord 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 MetricRecord from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "formattedValue": obj.get("formattedValue"), + "value": obj.get("value") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/metric_value_change.py b/gooddata-api-client/gooddata_api_client/models/metric_value_change.py new file mode 100644 index 000000000..af30dda9f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/metric_value_change.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class MetricValueChange(BaseModel): + """ + Individual change analysis data item + """ # noqa: E501 + attribute_name: StrictStr = Field(description="The name of the attribute being analyzed", alias="attributeName") + attribute_value: StrictStr = Field(description="The value of the attribute being analyzed", alias="attributeValue") + attribute_values_change_mean: Union[StrictFloat, StrictInt] = Field(description="The mean of attribute value changes for the attribute being analyzed", alias="attributeValuesChangeMean") + attribute_values_change_std: Union[StrictFloat, StrictInt] = Field(description="The standard deviation of attribute value changes for the attribute being analyzed", alias="attributeValuesChangeStd") + is_significant_change: StrictBool = Field(description="Whether the change is statistically significant", alias="isSignificantChange") + metric_value_delta: Union[StrictFloat, StrictInt] = Field(description="The delta between analyzed and reference periods", alias="metricValueDelta") + metric_value_delta_abs: Union[StrictFloat, StrictInt] = Field(description="The absolute delta between analyzed and reference periods", alias="metricValueDeltaAbs") + metric_value_in_analyzed_period: Union[StrictFloat, StrictInt] = Field(description="The metric value in the analyzed period", alias="metricValueInAnalyzedPeriod") + metric_value_in_reference_period: Union[StrictFloat, StrictInt] = Field(description="The metric value in the reference period", alias="metricValueInReferencePeriod") + overall_metric_value_in_analyzed_period: Union[StrictFloat, StrictInt] = Field(description="The overall metric value in the analyzed period", alias="overallMetricValueInAnalyzedPeriod") + overall_metric_value_in_reference_period: Union[StrictFloat, StrictInt] = Field(description="The overall metric value in the reference period", alias="overallMetricValueInReferencePeriod") + __properties: ClassVar[List[str]] = ["attributeName", "attributeValue", "attributeValuesChangeMean", "attributeValuesChangeStd", "isSignificantChange", "metricValueDelta", "metricValueDeltaAbs", "metricValueInAnalyzedPeriod", "metricValueInReferencePeriod", "overallMetricValueInAnalyzedPeriod", "overallMetricValueInReferencePeriod"] + + 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 MetricValueChange 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 MetricValueChange from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributeName": obj.get("attributeName"), + "attributeValue": obj.get("attributeValue"), + "attributeValuesChangeMean": obj.get("attributeValuesChangeMean"), + "attributeValuesChangeStd": obj.get("attributeValuesChangeStd"), + "isSignificantChange": obj.get("isSignificantChange"), + "metricValueDelta": obj.get("metricValueDelta"), + "metricValueDeltaAbs": obj.get("metricValueDeltaAbs"), + "metricValueInAnalyzedPeriod": obj.get("metricValueInAnalyzedPeriod"), + "metricValueInReferencePeriod": obj.get("metricValueInReferencePeriod"), + "overallMetricValueInAnalyzedPeriod": obj.get("overallMetricValueInAnalyzedPeriod"), + "overallMetricValueInReferencePeriod": obj.get("overallMetricValueInReferencePeriod") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/model_test_result.py b/gooddata-api-client/gooddata_api_client/models/model_test_result.py new file mode 100644 index 000000000..ced009ee5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/model_test_result.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ModelTestResult(BaseModel): + """ + Per-model test results. + """ # noqa: E501 + message: StrictStr = Field(description="Message about the model test result.") + model_id: StrictStr = Field(description="The model ID that was tested.", alias="modelId") + successful: StrictBool = Field(description="Whether the model test was successful.") + __properties: ClassVar[List[str]] = ["message", "modelId", "successful"] + + 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 ModelTestResult 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 ModelTestResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "modelId": obj.get("modelId"), + "successful": obj.get("successful") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/negative_attribute_filter.py b/gooddata-api-client/gooddata_api_client/models/negative_attribute_filter.py new file mode 100644 index 000000000..66da3c6c9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/negative_attribute_filter.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.negative_attribute_filter_negative_attribute_filter import NegativeAttributeFilterNegativeAttributeFilter +from typing import Optional, Set +from typing_extensions import Self + +class NegativeAttributeFilter(BaseModel): + """ + Filter able to limit element values by label and related selected negated elements. + """ # noqa: E501 + negative_attribute_filter: NegativeAttributeFilterNegativeAttributeFilter = Field(alias="negativeAttributeFilter") + __properties: ClassVar[List[str]] = ["negativeAttributeFilter"] + + 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 NegativeAttributeFilter 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 negative_attribute_filter + if self.negative_attribute_filter: + _dict['negativeAttributeFilter'] = self.negative_attribute_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NegativeAttributeFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "negativeAttributeFilter": NegativeAttributeFilterNegativeAttributeFilter.from_dict(obj["negativeAttributeFilter"]) if obj.get("negativeAttributeFilter") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/negative_attribute_filter_negative_attribute_filter.py b/gooddata-api-client/gooddata_api_client/models/negative_attribute_filter_negative_attribute_filter.py new file mode 100644 index 000000000..9a985bb0c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/negative_attribute_filter_negative_attribute_filter.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.afm_identifier import AfmIdentifier +from gooddata_api_client.models.attribute_filter_elements import AttributeFilterElements +from typing import Optional, Set +from typing_extensions import Self + +class NegativeAttributeFilterNegativeAttributeFilter(BaseModel): + """ + NegativeAttributeFilterNegativeAttributeFilter + """ # noqa: E501 + apply_on_result: Optional[StrictBool] = Field(default=None, alias="applyOnResult") + label: AfmIdentifier + local_identifier: Optional[StrictStr] = Field(default=None, alias="localIdentifier") + not_in: AttributeFilterElements = Field(alias="notIn") + __properties: ClassVar[List[str]] = ["applyOnResult", "label", "localIdentifier", "notIn"] + + 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 NegativeAttributeFilterNegativeAttributeFilter 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 label + if self.label: + _dict['label'] = self.label.to_dict() + # override the default output from pydantic by calling `to_dict()` of not_in + if self.not_in: + _dict['notIn'] = self.not_in.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NegativeAttributeFilterNegativeAttributeFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applyOnResult": obj.get("applyOnResult"), + "label": AfmIdentifier.from_dict(obj["label"]) if obj.get("label") is not None else None, + "localIdentifier": obj.get("localIdentifier"), + "notIn": AttributeFilterElements.from_dict(obj["notIn"]) if obj.get("notIn") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/note.py b/gooddata-api-client/gooddata_api_client/models/note.py new file mode 100644 index 000000000..7266eda77 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/note.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class Note(BaseModel): + """ + Note + """ # noqa: E501 + applies_to: Optional[StrictStr] = Field(default=None, alias="appliesTo") + category: Optional[StrictStr] = None + content: Optional[StrictStr] = None + id: Optional[StrictStr] = None + other_attributes: Optional[Dict[str, StrictStr]] = Field(default=None, alias="otherAttributes") + priority: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["appliesTo", "category", "content", "id", "otherAttributes", "priority"] + + @field_validator('applies_to') + def applies_to_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['SOURCE', 'TARGET']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SOURCE', 'TARGET')") + 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 Note 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 Note from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "appliesTo": obj.get("appliesTo"), + "category": obj.get("category"), + "content": obj.get("content"), + "id": obj.get("id"), + "otherAttributes": obj.get("otherAttributes"), + "priority": obj.get("priority") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/notes.py b/gooddata-api-client/gooddata_api_client/models/notes.py new file mode 100644 index 000000000..d23204c6f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/notes.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.note import Note +from typing import Optional, Set +from typing_extensions import Self + +class Notes(BaseModel): + """ + Notes + """ # noqa: E501 + note: Optional[List[Note]] = None + __properties: ClassVar[List[str]] = ["note"] + + 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 Notes 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 each item in note (list) + _items = [] + if self.note: + for _item_note in self.note: + if _item_note: + _items.append(_item_note.to_dict()) + _dict['note'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Notes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "note": [Note.from_dict(_item) for _item in obj["note"]] if obj.get("note") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/notification.py b/gooddata-api-client/gooddata_api_client/models/notification.py new file mode 100644 index 000000000..2ee0cd95c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/notification.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.notification_data import NotificationData +from typing import Optional, Set +from typing_extensions import Self + +class Notification(BaseModel): + """ + Notification + """ # noqa: E501 + automation_id: Optional[StrictStr] = Field(default=None, alias="automationId") + created_at: datetime = Field(alias="createdAt") + data: NotificationData + id: StrictStr + is_read: StrictBool = Field(alias="isRead") + workspace_id: Optional[StrictStr] = Field(default=None, alias="workspaceId") + __properties: ClassVar[List[str]] = ["automationId", "createdAt", "data", "id", "isRead", "workspaceId"] + + 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 Notification 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Notification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "automationId": obj.get("automationId"), + "createdAt": obj.get("createdAt"), + "data": NotificationData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "id": obj.get("id"), + "isRead": obj.get("isRead"), + "workspaceId": obj.get("workspaceId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/notification_channel_destination.py b/gooddata-api-client/gooddata_api_client/models/notification_channel_destination.py new file mode 100644 index 000000000..9d230a0df --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/notification_channel_destination.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.default_smtp import DefaultSmtp +from gooddata_api_client.models.in_platform import InPlatform +from gooddata_api_client.models.smtp import Smtp +from gooddata_api_client.models.webhook import Webhook +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +NOTIFICATIONCHANNELDESTINATION_ONE_OF_SCHEMAS = ["DefaultSmtp", "InPlatform", "Smtp", "Webhook"] + +class NotificationChannelDestination(BaseModel): + """ + NotificationChannelDestination + """ + # data type: Webhook + oneof_schema_1_validator: Optional[Webhook] = None + # data type: Smtp + oneof_schema_2_validator: Optional[Smtp] = None + # data type: DefaultSmtp + oneof_schema_3_validator: Optional[DefaultSmtp] = None + # data type: InPlatform + oneof_schema_4_validator: Optional[InPlatform] = None + actual_instance: Optional[Union[DefaultSmtp, InPlatform, Smtp, Webhook]] = None + one_of_schemas: Set[str] = { "DefaultSmtp", "InPlatform", "Smtp", "Webhook" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = NotificationChannelDestination.model_construct() + error_messages = [] + match = 0 + # validate data type: Webhook + if not isinstance(v, Webhook): + error_messages.append(f"Error! Input type `{type(v)}` is not `Webhook`") + else: + match += 1 + # validate data type: Smtp + if not isinstance(v, Smtp): + error_messages.append(f"Error! Input type `{type(v)}` is not `Smtp`") + else: + match += 1 + # validate data type: DefaultSmtp + if not isinstance(v, DefaultSmtp): + error_messages.append(f"Error! Input type `{type(v)}` is not `DefaultSmtp`") + else: + match += 1 + # validate data type: InPlatform + if not isinstance(v, InPlatform): + error_messages.append(f"Error! Input type `{type(v)}` is not `InPlatform`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in NotificationChannelDestination with oneOf schemas: DefaultSmtp, InPlatform, Smtp, Webhook. 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 + + # deserialize data into Webhook + try: + if match == 0: + instance.actual_instance = Webhook.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Smtp + try: + if match == 0: + instance.actual_instance = Smtp.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DefaultSmtp + try: + if match == 0: + instance.actual_instance = DefaultSmtp.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into InPlatform + try: + if match == 0: + instance.actual_instance = InPlatform.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into NotificationChannelDestination with oneOf schemas: DefaultSmtp, InPlatform, Smtp, Webhook. 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], DefaultSmtp, InPlatform, Smtp, Webhook]]: + """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/gooddata-api-client/gooddata_api_client/models/notification_content.py b/gooddata-api-client/gooddata_api_client/models/notification_content.py new file mode 100644 index 000000000..bbdccea11 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/notification_content.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 importlib import import_module +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +from typing import TYPE_CHECKING +if TYPE_CHECKING: + from gooddata_api_client.models.automation_notification import AutomationNotification + from gooddata_api_client.models.test_notification import TestNotification + +class NotificationContent(BaseModel): + """ + NotificationContent + """ # noqa: E501 + type: StrictStr + __properties: ClassVar[List[str]] = ["type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + # JSON field name that stores the object type + __discriminator_property_name: ClassVar[str] = 'type' + + # discriminator mappings + __discriminator_value_class_map: ClassVar[Dict[str, str]] = { + 'AUTOMATION': 'AutomationNotification','TEST': 'TestNotification' + } + + @classmethod + def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: + """Returns the discriminator value (object type) of the data""" + discriminator_value = obj[cls.__discriminator_property_name] + if discriminator_value: + return cls.__discriminator_value_class_map.get(discriminator_value) + else: + return None + + 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[Union[AutomationNotification, TestNotification]]: + """Create an instance of NotificationContent 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: Dict[str, Any]) -> Optional[Union[AutomationNotification, TestNotification]]: + """Create an instance of NotificationContent from a dict""" + # look up the object type based on discriminator mapping + object_type = cls.get_discriminator_value(obj) + if object_type == 'AutomationNotification': + return import_module("gooddata_api_client.models.automation_notification").AutomationNotification.from_dict(obj) + if object_type == 'TestNotification': + return import_module("gooddata_api_client.models.test_notification").TestNotification.from_dict(obj) + + raise ValueError("NotificationContent failed to lookup discriminator value from " + + json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + + ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) + + diff --git a/gooddata-api-client/gooddata_api_client/models/notification_data.py b/gooddata-api-client/gooddata_api_client/models/notification_data.py new file mode 100644 index 000000000..d2fb81a79 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/notification_data.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.automation_notification import AutomationNotification +from gooddata_api_client.models.test_notification import TestNotification +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +NOTIFICATIONDATA_ONE_OF_SCHEMAS = ["AutomationNotification", "TestNotification"] + +class NotificationData(BaseModel): + """ + NotificationData + """ + # data type: AutomationNotification + oneof_schema_1_validator: Optional[AutomationNotification] = None + # data type: TestNotification + oneof_schema_2_validator: Optional[TestNotification] = None + actual_instance: Optional[Union[AutomationNotification, TestNotification]] = None + one_of_schemas: Set[str] = { "AutomationNotification", "TestNotification" } + + 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 = NotificationData.model_construct() + error_messages = [] + match = 0 + # validate data type: AutomationNotification + if not isinstance(v, AutomationNotification): + error_messages.append(f"Error! Input type `{type(v)}` is not `AutomationNotification`") + else: + match += 1 + # validate data type: TestNotification + if not isinstance(v, TestNotification): + error_messages.append(f"Error! Input type `{type(v)}` is not `TestNotification`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in NotificationData with oneOf schemas: AutomationNotification, TestNotification. 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 + + # deserialize data into AutomationNotification + try: + if match == 0: + instance.actual_instance = AutomationNotification.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TestNotification + try: + if match == 0: + instance.actual_instance = TestNotification.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into NotificationData with oneOf schemas: AutomationNotification, TestNotification. 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], AutomationNotification, TestNotification]]: + """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/gooddata-api-client/gooddata_api_client/models/notification_filter.py b/gooddata-api-client/gooddata_api_client/models/notification_filter.py new file mode 100644 index 000000000..dc5110868 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/notification_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class NotificationFilter(BaseModel): + """ + NotificationFilter + """ # noqa: E501 + filter: StrictStr + title: StrictStr + __properties: ClassVar[List[str]] = ["filter", "title"] + + 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 NotificationFilter 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 NotificationFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filter": obj.get("filter"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/notifications.py b/gooddata-api-client/gooddata_api_client/models/notifications.py new file mode 100644 index 000000000..22eb6d813 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/notifications.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.notification import Notification +from gooddata_api_client.models.notifications_meta import NotificationsMeta +from typing import Optional, Set +from typing_extensions import Self + +class Notifications(BaseModel): + """ + Notifications + """ # noqa: E501 + data: List[Notification] + meta: NotificationsMeta + __properties: ClassVar[List[str]] = ["data", "meta"] + + 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 Notifications 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Notifications from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [Notification.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "meta": NotificationsMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/notifications_meta.py b/gooddata-api-client/gooddata_api_client/models/notifications_meta.py new file mode 100644 index 000000000..7bc99feec --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/notifications_meta.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.notifications_meta_total import NotificationsMetaTotal +from typing import Optional, Set +from typing_extensions import Self + +class NotificationsMeta(BaseModel): + """ + NotificationsMeta + """ # noqa: E501 + total: Optional[NotificationsMetaTotal] = None + __properties: ClassVar[List[str]] = ["total"] + + 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 NotificationsMeta 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 total + if self.total: + _dict['total'] = self.total.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NotificationsMeta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": NotificationsMetaTotal.from_dict(obj["total"]) if obj.get("total") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/notifications_meta_total.py b/gooddata-api-client/gooddata_api_client/models/notifications_meta_total.py new file mode 100644 index 000000000..5901c699a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/notifications_meta_total.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class NotificationsMetaTotal(BaseModel): + """ + NotificationsMetaTotal + """ # noqa: E501 + all: StrictInt + unread: StrictInt + __properties: ClassVar[List[str]] = ["all", "unread"] + + 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 NotificationsMetaTotal 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 NotificationsMetaTotal from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "all": obj.get("all"), + "unread": obj.get("unread") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/object_links.py b/gooddata-api-client/gooddata_api_client/models/object_links.py new file mode 100644 index 000000000..70f91157f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/object_links.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ObjectLinks(BaseModel): + """ + ObjectLinks + """ # noqa: E501 + var_self: StrictStr = Field(description="A string containing the link's URL.", alias="self") + __properties: ClassVar[List[str]] = ["self"] + + 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 ObjectLinks 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 ObjectLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": obj.get("self") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/object_links_container.py b/gooddata-api-client/gooddata_api_client/models/object_links_container.py new file mode 100644 index 000000000..7a68bb302 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/object_links_container.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.object_links import ObjectLinks +from typing import Optional, Set +from typing_extensions import Self + +class ObjectLinksContainer(BaseModel): + """ + ObjectLinksContainer + """ # noqa: E501 + links: Optional[ObjectLinks] = None + __properties: ClassVar[List[str]] = ["links"] + + 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 ObjectLinksContainer 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 links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ObjectLinksContainer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "links": ObjectLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/open_ai_api_key_auth.py b/gooddata-api-client/gooddata_api_client/models/open_ai_api_key_auth.py new file mode 100644 index 000000000..fbeaaf115 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/open_ai_api_key_auth.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 OpenAiApiKeyAuth(BaseModel): + """ + OpenAiApiKeyAuth + """ # noqa: E501 + api_key: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="OpenAI API key.", alias="apiKey") + type: StrictStr = Field(description="Authentication type.") + __properties: ClassVar[List[str]] = ["apiKey", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['API_KEY']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('API_KEY')") + 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 OpenAiApiKeyAuth 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 api_key (nullable) is None + # and model_fields_set contains the field + if self.api_key is None and "api_key" in self.model_fields_set: + _dict['apiKey'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpenAiApiKeyAuth from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "apiKey": obj.get("apiKey"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/open_ai_provider_auth.py b/gooddata-api-client/gooddata_api_client/models/open_ai_provider_auth.py new file mode 100644 index 000000000..33694399c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/open_ai_provider_auth.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.open_ai_api_key_auth import OpenAiApiKeyAuth +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +OPENAIPROVIDERAUTH_ONE_OF_SCHEMAS = ["OpenAiApiKeyAuth"] + +class OpenAiProviderAuth(BaseModel): + """ + Authentication configuration. + """ + # data type: OpenAiApiKeyAuth + oneof_schema_1_validator: Optional[OpenAiApiKeyAuth] = None + actual_instance: Optional[Union[OpenAiApiKeyAuth]] = None + one_of_schemas: Set[str] = { "OpenAiApiKeyAuth" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = OpenAiProviderAuth.model_construct() + error_messages = [] + match = 0 + # validate data type: OpenAiApiKeyAuth + if not isinstance(v, OpenAiApiKeyAuth): + error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAiApiKeyAuth`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in OpenAiProviderAuth with oneOf schemas: OpenAiApiKeyAuth. 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 + + # deserialize data into OpenAiApiKeyAuth + try: + if match == 0: + instance.actual_instance = OpenAiApiKeyAuth.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into OpenAiProviderAuth with oneOf schemas: OpenAiApiKeyAuth. 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], OpenAiApiKeyAuth]]: + """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/gooddata-api-client/gooddata_api_client/models/open_ai_provider_config.py b/gooddata-api-client/gooddata_api_client/models/open_ai_provider_config.py new file mode 100644 index 000000000..fea7d1b35 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/open_ai_provider_config.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.open_ai_provider_auth import OpenAiProviderAuth +from typing import Optional, Set +from typing_extensions import Self + +class OpenAIProviderConfig(BaseModel): + """ + Configuration for OpenAI provider. + """ # noqa: E501 + auth: OpenAiProviderAuth + base_url: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default='https://api.openai.com', description="Custom base URL for OpenAI API.", alias="baseUrl") + organization: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="OpenAI organization ID.") + type: StrictStr = Field(description="Provider type.") + __properties: ClassVar[List[str]] = ["auth", "baseUrl", "organization", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['OPENAI']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('OPENAI')") + 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 OpenAIProviderConfig 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 auth + if self.auth: + _dict['auth'] = self.auth.to_dict() + # set to None if base_url (nullable) is None + # and model_fields_set contains the field + if self.base_url is None and "base_url" in self.model_fields_set: + _dict['baseUrl'] = None + + # set to None if organization (nullable) is None + # and model_fields_set contains the field + if self.organization is None and "organization" in self.model_fields_set: + _dict['organization'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpenAIProviderConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "auth": OpenAiProviderAuth.from_dict(obj["auth"]) if obj.get("auth") is not None else None, + "baseUrl": obj.get("baseUrl") if obj.get("baseUrl") is not None else 'https://api.openai.com', + "organization": obj.get("organization"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/operation.py b/gooddata-api-client/gooddata_api_client/models/operation.py new file mode 100644 index 000000000..6d898766d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/operation.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 importlib import import_module +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +from typing import TYPE_CHECKING +if TYPE_CHECKING: + from gooddata_api_client.models.failed_operation import FailedOperation + from gooddata_api_client.models.pending_operation import PendingOperation + from gooddata_api_client.models.succeeded_operation import SucceededOperation + +class Operation(BaseModel): + """ + Represents a Long-Running Operation: a process that takes some time to complete. + """ # noqa: E501 + id: StrictStr = Field(description="Id of the operation") + kind: StrictStr = Field(description="Type of the long-running operation. * `provision-database` — Provisioning of an AI Lake database. * `deprovision-database` — Deprovisioning (deletion) of an AI Lake database. * `run-service-command` — Running a command in a particular AI Lake service. ") + status: StrictStr + __properties: ClassVar[List[str]] = ["id", "kind", "status"] + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['provision-database', 'deprovision-database', 'run-service-command']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('provision-database', 'deprovision-database', 'run-service-command')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + # JSON field name that stores the object type + __discriminator_property_name: ClassVar[str] = 'status' + + # discriminator mappings + __discriminator_value_class_map: ClassVar[Dict[str, str]] = { + 'failed': 'FailedOperation','pending': 'PendingOperation','succeeded': 'SucceededOperation' + } + + @classmethod + def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: + """Returns the discriminator value (object type) of the data""" + discriminator_value = obj[cls.__discriminator_property_name] + if discriminator_value: + return cls.__discriminator_value_class_map.get(discriminator_value) + else: + return None + + 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[Union[FailedOperation, PendingOperation, SucceededOperation]]: + """Create an instance of Operation 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: Dict[str, Any]) -> Optional[Union[FailedOperation, PendingOperation, SucceededOperation]]: + """Create an instance of Operation from a dict""" + # look up the object type based on discriminator mapping + object_type = cls.get_discriminator_value(obj) + if object_type == 'FailedOperation': + return import_module("gooddata_api_client.models.failed_operation").FailedOperation.from_dict(obj) + if object_type == 'PendingOperation': + return import_module("gooddata_api_client.models.pending_operation").PendingOperation.from_dict(obj) + if object_type == 'SucceededOperation': + return import_module("gooddata_api_client.models.succeeded_operation").SucceededOperation.from_dict(obj) + + raise ValueError("Operation failed to lookup discriminator value from " + + json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + + ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) + + diff --git a/gooddata-api-client/gooddata_api_client/models/operation_error.py b/gooddata-api-client/gooddata_api_client/models/operation_error.py new file mode 100644 index 000000000..6d0937137 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/operation_error.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OperationError(BaseModel): + """ + Error information for a failed operation + """ # noqa: E501 + detail: StrictStr = Field(description="Human-readable error details") + status: StrictInt = Field(description="HTTP status code") + title: StrictStr = Field(description="Human-readable error name") + __properties: ClassVar[List[str]] = ["detail", "status", "title"] + + 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 OperationError 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 OperationError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "detail": obj.get("detail"), + "status": obj.get("status"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/organization_automation_identifier.py b/gooddata-api-client/gooddata_api_client/models/organization_automation_identifier.py new file mode 100644 index 000000000..7ca48cd47 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/organization_automation_identifier.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationAutomationIdentifier(BaseModel): + """ + OrganizationAutomationIdentifier + """ # noqa: E501 + id: StrictStr + workspace_id: StrictStr = Field(alias="workspaceId") + __properties: ClassVar[List[str]] = ["id", "workspaceId"] + + 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 OrganizationAutomationIdentifier 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 OrganizationAutomationIdentifier 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"), + "workspaceId": obj.get("workspaceId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/organization_automation_management_bulk_request.py b/gooddata-api-client/gooddata_api_client/models/organization_automation_management_bulk_request.py new file mode 100644 index 000000000..95923e903 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/organization_automation_management_bulk_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.organization_automation_identifier import OrganizationAutomationIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationAutomationManagementBulkRequest(BaseModel): + """ + OrganizationAutomationManagementBulkRequest + """ # noqa: E501 + automations: List[OrganizationAutomationIdentifier] + __properties: ClassVar[List[str]] = ["automations"] + + 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 OrganizationAutomationManagementBulkRequest 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 each item in automations (list) + _items = [] + if self.automations: + for _item_automations in self.automations: + if _item_automations: + _items.append(_item_automations.to_dict()) + _dict['automations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationAutomationManagementBulkRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "automations": [OrganizationAutomationIdentifier.from_dict(_item) for _item in obj["automations"]] if obj.get("automations") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/organization_permission_assignment.py b/gooddata-api-client/gooddata_api_client/models/organization_permission_assignment.py new file mode 100644 index 000000000..59d39ccbb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/organization_permission_assignment.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.assignee_identifier import AssigneeIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationPermissionAssignment(BaseModel): + """ + Organization permission assignments + """ # noqa: E501 + assignee_identifier: AssigneeIdentifier = Field(alias="assigneeIdentifier") + permissions: List[StrictStr] + __properties: ClassVar[List[str]] = ["assigneeIdentifier", "permissions"] + + @field_validator('permissions') + def permissions_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['MANAGE', 'SELF_CREATE_TOKEN', 'BASE_UI_ACCESS']): + raise ValueError("each list item must be one of ('MANAGE', 'SELF_CREATE_TOKEN', 'BASE_UI_ACCESS')") + 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 OrganizationPermissionAssignment 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 assignee_identifier + if self.assignee_identifier: + _dict['assigneeIdentifier'] = self.assignee_identifier.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationPermissionAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assigneeIdentifier": AssigneeIdentifier.from_dict(obj["assigneeIdentifier"]) if obj.get("assigneeIdentifier") is not None else None, + "permissions": obj.get("permissions") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/outlier_detection_request.py b/gooddata-api-client/gooddata_api_client/models/outlier_detection_request.py new file mode 100644 index 000000000..27c3e250c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/outlier_detection_request.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.attribute_item import AttributeItem +from gooddata_api_client.models.change_analysis_params_filters_inner import ChangeAnalysisParamsFiltersInner +from gooddata_api_client.models.measure_item import MeasureItem +from typing import Optional, Set +from typing_extensions import Self + +class OutlierDetectionRequest(BaseModel): + """ + OutlierDetectionRequest + """ # noqa: E501 + attributes: List[AttributeItem] = Field(description="Attributes to be used in the computation.") + aux_measures: Optional[List[MeasureItem]] = Field(default=None, description="Metrics to be referenced from other AFM objects (e.g. filters) but not included in the result.", alias="auxMeasures") + filters: List[ChangeAnalysisParamsFiltersInner] = Field(description="Various filter types to filter the execution result.") + granularity: StrictStr = Field(description="Date granularity for anomaly detection. Only time-based granularities are supported (HOUR, DAY, WEEK, MONTH, QUARTER, YEAR).") + measures: Annotated[List[MeasureItem], Field(min_length=1)] + sensitivity: StrictStr = Field(description="Sensitivity level for outlier detection") + __properties: ClassVar[List[str]] = ["attributes", "auxMeasures", "filters", "granularity", "measures", "sensitivity"] + + @field_validator('granularity') + def granularity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR')") + return value + + @field_validator('sensitivity') + def sensitivity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['LOW', 'MEDIUM', 'HIGH']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('LOW', 'MEDIUM', 'HIGH')") + 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 OutlierDetectionRequest 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 each item in attributes (list) + _items = [] + if self.attributes: + for _item_attributes in self.attributes: + if _item_attributes: + _items.append(_item_attributes.to_dict()) + _dict['attributes'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in aux_measures (list) + _items = [] + if self.aux_measures: + for _item_aux_measures in self.aux_measures: + if _item_aux_measures: + _items.append(_item_aux_measures.to_dict()) + _dict['auxMeasures'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in measures (list) + _items = [] + if self.measures: + for _item_measures in self.measures: + if _item_measures: + _items.append(_item_measures.to_dict()) + _dict['measures'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OutlierDetectionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": [AttributeItem.from_dict(_item) for _item in obj["attributes"]] if obj.get("attributes") is not None else None, + "auxMeasures": [MeasureItem.from_dict(_item) for _item in obj["auxMeasures"]] if obj.get("auxMeasures") is not None else None, + "filters": [ChangeAnalysisParamsFiltersInner.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "granularity": obj.get("granularity"), + "measures": [MeasureItem.from_dict(_item) for _item in obj["measures"]] if obj.get("measures") is not None else None, + "sensitivity": obj.get("sensitivity") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/outlier_detection_response.py b/gooddata-api-client/gooddata_api_client/models/outlier_detection_response.py new file mode 100644 index 000000000..f0d83d2fa --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/outlier_detection_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.execution_links import ExecutionLinks +from typing import Optional, Set +from typing_extensions import Self + +class OutlierDetectionResponse(BaseModel): + """ + OutlierDetectionResponse + """ # noqa: E501 + links: ExecutionLinks + __properties: ClassVar[List[str]] = ["links"] + + 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 OutlierDetectionResponse 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 links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OutlierDetectionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "links": ExecutionLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/outlier_detection_result.py b/gooddata-api-client/gooddata_api_client/models/outlier_detection_result.py new file mode 100644 index 000000000..600317f29 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/outlier_detection_result.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class OutlierDetectionResult(BaseModel): + """ + OutlierDetectionResult + """ # noqa: E501 + attribute: Optional[List[StrictStr]] = Field(description="Attribute values for outlier detection results.") + values: Optional[Dict[str, Optional[List[Optional[Union[StrictFloat, StrictInt]]]]]] = Field(description="Map of measure identifiers to their outlier detection values. Each value is a list of nullable numbers.") + __properties: ClassVar[List[str]] = ["attribute", "values"] + + 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 OutlierDetectionResult 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 attribute (nullable) is None + # and model_fields_set contains the field + if self.attribute is None and "attribute" in self.model_fields_set: + _dict['attribute'] = None + + # set to None if values (nullable) is None + # and model_fields_set contains the field + if self.values is None and "values" in self.model_fields_set: + _dict['values'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OutlierDetectionResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attribute": obj.get("attribute"), + "values": obj.get("values") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/over.py b/gooddata-api-client/gooddata_api_client/models/over.py new file mode 100644 index 000000000..4ed36cc7a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/over.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.identifier_ref import IdentifierRef +from typing import Optional, Set +from typing_extensions import Self + +class Over(BaseModel): + """ + Over + """ # noqa: E501 + attributes: List[IdentifierRef] + __properties: ClassVar[List[str]] = ["attributes"] + + 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 Over 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 each item in attributes (list) + _items = [] + if self.attributes: + for _item_attributes in self.attributes: + if _item_attributes: + _items.append(_item_attributes.to_dict()) + _dict['attributes'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Over from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": [IdentifierRef.from_dict(_item) for _item in obj["attributes"]] if obj.get("attributes") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/page_metadata.py b/gooddata-api-client/gooddata_api_client/models/page_metadata.py new file mode 100644 index 000000000..4896090d9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/page_metadata.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 PageMetadata(BaseModel): + """ + PageMetadata + """ # noqa: E501 + number: Optional[StrictInt] = Field(default=None, description="The number of the current page") + size: Optional[StrictInt] = Field(default=None, description="The size of the current page") + total_elements: Optional[StrictInt] = Field(default=None, description="The total number of elements", alias="totalElements") + total_pages: Optional[StrictInt] = Field(default=None, description="The total number of pages", alias="totalPages") + __properties: ClassVar[List[str]] = ["number", "size", "totalElements", "totalPages"] + + 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 PageMetadata 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 PageMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "number": obj.get("number"), + "size": obj.get("size"), + "totalElements": obj.get("totalElements"), + "totalPages": obj.get("totalPages") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/paging.py b/gooddata-api-client/gooddata_api_client/models/paging.py new file mode 100644 index 000000000..8a218c8f6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/paging.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Paging(BaseModel): + """ + Current page description. + """ # noqa: E501 + count: StrictInt = Field(description="Count of items in this page.") + next: Optional[StrictStr] = Field(default=None, description="Link to next page, or null if this is last page.") + offset: StrictInt = Field(description="Offset of this page.") + total: StrictInt = Field(description="Count of returnable items ignoring paging.") + __properties: ClassVar[List[str]] = ["count", "next", "offset", "total"] + + 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 Paging 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 Paging from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "count": obj.get("count"), + "next": obj.get("next"), + "offset": obj.get("offset"), + "total": obj.get("total") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/parameter.py b/gooddata-api-client/gooddata_api_client/models/parameter.py new file mode 100644 index 000000000..7c37f5ad1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/parameter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class Parameter(BaseModel): + """ + Parameter + """ # noqa: E501 + name: StrictStr + value: StrictStr + __properties: ClassVar[List[str]] = ["name", "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 Parameter 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 Parameter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "value": obj.get("value") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/patch_knowledge_document_request_dto.py b/gooddata-api-client/gooddata_api_client/models/patch_knowledge_document_request_dto.py new file mode 100644 index 000000000..6847513ca --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/patch_knowledge_document_request_dto.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PatchKnowledgeDocumentRequestDto(BaseModel): + """ + PatchKnowledgeDocumentRequestDto + """ # noqa: E501 + is_disabled: Optional[StrictBool] = Field(default=None, alias="isDisabled") + scopes: Optional[List[StrictStr]] = None + title: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["isDisabled", "scopes", "title"] + + 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 PatchKnowledgeDocumentRequestDto 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 PatchKnowledgeDocumentRequestDto from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "isDisabled": obj.get("isDisabled"), + "scopes": obj.get("scopes"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/pdf_table_style.py b/gooddata-api-client/gooddata_api_client/models/pdf_table_style.py new file mode 100644 index 000000000..213ff2d35 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/pdf_table_style.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.pdf_table_style_property import PdfTableStyleProperty +from typing import Optional, Set +from typing_extensions import Self + +class PdfTableStyle(BaseModel): + """ + Custom CSS styles for the table. (PDF, HTML) + """ # noqa: E501 + properties: Optional[List[PdfTableStyleProperty]] = Field(default=None, description="List of CSS properties.") + selector: StrictStr = Field(description="CSS selector where to apply given properties.") + __properties: ClassVar[List[str]] = ["properties", "selector"] + + 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 PdfTableStyle 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 each item in properties (list) + _items = [] + if self.properties: + for _item_properties in self.properties: + if _item_properties: + _items.append(_item_properties.to_dict()) + _dict['properties'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PdfTableStyle from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "properties": [PdfTableStyleProperty.from_dict(_item) for _item in obj["properties"]] if obj.get("properties") is not None else None, + "selector": obj.get("selector") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/pdf_table_style_property.py b/gooddata-api-client/gooddata_api_client/models/pdf_table_style_property.py new file mode 100644 index 000000000..bb31d16f9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/pdf_table_style_property.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class PdfTableStyleProperty(BaseModel): + """ + CSS property. + """ # noqa: E501 + key: StrictStr = Field(description="CSS property key.") + value: StrictStr = Field(description="CSS property value.") + __properties: ClassVar[List[str]] = ["key", "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 PdfTableStyleProperty 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 PdfTableStyleProperty from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "key": obj.get("key"), + "value": obj.get("value") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/pdm_ldm_request.py b/gooddata-api-client/gooddata_api_client/models/pdm_ldm_request.py new file mode 100644 index 000000000..bdca6ad68 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/pdm_ldm_request.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.declarative_table import DeclarativeTable +from gooddata_api_client.models.pdm_sql import PdmSql +from gooddata_api_client.models.table_override import TableOverride +from typing import Optional, Set +from typing_extensions import Self + +class PdmLdmRequest(BaseModel): + """ + PDM additions wrapper. + """ # noqa: E501 + sqls: Optional[List[PdmSql]] = Field(default=None, description="List of SQL datasets.") + table_overrides: Optional[List[TableOverride]] = Field(default=None, description="(BETA) List of table overrides.", alias="tableOverrides") + tables: Optional[List[DeclarativeTable]] = Field(default=None, description="List of physical database tables.") + __properties: ClassVar[List[str]] = ["sqls", "tableOverrides", "tables"] + + 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 PdmLdmRequest 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 each item in sqls (list) + _items = [] + if self.sqls: + for _item_sqls in self.sqls: + if _item_sqls: + _items.append(_item_sqls.to_dict()) + _dict['sqls'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in table_overrides (list) + _items = [] + if self.table_overrides: + for _item_table_overrides in self.table_overrides: + if _item_table_overrides: + _items.append(_item_table_overrides.to_dict()) + _dict['tableOverrides'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in tables (list) + _items = [] + if self.tables: + for _item_tables in self.tables: + if _item_tables: + _items.append(_item_tables.to_dict()) + _dict['tables'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PdmLdmRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sqls": [PdmSql.from_dict(_item) for _item in obj["sqls"]] if obj.get("sqls") is not None else None, + "tableOverrides": [TableOverride.from_dict(_item) for _item in obj["tableOverrides"]] if obj.get("tableOverrides") is not None else None, + "tables": [DeclarativeTable.from_dict(_item) for _item in obj["tables"]] if obj.get("tables") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/pdm_sql.py b/gooddata-api-client/gooddata_api_client/models/pdm_sql.py new file mode 100644 index 000000000..6b6a8b815 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/pdm_sql.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.sql_column import SqlColumn +from typing import Optional, Set +from typing_extensions import Self + +class PdmSql(BaseModel): + """ + SQL dataset definition. + """ # noqa: E501 + columns: Optional[List[SqlColumn]] = Field(default=None, description="Columns defining SQL dataset.") + statement: StrictStr = Field(description="SQL statement.") + title: StrictStr = Field(description="SQL dataset title.") + __properties: ClassVar[List[str]] = ["columns", "statement", "title"] + + 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 PdmSql 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 each item in columns (list) + _items = [] + if self.columns: + for _item_columns in self.columns: + if _item_columns: + _items.append(_item_columns.to_dict()) + _dict['columns'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PdmSql from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "columns": [SqlColumn.from_dict(_item) for _item in obj["columns"]] if obj.get("columns") is not None else None, + "statement": obj.get("statement"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/pending_operation.py b/gooddata-api-client/gooddata_api_client/models/pending_operation.py new file mode 100644 index 000000000..31d24205f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/pending_operation.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 ConfigDict +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.operation import Operation +from typing import Optional, Set +from typing_extensions import Self + +class PendingOperation(Operation): + """ + Operation that is still pending + """ # noqa: E501 + __properties: ClassVar[List[str]] = ["id", "kind", "status"] + + 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 PendingOperation 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 PendingOperation 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"), + "kind": obj.get("kind"), + "status": obj.get("status") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/permissions_assignment.py b/gooddata-api-client/gooddata_api_client/models/permissions_assignment.py new file mode 100644 index 000000000..053ee8c8e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/permissions_assignment.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.assignee_identifier import AssigneeIdentifier +from gooddata_api_client.models.user_management_data_source_permission_assignment import UserManagementDataSourcePermissionAssignment +from gooddata_api_client.models.user_management_workspace_permission_assignment import UserManagementWorkspacePermissionAssignment +from typing import Optional, Set +from typing_extensions import Self + +class PermissionsAssignment(BaseModel): + """ + PermissionsAssignment + """ # noqa: E501 + assignees: List[AssigneeIdentifier] + data_sources: Optional[List[UserManagementDataSourcePermissionAssignment]] = Field(default=None, alias="dataSources") + workspaces: Optional[List[UserManagementWorkspacePermissionAssignment]] = None + __properties: ClassVar[List[str]] = ["assignees", "dataSources", "workspaces"] + + 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 PermissionsAssignment 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 each item in assignees (list) + _items = [] + if self.assignees: + for _item_assignees in self.assignees: + if _item_assignees: + _items.append(_item_assignees.to_dict()) + _dict['assignees'] = _items + # 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 each item in workspaces (list) + _items = [] + if self.workspaces: + for _item_workspaces in self.workspaces: + if _item_workspaces: + _items.append(_item_workspaces.to_dict()) + _dict['workspaces'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PermissionsAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assignees": [AssigneeIdentifier.from_dict(_item) for _item in obj["assignees"]] if obj.get("assignees") is not None else None, + "dataSources": [UserManagementDataSourcePermissionAssignment.from_dict(_item) for _item in obj["dataSources"]] if obj.get("dataSources") is not None else None, + "workspaces": [UserManagementWorkspacePermissionAssignment.from_dict(_item) for _item in obj["workspaces"]] if obj.get("workspaces") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/permissions_for_assignee.py b/gooddata-api-client/gooddata_api_client/models/permissions_for_assignee.py new file mode 100644 index 000000000..2aa6a36f2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/permissions_for_assignee.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.assignee_identifier import AssigneeIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class PermissionsForAssignee(BaseModel): + """ + Desired levels of permissions for an assignee identified by an identifier. + """ # noqa: E501 + permissions: List[StrictStr] + assignee_identifier: AssigneeIdentifier = Field(alias="assigneeIdentifier") + __properties: ClassVar[List[str]] = ["permissions", "assigneeIdentifier"] + + @field_validator('permissions') + def permissions_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['EDIT', 'SHARE', 'VIEW']): + raise ValueError("each list item must be one of ('EDIT', 'SHARE', 'VIEW')") + 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 PermissionsForAssignee 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 assignee_identifier + if self.assignee_identifier: + _dict['assigneeIdentifier'] = self.assignee_identifier.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PermissionsForAssignee from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "permissions": obj.get("permissions"), + "assigneeIdentifier": AssigneeIdentifier.from_dict(obj["assigneeIdentifier"]) if obj.get("assigneeIdentifier") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/permissions_for_assignee_rule.py b/gooddata-api-client/gooddata_api_client/models/permissions_for_assignee_rule.py new file mode 100644 index 000000000..5745963c5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/permissions_for_assignee_rule.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.assignee_rule import AssigneeRule +from typing import Optional, Set +from typing_extensions import Self + +class PermissionsForAssigneeRule(BaseModel): + """ + Desired levels of permissions for a collection of assignees identified by a rule. + """ # noqa: E501 + permissions: List[StrictStr] + assignee_rule: AssigneeRule = Field(alias="assigneeRule") + __properties: ClassVar[List[str]] = ["permissions", "assigneeRule"] + + @field_validator('permissions') + def permissions_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['EDIT', 'SHARE', 'VIEW']): + raise ValueError("each list item must be one of ('EDIT', 'SHARE', 'VIEW')") + 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 PermissionsForAssigneeRule 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 assignee_rule + if self.assignee_rule: + _dict['assigneeRule'] = self.assignee_rule.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PermissionsForAssigneeRule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "permissions": obj.get("permissions"), + "assigneeRule": AssigneeRule.from_dict(obj["assigneeRule"]) if obj.get("assigneeRule") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/platform_usage.py b/gooddata-api-client/gooddata_api_client/models/platform_usage.py new file mode 100644 index 000000000..193345cf1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/platform_usage.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PlatformUsage(BaseModel): + """ + PlatformUsage + """ # noqa: E501 + count: Optional[StrictInt] = None + name: StrictStr + __properties: ClassVar[List[str]] = ["count", "name"] + + @field_validator('name') + def name_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UserCount', 'WorkspaceCount']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('UserCount', 'WorkspaceCount')") + 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 PlatformUsage 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 PlatformUsage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "count": obj.get("count"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/platform_usage_request.py b/gooddata-api-client/gooddata_api_client/models/platform_usage_request.py new file mode 100644 index 000000000..cee8eec2b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/platform_usage_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class PlatformUsageRequest(BaseModel): + """ + PlatformUsageRequest + """ # noqa: E501 + usage_item_names: List[StrictStr] = Field(alias="usageItemNames") + __properties: ClassVar[List[str]] = ["usageItemNames"] + + @field_validator('usage_item_names') + def usage_item_names_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['UserCount', 'WorkspaceCount']): + raise ValueError("each list item must be one of ('UserCount', 'WorkspaceCount')") + 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 PlatformUsageRequest 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 PlatformUsageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "usageItemNames": obj.get("usageItemNames") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/pop_dataset.py b/gooddata-api-client/gooddata_api_client/models/pop_dataset.py new file mode 100644 index 000000000..bd17ef667 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/pop_dataset.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.afm_object_identifier_dataset import AfmObjectIdentifierDataset +from typing import Optional, Set +from typing_extensions import Self + +class PopDataset(BaseModel): + """ + Combination of the date data set to use and how many periods ago to calculate the previous period for. + """ # noqa: E501 + dataset: AfmObjectIdentifierDataset + periods_ago: StrictInt = Field(description="Number of periods ago to calculate the previous period for.", alias="periodsAgo") + __properties: ClassVar[List[str]] = ["dataset", "periodsAgo"] + + 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 PopDataset 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 dataset + if self.dataset: + _dict['dataset'] = self.dataset.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PopDataset from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataset": AfmObjectIdentifierDataset.from_dict(obj["dataset"]) if obj.get("dataset") is not None else None, + "periodsAgo": obj.get("periodsAgo") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/pop_dataset_measure_definition.py b/gooddata-api-client/gooddata_api_client/models/pop_dataset_measure_definition.py new file mode 100644 index 000000000..7a0ffffa1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/pop_dataset_measure_definition.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.pop_dataset_measure_definition_previous_period_measure import PopDatasetMeasureDefinitionPreviousPeriodMeasure +from typing import Optional, Set +from typing_extensions import Self + +class PopDatasetMeasureDefinition(BaseModel): + """ + Previous period type of metric. + """ # noqa: E501 + previous_period_measure: PopDatasetMeasureDefinitionPreviousPeriodMeasure = Field(alias="previousPeriodMeasure") + __properties: ClassVar[List[str]] = ["previousPeriodMeasure"] + + 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 PopDatasetMeasureDefinition 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 previous_period_measure + if self.previous_period_measure: + _dict['previousPeriodMeasure'] = self.previous_period_measure.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PopDatasetMeasureDefinition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "previousPeriodMeasure": PopDatasetMeasureDefinitionPreviousPeriodMeasure.from_dict(obj["previousPeriodMeasure"]) if obj.get("previousPeriodMeasure") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/pop_dataset_measure_definition_previous_period_measure.py b/gooddata-api-client/gooddata_api_client/models/pop_dataset_measure_definition_previous_period_measure.py new file mode 100644 index 000000000..67903b39f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/pop_dataset_measure_definition_previous_period_measure.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.afm_local_identifier import AfmLocalIdentifier +from gooddata_api_client.models.pop_dataset import PopDataset +from typing import Optional, Set +from typing_extensions import Self + +class PopDatasetMeasureDefinitionPreviousPeriodMeasure(BaseModel): + """ + PopDatasetMeasureDefinitionPreviousPeriodMeasure + """ # noqa: E501 + date_datasets: List[PopDataset] = Field(description="Specification of which date data sets to use for determining the period to calculate the previous period for.", alias="dateDatasets") + measure_identifier: AfmLocalIdentifier = Field(alias="measureIdentifier") + __properties: ClassVar[List[str]] = ["dateDatasets", "measureIdentifier"] + + 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 PopDatasetMeasureDefinitionPreviousPeriodMeasure 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 each item in date_datasets (list) + _items = [] + if self.date_datasets: + for _item_date_datasets in self.date_datasets: + if _item_date_datasets: + _items.append(_item_date_datasets.to_dict()) + _dict['dateDatasets'] = _items + # override the default output from pydantic by calling `to_dict()` of measure_identifier + if self.measure_identifier: + _dict['measureIdentifier'] = self.measure_identifier.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PopDatasetMeasureDefinitionPreviousPeriodMeasure from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dateDatasets": [PopDataset.from_dict(_item) for _item in obj["dateDatasets"]] if obj.get("dateDatasets") is not None else None, + "measureIdentifier": AfmLocalIdentifier.from_dict(obj["measureIdentifier"]) if obj.get("measureIdentifier") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/pop_date.py b/gooddata-api-client/gooddata_api_client/models/pop_date.py new file mode 100644 index 000000000..e1df4841e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/pop_date.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.afm_object_identifier_attribute import AfmObjectIdentifierAttribute +from typing import Optional, Set +from typing_extensions import Self + +class PopDate(BaseModel): + """ + Combination of the date attribute to use and how many periods ago to calculate the PoP for. + """ # noqa: E501 + attribute: AfmObjectIdentifierAttribute + periods_ago: StrictInt = Field(description="Number of periods ago to calculate the previous period for.", alias="periodsAgo") + __properties: ClassVar[List[str]] = ["attribute", "periodsAgo"] + + 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 PopDate 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 attribute + if self.attribute: + _dict['attribute'] = self.attribute.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PopDate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attribute": AfmObjectIdentifierAttribute.from_dict(obj["attribute"]) if obj.get("attribute") is not None else None, + "periodsAgo": obj.get("periodsAgo") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/pop_date_measure_definition.py b/gooddata-api-client/gooddata_api_client/models/pop_date_measure_definition.py new file mode 100644 index 000000000..32946d892 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/pop_date_measure_definition.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.pop_date_measure_definition_over_period_measure import PopDateMeasureDefinitionOverPeriodMeasure +from typing import Optional, Set +from typing_extensions import Self + +class PopDateMeasureDefinition(BaseModel): + """ + Period over period type of metric. + """ # noqa: E501 + over_period_measure: PopDateMeasureDefinitionOverPeriodMeasure = Field(alias="overPeriodMeasure") + __properties: ClassVar[List[str]] = ["overPeriodMeasure"] + + 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 PopDateMeasureDefinition 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 over_period_measure + if self.over_period_measure: + _dict['overPeriodMeasure'] = self.over_period_measure.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PopDateMeasureDefinition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "overPeriodMeasure": PopDateMeasureDefinitionOverPeriodMeasure.from_dict(obj["overPeriodMeasure"]) if obj.get("overPeriodMeasure") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/pop_date_measure_definition_over_period_measure.py b/gooddata-api-client/gooddata_api_client/models/pop_date_measure_definition_over_period_measure.py new file mode 100644 index 000000000..5033cabdb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/pop_date_measure_definition_over_period_measure.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.afm_local_identifier import AfmLocalIdentifier +from gooddata_api_client.models.pop_date import PopDate +from typing import Optional, Set +from typing_extensions import Self + +class PopDateMeasureDefinitionOverPeriodMeasure(BaseModel): + """ + PopDateMeasureDefinitionOverPeriodMeasure + """ # noqa: E501 + date_attributes: List[PopDate] = Field(description="Attributes to use for determining the period to calculate the PoP for.", alias="dateAttributes") + measure_identifier: AfmLocalIdentifier = Field(alias="measureIdentifier") + __properties: ClassVar[List[str]] = ["dateAttributes", "measureIdentifier"] + + 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 PopDateMeasureDefinitionOverPeriodMeasure 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 each item in date_attributes (list) + _items = [] + if self.date_attributes: + for _item_date_attributes in self.date_attributes: + if _item_date_attributes: + _items.append(_item_date_attributes.to_dict()) + _dict['dateAttributes'] = _items + # override the default output from pydantic by calling `to_dict()` of measure_identifier + if self.measure_identifier: + _dict['measureIdentifier'] = self.measure_identifier.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PopDateMeasureDefinitionOverPeriodMeasure from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dateAttributes": [PopDate.from_dict(_item) for _item in obj["dateAttributes"]] if obj.get("dateAttributes") is not None else None, + "measureIdentifier": AfmLocalIdentifier.from_dict(obj["measureIdentifier"]) if obj.get("measureIdentifier") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/pop_measure_definition.py b/gooddata-api-client/gooddata_api_client/models/pop_measure_definition.py new file mode 100644 index 000000000..3cc29e0af --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/pop_measure_definition.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.pop_dataset_measure_definition import PopDatasetMeasureDefinition +from gooddata_api_client.models.pop_date_measure_definition import PopDateMeasureDefinition +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +POPMEASUREDEFINITION_ONE_OF_SCHEMAS = ["PopDatasetMeasureDefinition", "PopDateMeasureDefinition"] + +class PopMeasureDefinition(BaseModel): + """ + PopMeasureDefinition + """ + # data type: PopDatasetMeasureDefinition + oneof_schema_1_validator: Optional[PopDatasetMeasureDefinition] = None + # data type: PopDateMeasureDefinition + oneof_schema_2_validator: Optional[PopDateMeasureDefinition] = None + actual_instance: Optional[Union[PopDatasetMeasureDefinition, PopDateMeasureDefinition]] = None + one_of_schemas: Set[str] = { "PopDatasetMeasureDefinition", "PopDateMeasureDefinition" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = PopMeasureDefinition.model_construct() + error_messages = [] + match = 0 + # validate data type: PopDatasetMeasureDefinition + if not isinstance(v, PopDatasetMeasureDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `PopDatasetMeasureDefinition`") + else: + match += 1 + # validate data type: PopDateMeasureDefinition + if not isinstance(v, PopDateMeasureDefinition): + error_messages.append(f"Error! Input type `{type(v)}` is not `PopDateMeasureDefinition`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in PopMeasureDefinition with oneOf schemas: PopDatasetMeasureDefinition, PopDateMeasureDefinition. 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 + + # deserialize data into PopDatasetMeasureDefinition + try: + if match == 0: + instance.actual_instance = PopDatasetMeasureDefinition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PopDateMeasureDefinition + try: + if match == 0: + instance.actual_instance = PopDateMeasureDefinition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into PopMeasureDefinition with oneOf schemas: PopDatasetMeasureDefinition, PopDateMeasureDefinition. 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], PopDatasetMeasureDefinition, PopDateMeasureDefinition]]: + """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/gooddata-api-client/gooddata_api_client/models/positive_attribute_filter.py b/gooddata-api-client/gooddata_api_client/models/positive_attribute_filter.py new file mode 100644 index 000000000..29adfa44b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/positive_attribute_filter.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.positive_attribute_filter_positive_attribute_filter import PositiveAttributeFilterPositiveAttributeFilter +from typing import Optional, Set +from typing_extensions import Self + +class PositiveAttributeFilter(BaseModel): + """ + Filter able to limit element values by label and related selected elements. + """ # noqa: E501 + positive_attribute_filter: PositiveAttributeFilterPositiveAttributeFilter = Field(alias="positiveAttributeFilter") + __properties: ClassVar[List[str]] = ["positiveAttributeFilter"] + + 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 PositiveAttributeFilter 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 positive_attribute_filter + if self.positive_attribute_filter: + _dict['positiveAttributeFilter'] = self.positive_attribute_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PositiveAttributeFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "positiveAttributeFilter": PositiveAttributeFilterPositiveAttributeFilter.from_dict(obj["positiveAttributeFilter"]) if obj.get("positiveAttributeFilter") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/positive_attribute_filter_positive_attribute_filter.py b/gooddata-api-client/gooddata_api_client/models/positive_attribute_filter_positive_attribute_filter.py new file mode 100644 index 000000000..9f3e1c2ae --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/positive_attribute_filter_positive_attribute_filter.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.afm_identifier import AfmIdentifier +from gooddata_api_client.models.attribute_filter_elements import AttributeFilterElements +from typing import Optional, Set +from typing_extensions import Self + +class PositiveAttributeFilterPositiveAttributeFilter(BaseModel): + """ + PositiveAttributeFilterPositiveAttributeFilter + """ # noqa: E501 + apply_on_result: Optional[StrictBool] = Field(default=None, alias="applyOnResult") + var_in: AttributeFilterElements = Field(alias="in") + label: AfmIdentifier + local_identifier: Optional[StrictStr] = Field(default=None, alias="localIdentifier") + __properties: ClassVar[List[str]] = ["applyOnResult", "in", "label", "localIdentifier"] + + 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 PositiveAttributeFilterPositiveAttributeFilter 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 var_in + if self.var_in: + _dict['in'] = self.var_in.to_dict() + # override the default output from pydantic by calling `to_dict()` of label + if self.label: + _dict['label'] = self.label.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PositiveAttributeFilterPositiveAttributeFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applyOnResult": obj.get("applyOnResult"), + "in": AttributeFilterElements.from_dict(obj["in"]) if obj.get("in") is not None else None, + "label": AfmIdentifier.from_dict(obj["label"]) if obj.get("label") is not None else None, + "localIdentifier": obj.get("localIdentifier") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/provision_database_instance_request.py b/gooddata-api-client/gooddata_api_client/models/provision_database_instance_request.py new file mode 100644 index 000000000..1907c6c98 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/provision_database_instance_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ProvisionDatabaseInstanceRequest(BaseModel): + """ + Request to provision a new AILake Database instance + """ # noqa: E501 + name: StrictStr = Field(description="Name of the database instance") + storage_ids: List[StrictStr] = Field(description="Set of ids of the storage instances this database instance should access.", alias="storageIds") + __properties: ClassVar[List[str]] = ["name", "storageIds"] + + 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 ProvisionDatabaseInstanceRequest 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 ProvisionDatabaseInstanceRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "storageIds": obj.get("storageIds") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/quality_issue.py b/gooddata-api-client/gooddata_api_client/models/quality_issue.py new file mode 100644 index 000000000..af575bbf0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/quality_issue.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.quality_issue_object import QualityIssueObject +from typing import Optional, Set +from typing_extensions import Self + +class QualityIssue(BaseModel): + """ + List of quality issues (available when status is COMPLETED) + """ # noqa: E501 + code: StrictStr = Field(description="Quality issue code") + detail: Dict[str, Dict[str, Any]] = Field(description="Detailed information about the quality issue") + id: StrictStr = Field(description="Unique identifier for the quality issue") + objects: List[QualityIssueObject] = Field(description="List of objects affected by this quality issue") + severity: StrictStr = Field(description="Severity level") + __properties: ClassVar[List[str]] = ["code", "detail", "id", "objects", "severity"] + + @field_validator('severity') + def severity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['WARNING', 'INFO']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('WARNING', 'INFO')") + 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 QualityIssue 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 each item in objects (list) + _items = [] + if self.objects: + for _item_objects in self.objects: + if _item_objects: + _items.append(_item_objects.to_dict()) + _dict['objects'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QualityIssue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "detail": obj.get("detail"), + "id": obj.get("id"), + "objects": [QualityIssueObject.from_dict(_item) for _item in obj["objects"]] if obj.get("objects") is not None else None, + "severity": obj.get("severity") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/quality_issue_object.py b/gooddata-api-client/gooddata_api_client/models/quality_issue_object.py new file mode 100644 index 000000000..166347d71 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/quality_issue_object.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class QualityIssueObject(BaseModel): + """ + List of objects affected by this quality issue + """ # noqa: E501 + id: StrictStr = Field(description="Object ID") + title: StrictStr = Field(description="Object title") + type: StrictStr = Field(description="Object type") + workspace_id: StrictStr = Field(description="Workspace ID where the object belongs", alias="workspaceId") + __properties: ClassVar[List[str]] = ["id", "title", "type", "workspaceId"] + + 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 QualityIssueObject 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 QualityIssueObject 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"), + "title": obj.get("title"), + "type": obj.get("type"), + "workspaceId": obj.get("workspaceId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/quality_issues_calculation_status_response.py b/gooddata-api-client/gooddata_api_client/models/quality_issues_calculation_status_response.py new file mode 100644 index 000000000..73bec5439 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/quality_issues_calculation_status_response.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.quality_issue import QualityIssue +from typing import Optional, Set +from typing_extensions import Self + +class QualityIssuesCalculationStatusResponse(BaseModel): + """ + QualityIssuesCalculationStatusResponse + """ # noqa: E501 + error: Optional[StrictStr] = Field(default=None, description="Error message (available when status is FAILED or NOT_FOUND)") + issues: Optional[List[QualityIssue]] = Field(default=None, description="List of quality issues (available when status is COMPLETED)") + status: StrictStr = Field(description="Current status of the calculation") + __properties: ClassVar[List[str]] = ["error", "issues", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['RUNNING', 'SYNCING', 'COMPLETED', 'FAILED', 'CANCELLED', 'NOT_FOUND', 'DISABLED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('RUNNING', 'SYNCING', 'COMPLETED', 'FAILED', 'CANCELLED', 'NOT_FOUND', 'DISABLED')") + 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 QualityIssuesCalculationStatusResponse 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 each item in issues (list) + _items = [] + if self.issues: + for _item_issues in self.issues: + if _item_issues: + _items.append(_item_issues.to_dict()) + _dict['issues'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QualityIssuesCalculationStatusResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "issues": [QualityIssue.from_dict(_item) for _item in obj["issues"]] if obj.get("issues") is not None else None, + "status": obj.get("status") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/range.py b/gooddata-api-client/gooddata_api_client/models/range.py new file mode 100644 index 000000000..4a73e23bc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/range.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.local_identifier import LocalIdentifier +from gooddata_api_client.models.value import Value +from typing import Optional, Set +from typing_extensions import Self + +class Range(BaseModel): + """ + Range + """ # noqa: E501 + var_from: Value = Field(alias="from") + measure: LocalIdentifier + operator: StrictStr + to: Value + __properties: ClassVar[List[str]] = ["from", "measure", "operator", "to"] + + @field_validator('operator') + def operator_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['BETWEEN', 'NOT_BETWEEN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('BETWEEN', 'NOT_BETWEEN')") + 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 Range 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 var_from + if self.var_from: + _dict['from'] = self.var_from.to_dict() + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of to + if self.to: + _dict['to'] = self.to.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Range from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "from": Value.from_dict(obj["from"]) if obj.get("from") is not None else None, + "measure": LocalIdentifier.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "operator": obj.get("operator"), + "to": Value.from_dict(obj["to"]) if obj.get("to") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/range_condition.py b/gooddata-api-client/gooddata_api_client/models/range_condition.py new file mode 100644 index 000000000..b20a33aa3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/range_condition.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.range_condition_range import RangeConditionRange +from typing import Optional, Set +from typing_extensions import Self + +class RangeCondition(BaseModel): + """ + Condition that checks if the metric value is within a given range. + """ # noqa: E501 + range: RangeConditionRange + __properties: ClassVar[List[str]] = ["range"] + + 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 RangeCondition 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 range + if self.range: + _dict['range'] = self.range.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RangeCondition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "range": RangeConditionRange.from_dict(obj["range"]) if obj.get("range") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/range_condition_range.py b/gooddata-api-client/gooddata_api_client/models/range_condition_range.py new file mode 100644 index 000000000..a965fffd2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/range_condition_range.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class RangeConditionRange(BaseModel): + """ + RangeConditionRange + """ # noqa: E501 + var_from: Union[StrictFloat, StrictInt] = Field(alias="from") + operator: StrictStr + to: Union[StrictFloat, StrictInt] + __properties: ClassVar[List[str]] = ["from", "operator", "to"] + + @field_validator('operator') + def operator_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['BETWEEN', 'NOT_BETWEEN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('BETWEEN', 'NOT_BETWEEN')") + 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 RangeConditionRange 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 RangeConditionRange from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "from": obj.get("from"), + "operator": obj.get("operator"), + "to": obj.get("to") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/range_measure_value_filter.py b/gooddata-api-client/gooddata_api_client/models/range_measure_value_filter.py new file mode 100644 index 000000000..f74af4d02 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/range_measure_value_filter.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.range_measure_value_filter_range_measure_value_filter import RangeMeasureValueFilterRangeMeasureValueFilter +from typing import Optional, Set +from typing_extensions import Self + +class RangeMeasureValueFilter(BaseModel): + """ + Filter the result by comparing specified metric to given range of values. + """ # noqa: E501 + range_measure_value_filter: RangeMeasureValueFilterRangeMeasureValueFilter = Field(alias="rangeMeasureValueFilter") + __properties: ClassVar[List[str]] = ["rangeMeasureValueFilter"] + + 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 RangeMeasureValueFilter 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 range_measure_value_filter + if self.range_measure_value_filter: + _dict['rangeMeasureValueFilter'] = self.range_measure_value_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RangeMeasureValueFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rangeMeasureValueFilter": RangeMeasureValueFilterRangeMeasureValueFilter.from_dict(obj["rangeMeasureValueFilter"]) if obj.get("rangeMeasureValueFilter") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/range_measure_value_filter_range_measure_value_filter.py b/gooddata-api-client/gooddata_api_client/models/range_measure_value_filter_range_measure_value_filter.py new file mode 100644 index 000000000..664ca6535 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/range_measure_value_filter_range_measure_value_filter.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from gooddata_api_client.models.afm_identifier import AfmIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class RangeMeasureValueFilterRangeMeasureValueFilter(BaseModel): + """ + RangeMeasureValueFilterRangeMeasureValueFilter + """ # noqa: E501 + apply_on_result: Optional[StrictBool] = Field(default=None, alias="applyOnResult") + dimensionality: Optional[List[AfmIdentifier]] = Field(default=None, description="References to the attributes to be used when filtering.") + var_from: Union[StrictFloat, StrictInt] = Field(alias="from") + local_identifier: Optional[StrictStr] = Field(default=None, alias="localIdentifier") + measure: AfmIdentifier + operator: StrictStr + to: Union[StrictFloat, StrictInt] + treat_null_values_as: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="A value that will be substituted for null values in the metric for the comparisons.", alias="treatNullValuesAs") + __properties: ClassVar[List[str]] = ["applyOnResult", "dimensionality", "from", "localIdentifier", "measure", "operator", "to", "treatNullValuesAs"] + + @field_validator('operator') + def operator_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['BETWEEN', 'NOT_BETWEEN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('BETWEEN', 'NOT_BETWEEN')") + 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 RangeMeasureValueFilterRangeMeasureValueFilter 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 each item in dimensionality (list) + _items = [] + if self.dimensionality: + for _item_dimensionality in self.dimensionality: + if _item_dimensionality: + _items.append(_item_dimensionality.to_dict()) + _dict['dimensionality'] = _items + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RangeMeasureValueFilterRangeMeasureValueFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applyOnResult": obj.get("applyOnResult"), + "dimensionality": [AfmIdentifier.from_dict(_item) for _item in obj["dimensionality"]] if obj.get("dimensionality") is not None else None, + "from": obj.get("from"), + "localIdentifier": obj.get("localIdentifier"), + "measure": AfmIdentifier.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "operator": obj.get("operator"), + "to": obj.get("to"), + "treatNullValuesAs": obj.get("treatNullValuesAs") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/range_wrapper.py b/gooddata-api-client/gooddata_api_client/models/range_wrapper.py new file mode 100644 index 000000000..1601964ed --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/range_wrapper.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.range import Range +from typing import Optional, Set +from typing_extensions import Self + +class RangeWrapper(BaseModel): + """ + RangeWrapper + """ # noqa: E501 + range: Range + __properties: ClassVar[List[str]] = ["range"] + + 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 RangeWrapper 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 range + if self.range: + _dict['range'] = self.range.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RangeWrapper from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "range": Range.from_dict(obj["range"]) if obj.get("range") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/ranking_filter.py b/gooddata-api-client/gooddata_api_client/models/ranking_filter.py new file mode 100644 index 000000000..903ff2a6b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/ranking_filter.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.ranking_filter_ranking_filter import RankingFilterRankingFilter +from typing import Optional, Set +from typing_extensions import Self + +class RankingFilter(BaseModel): + """ + Filter the result on top/bottom N values according to given metric(s). + """ # noqa: E501 + ranking_filter: RankingFilterRankingFilter = Field(alias="rankingFilter") + __properties: ClassVar[List[str]] = ["rankingFilter"] + + 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 RankingFilter 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 ranking_filter + if self.ranking_filter: + _dict['rankingFilter'] = self.ranking_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RankingFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rankingFilter": RankingFilterRankingFilter.from_dict(obj["rankingFilter"]) if obj.get("rankingFilter") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/ranking_filter_ranking_filter.py b/gooddata-api-client/gooddata_api_client/models/ranking_filter_ranking_filter.py new file mode 100644 index 000000000..bd69d0c93 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/ranking_filter_ranking_filter.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.afm_identifier import AfmIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class RankingFilterRankingFilter(BaseModel): + """ + RankingFilterRankingFilter + """ # noqa: E501 + apply_on_result: Optional[StrictBool] = Field(default=None, alias="applyOnResult") + dimensionality: Optional[List[AfmIdentifier]] = Field(default=None, description="References to the attributes to be used when filtering.") + local_identifier: Optional[StrictStr] = Field(default=None, alias="localIdentifier") + measures: List[AfmIdentifier] = Field(description="References to the metrics to be used when filtering.") + operator: StrictStr = Field(description="The type of ranking to use, TOP or BOTTOM.") + value: StrictInt = Field(description="Number of top/bottom values to filter.") + __properties: ClassVar[List[str]] = ["applyOnResult", "dimensionality", "localIdentifier", "measures", "operator", "value"] + + @field_validator('operator') + def operator_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['TOP', 'BOTTOM']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('TOP', 'BOTTOM')") + 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 RankingFilterRankingFilter 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 each item in dimensionality (list) + _items = [] + if self.dimensionality: + for _item_dimensionality in self.dimensionality: + if _item_dimensionality: + _items.append(_item_dimensionality.to_dict()) + _dict['dimensionality'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in measures (list) + _items = [] + if self.measures: + for _item_measures in self.measures: + if _item_measures: + _items.append(_item_measures.to_dict()) + _dict['measures'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RankingFilterRankingFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applyOnResult": obj.get("applyOnResult"), + "dimensionality": [AfmIdentifier.from_dict(_item) for _item in obj["dimensionality"]] if obj.get("dimensionality") is not None else None, + "localIdentifier": obj.get("localIdentifier"), + "measures": [AfmIdentifier.from_dict(_item) for _item in obj["measures"]] if obj.get("measures") is not None else None, + "operator": obj.get("operator"), + "value": obj.get("value") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/raw_custom_label.py b/gooddata-api-client/gooddata_api_client/models/raw_custom_label.py new file mode 100644 index 000000000..766eab43d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/raw_custom_label.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class RawCustomLabel(BaseModel): + """ + Custom label object override. + """ # noqa: E501 + title: StrictStr = Field(description="Override value.") + __properties: ClassVar[List[str]] = ["title"] + + 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 RawCustomLabel 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 RawCustomLabel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/raw_custom_metric.py b/gooddata-api-client/gooddata_api_client/models/raw_custom_metric.py new file mode 100644 index 000000000..8f9bc0656 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/raw_custom_metric.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class RawCustomMetric(BaseModel): + """ + Custom metric object override. + """ # noqa: E501 + title: StrictStr = Field(description="Metric title override.") + __properties: ClassVar[List[str]] = ["title"] + + 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 RawCustomMetric 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 RawCustomMetric from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/raw_custom_override.py b/gooddata-api-client/gooddata_api_client/models/raw_custom_override.py new file mode 100644 index 000000000..e92d2f25f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/raw_custom_override.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.raw_custom_label import RawCustomLabel +from gooddata_api_client.models.raw_custom_metric import RawCustomMetric +from typing import Optional, Set +from typing_extensions import Self + +class RawCustomOverride(BaseModel): + """ + Custom cell value overrides (IDs will be replaced with specified values). + """ # noqa: E501 + labels: Optional[Dict[str, RawCustomLabel]] = Field(default=None, description="Map of CustomLabels with keys used as placeholders in export result.") + metrics: Optional[Dict[str, RawCustomMetric]] = Field(default=None, description="Map of CustomMetrics with keys used as placeholders in export result.") + __properties: ClassVar[List[str]] = ["labels", "metrics"] + + 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 RawCustomOverride 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 each value in labels (dict) + _field_dict = {} + if self.labels: + for _key_labels in self.labels: + if self.labels[_key_labels]: + _field_dict[_key_labels] = self.labels[_key_labels].to_dict() + _dict['labels'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in metrics (dict) + _field_dict = {} + if self.metrics: + for _key_metrics in self.metrics: + if self.metrics[_key_metrics]: + _field_dict[_key_metrics] = self.metrics[_key_metrics].to_dict() + _dict['metrics'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RawCustomOverride from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labels": dict( + (_k, RawCustomLabel.from_dict(_v)) + for _k, _v in obj["labels"].items() + ) + if obj.get("labels") is not None + else None, + "metrics": dict( + (_k, RawCustomMetric.from_dict(_v)) + for _k, _v in obj["metrics"].items() + ) + if obj.get("metrics") is not None + else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/raw_export_automation_request.py b/gooddata-api-client/gooddata_api_client/models/raw_export_automation_request.py new file mode 100644 index 000000000..a3674eddb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/raw_export_automation_request.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.afm import AFM +from gooddata_api_client.models.execution_settings import ExecutionSettings +from gooddata_api_client.models.raw_custom_override import RawCustomOverride +from typing import Optional, Set +from typing_extensions import Self + +class RawExportAutomationRequest(BaseModel): + """ + Export request object describing the export properties and overrides for raw exports. + """ # noqa: E501 + custom_override: Optional[RawCustomOverride] = Field(default=None, alias="customOverride") + delimiter: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1)]] = Field(default=None, description="Set column delimiter. (CSV)") + execution: AFM + execution_settings: Optional[ExecutionSettings] = Field(default=None, alias="executionSettings") + file_name: StrictStr = Field(description="Filename of downloaded file without extension.", alias="fileName") + format: StrictStr = Field(description="Requested resulting file type.") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + __properties: ClassVar[List[str]] = ["customOverride", "delimiter", "execution", "executionSettings", "fileName", "format", "metadata"] + + @field_validator('delimiter') + def delimiter_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[^\r\n\"]$", value): + raise ValueError(r"must validate the regular expression /^[^\r\n\"]$/") + return value + + @field_validator('format') + def format_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ARROW_FILE', 'ARROW_STREAM', 'CSV']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ARROW_FILE', 'ARROW_STREAM', 'CSV')") + 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 RawExportAutomationRequest 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 custom_override + if self.custom_override: + _dict['customOverride'] = self.custom_override.to_dict() + # override the default output from pydantic by calling `to_dict()` of execution + if self.execution: + _dict['execution'] = self.execution.to_dict() + # override the default output from pydantic by calling `to_dict()` of execution_settings + if self.execution_settings: + _dict['executionSettings'] = self.execution_settings.to_dict() + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RawExportAutomationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customOverride": RawCustomOverride.from_dict(obj["customOverride"]) if obj.get("customOverride") is not None else None, + "delimiter": obj.get("delimiter"), + "execution": AFM.from_dict(obj["execution"]) if obj.get("execution") is not None else None, + "executionSettings": ExecutionSettings.from_dict(obj["executionSettings"]) if obj.get("executionSettings") is not None else None, + "fileName": obj.get("fileName"), + "format": obj.get("format"), + "metadata": obj.get("metadata") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/raw_export_request.py b/gooddata-api-client/gooddata_api_client/models/raw_export_request.py new file mode 100644 index 000000000..0678931fe --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/raw_export_request.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.afm import AFM +from gooddata_api_client.models.execution_settings import ExecutionSettings +from gooddata_api_client.models.raw_custom_override import RawCustomOverride +from typing import Optional, Set +from typing_extensions import Self + +class RawExportRequest(BaseModel): + """ + Export request object describing the export properties and overrides for raw exports. + """ # noqa: E501 + custom_override: Optional[RawCustomOverride] = Field(default=None, alias="customOverride") + delimiter: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1)]] = Field(default=None, description="Set column delimiter. (CSV)") + execution: AFM + execution_settings: Optional[ExecutionSettings] = Field(default=None, alias="executionSettings") + file_name: StrictStr = Field(description="Filename of downloaded file without extension.", alias="fileName") + format: StrictStr = Field(description="Requested resulting file type.") + __properties: ClassVar[List[str]] = ["customOverride", "delimiter", "execution", "executionSettings", "fileName", "format"] + + @field_validator('delimiter') + def delimiter_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[^\r\n\"]$", value): + raise ValueError(r"must validate the regular expression /^[^\r\n\"]$/") + return value + + @field_validator('format') + def format_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ARROW_FILE', 'ARROW_STREAM', 'CSV']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ARROW_FILE', 'ARROW_STREAM', 'CSV')") + 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 RawExportRequest 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 custom_override + if self.custom_override: + _dict['customOverride'] = self.custom_override.to_dict() + # override the default output from pydantic by calling `to_dict()` of execution + if self.execution: + _dict['execution'] = self.execution.to_dict() + # override the default output from pydantic by calling `to_dict()` of execution_settings + if self.execution_settings: + _dict['executionSettings'] = self.execution_settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RawExportRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customOverride": RawCustomOverride.from_dict(obj["customOverride"]) if obj.get("customOverride") is not None else None, + "delimiter": obj.get("delimiter"), + "execution": AFM.from_dict(obj["execution"]) if obj.get("execution") is not None else None, + "executionSettings": ExecutionSettings.from_dict(obj["executionSettings"]) if obj.get("executionSettings") is not None else None, + "fileName": obj.get("fileName"), + "format": obj.get("format") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/reasoning.py b/gooddata-api-client/gooddata_api_client/models/reasoning.py new file mode 100644 index 000000000..cb9080eb8 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/reasoning.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.reasoning_step import ReasoningStep +from typing import Optional, Set +from typing_extensions import Self + +class Reasoning(BaseModel): + """ + Reasoning wrapper containing steps taken during request handling. + """ # noqa: E501 + answer: Optional[StrictStr] = Field(default=None, description="Final answer/reasoning from the use case result.") + steps: List[ReasoningStep] = Field(description="Steps taken during processing, showing the AI's reasoning process.") + __properties: ClassVar[List[str]] = ["answer", "steps"] + + 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 Reasoning 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 each item in steps (list) + _items = [] + if self.steps: + for _item_steps in self.steps: + if _item_steps: + _items.append(_item_steps.to_dict()) + _dict['steps'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Reasoning from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "answer": obj.get("answer"), + "steps": [ReasoningStep.from_dict(_item) for _item in obj["steps"]] if obj.get("steps") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/reasoning_step.py b/gooddata-api-client/gooddata_api_client/models/reasoning_step.py new file mode 100644 index 000000000..2e7a9fbd0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/reasoning_step.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.thought import Thought +from typing import Optional, Set +from typing_extensions import Self + +class ReasoningStep(BaseModel): + """ + Steps taken during processing, showing the AI's reasoning process. + """ # noqa: E501 + thoughts: List[Thought] = Field(description="Detailed thoughts/messages within this step.") + title: StrictStr = Field(description="Title describing this reasoning step.") + __properties: ClassVar[List[str]] = ["thoughts", "title"] + + 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 ReasoningStep 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 each item in thoughts (list) + _items = [] + if self.thoughts: + for _item_thoughts in self.thoughts: + if _item_thoughts: + _items.append(_item_thoughts.to_dict()) + _dict['thoughts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReasoningStep from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "thoughts": [Thought.from_dict(_item) for _item in obj["thoughts"]] if obj.get("thoughts") is not None else None, + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/reference_identifier.py b/gooddata-api-client/gooddata_api_client/models/reference_identifier.py new file mode 100644 index 000000000..0e9d68581 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/reference_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ReferenceIdentifier(BaseModel): + """ + A reference identifier. + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="Reference ID.") + type: StrictStr = Field(description="A type of the reference.") + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dataset']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('dataset')") + 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 ReferenceIdentifier 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 ReferenceIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/reference_source_column.py b/gooddata-api-client/gooddata_api_client/models/reference_source_column.py new file mode 100644 index 000000000..87c46c11f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/reference_source_column.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.dataset_grain import DatasetGrain +from typing import Optional, Set +from typing_extensions import Self + +class ReferenceSourceColumn(BaseModel): + """ + ReferenceSourceColumn + """ # noqa: E501 + column: StrictStr + data_type: Optional[StrictStr] = Field(default=None, alias="dataType") + is_nullable: Optional[StrictBool] = Field(default=None, alias="isNullable") + null_value: Optional[StrictStr] = Field(default=None, alias="nullValue") + target: DatasetGrain + __properties: ClassVar[List[str]] = ["column", "dataType", "isNullable", "nullValue", "target"] + + @field_validator('data_type') + def data_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 ReferenceSourceColumn 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 target + if self.target: + _dict['target'] = self.target.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReferenceSourceColumn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "column": obj.get("column"), + "dataType": obj.get("dataType"), + "isNullable": obj.get("isNullable"), + "nullValue": obj.get("nullValue"), + "target": DatasetGrain.from_dict(obj["target"]) if obj.get("target") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/relative.py b/gooddata-api-client/gooddata_api_client/models/relative.py new file mode 100644 index 000000000..43629a7f6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/relative.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.arithmetic_measure import ArithmeticMeasure +from gooddata_api_client.models.value import Value +from typing import Optional, Set +from typing_extensions import Self + +class Relative(BaseModel): + """ + Relative + """ # noqa: E501 + measure: ArithmeticMeasure + operator: StrictStr = Field(description="Relative condition operator. INCREASES_BY - the metric increases by the specified value. DECREASES_BY - the metric decreases by the specified value. CHANGES_BY - the metric increases or decreases by the specified value. ") + threshold: Value + __properties: ClassVar[List[str]] = ["measure", "operator", "threshold"] + + @field_validator('operator') + def operator_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['INCREASES_BY', 'DECREASES_BY', 'CHANGES_BY']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INCREASES_BY', 'DECREASES_BY', 'CHANGES_BY')") + 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 Relative 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 measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of threshold + if self.threshold: + _dict['threshold'] = self.threshold.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Relative from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "measure": ArithmeticMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "operator": obj.get("operator"), + "threshold": Value.from_dict(obj["threshold"]) if obj.get("threshold") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/relative_bounded_date_filter.py b/gooddata-api-client/gooddata_api_client/models/relative_bounded_date_filter.py new file mode 100644 index 000000000..14dac296c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/relative_bounded_date_filter.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class RelativeBoundedDateFilter(BaseModel): + """ + RelativeBoundedDateFilter + """ # noqa: E501 + var_from: Optional[StrictInt] = Field(default=None, alias="from") + granularity: StrictStr + to: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["from", "granularity", "to"] + + @field_validator('granularity') + def granularity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ALL_TIME_GRANULARITY', 'GDC.time.year', 'GDC.time.week_us', 'GDC.time.week_in_year', 'GDC.time.week_in_quarter', 'GDC.time.week', 'GDC.time.euweek_in_year', 'GDC.time.euweek_in_quarter', 'GDC.time.quarter', 'GDC.time.quarter_in_year', 'GDC.time.month', 'GDC.time.month_in_quarter', 'GDC.time.month_in_year', 'GDC.time.day_in_year', 'GDC.time.day_in_quarter', 'GDC.time.day_in_month', 'GDC.time.day_in_week', 'GDC.time.day_in_euweek', 'GDC.time.date', 'GDC.time.hour', 'GDC.time.hour_in_day', 'GDC.time.minute', 'GDC.time.minute_in_hour', 'GDC.time.fiscal_month', 'GDC.time.fiscal_quarter', 'GDC.time.fiscal_year']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ALL_TIME_GRANULARITY', 'GDC.time.year', 'GDC.time.week_us', 'GDC.time.week_in_year', 'GDC.time.week_in_quarter', 'GDC.time.week', 'GDC.time.euweek_in_year', 'GDC.time.euweek_in_quarter', 'GDC.time.quarter', 'GDC.time.quarter_in_year', 'GDC.time.month', 'GDC.time.month_in_quarter', 'GDC.time.month_in_year', 'GDC.time.day_in_year', 'GDC.time.day_in_quarter', 'GDC.time.day_in_month', 'GDC.time.day_in_week', 'GDC.time.day_in_euweek', 'GDC.time.date', 'GDC.time.hour', 'GDC.time.hour_in_day', 'GDC.time.minute', 'GDC.time.minute_in_hour', 'GDC.time.fiscal_month', 'GDC.time.fiscal_quarter', 'GDC.time.fiscal_year')") + 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 RelativeBoundedDateFilter 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 RelativeBoundedDateFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "from": obj.get("from"), + "granularity": obj.get("granularity"), + "to": obj.get("to") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/relative_date_filter.py b/gooddata-api-client/gooddata_api_client/models/relative_date_filter.py new file mode 100644 index 000000000..3392fd601 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/relative_date_filter.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.relative_date_filter_relative_date_filter import RelativeDateFilterRelativeDateFilter +from typing import Optional, Set +from typing_extensions import Self + +class RelativeDateFilter(BaseModel): + """ + A date filter specifying a time interval that is relative to the current date. For example, last week, next month, and so on. Field dataset is representing qualifier of date dimension. The 'from' and 'to' properties mark the boundaries of the interval. If 'from' is omitted, all values earlier than 'to' are included. If 'to' is omitted, all values later than 'from' are included. It is not allowed to omit both. + """ # noqa: E501 + relative_date_filter: RelativeDateFilterRelativeDateFilter = Field(alias="relativeDateFilter") + __properties: ClassVar[List[str]] = ["relativeDateFilter"] + + 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 RelativeDateFilter 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 relative_date_filter + if self.relative_date_filter: + _dict['relativeDateFilter'] = self.relative_date_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RelativeDateFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "relativeDateFilter": RelativeDateFilterRelativeDateFilter.from_dict(obj["relativeDateFilter"]) if obj.get("relativeDateFilter") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/relative_date_filter_relative_date_filter.py b/gooddata-api-client/gooddata_api_client/models/relative_date_filter_relative_date_filter.py new file mode 100644 index 000000000..d3ae7c78d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/relative_date_filter_relative_date_filter.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.afm_object_identifier_dataset import AfmObjectIdentifierDataset +from gooddata_api_client.models.bounded_filter import BoundedFilter +from typing import Optional, Set +from typing_extensions import Self + +class RelativeDateFilterRelativeDateFilter(BaseModel): + """ + RelativeDateFilterRelativeDateFilter + """ # noqa: E501 + apply_on_result: Optional[StrictBool] = Field(default=None, alias="applyOnResult") + bounded_filter: Optional[BoundedFilter] = Field(default=None, alias="boundedFilter") + dataset: AfmObjectIdentifierDataset + empty_value_handling: Optional[StrictStr] = Field(default='EXCLUDE', description="Specifies how rows with empty (null/missing) date values should be handled. INCLUDE includes empty dates in addition to the date range restriction, EXCLUDE removes rows with empty dates (default), ONLY keeps only rows with empty dates.", alias="emptyValueHandling") + var_from: StrictInt = Field(description="Start of the filtering interval. Specified by number of periods (with respect to given granularity). Typically negative (historical time interval like -2 for '2 days/weeks, ... ago').", alias="from") + granularity: StrictStr = Field(description="Date granularity specifying particular date attribute in given dimension.") + local_identifier: Optional[StrictStr] = Field(default=None, alias="localIdentifier") + to: StrictInt = Field(description="End of the filtering interval. Specified by number of periods (with respect to given granularity). Value 'O' is representing current time-interval (current day, week, ...).") + __properties: ClassVar[List[str]] = ["applyOnResult", "boundedFilter", "dataset", "emptyValueHandling", "from", "granularity", "localIdentifier", "to"] + + @field_validator('empty_value_handling') + def empty_value_handling_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INCLUDE', 'EXCLUDE', 'ONLY']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INCLUDE', 'EXCLUDE', 'ONLY')") + return value + + @field_validator('granularity') + def granularity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'MINUTE_OF_HOUR', 'HOUR_OF_DAY', 'DAY_OF_WEEK', 'DAY_OF_MONTH', 'DAY_OF_QUARTER', 'DAY_OF_YEAR', 'WEEK_OF_YEAR', 'MONTH_OF_YEAR', 'QUARTER_OF_YEAR', 'FISCAL_MONTH', 'FISCAL_QUARTER', 'FISCAL_YEAR')") + 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 RelativeDateFilterRelativeDateFilter 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 bounded_filter + if self.bounded_filter: + _dict['boundedFilter'] = self.bounded_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of dataset + if self.dataset: + _dict['dataset'] = self.dataset.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RelativeDateFilterRelativeDateFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applyOnResult": obj.get("applyOnResult"), + "boundedFilter": BoundedFilter.from_dict(obj["boundedFilter"]) if obj.get("boundedFilter") is not None else None, + "dataset": AfmObjectIdentifierDataset.from_dict(obj["dataset"]) if obj.get("dataset") is not None else None, + "emptyValueHandling": obj.get("emptyValueHandling") if obj.get("emptyValueHandling") is not None else 'EXCLUDE', + "from": obj.get("from"), + "granularity": obj.get("granularity"), + "localIdentifier": obj.get("localIdentifier"), + "to": obj.get("to") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/relative_wrapper.py b/gooddata-api-client/gooddata_api_client/models/relative_wrapper.py new file mode 100644 index 000000000..46f3ca1c3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/relative_wrapper.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.relative import Relative +from typing import Optional, Set +from typing_extensions import Self + +class RelativeWrapper(BaseModel): + """ + RelativeWrapper + """ # noqa: E501 + relative: Relative + __properties: ClassVar[List[str]] = ["relative"] + + 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 RelativeWrapper 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 relative + if self.relative: + _dict['relative'] = self.relative.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RelativeWrapper from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "relative": Relative.from_dict(obj["relative"]) if obj.get("relative") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/resolve_settings_request.py b/gooddata-api-client/gooddata_api_client/models/resolve_settings_request.py new file mode 100644 index 000000000..3201a157e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/resolve_settings_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ResolveSettingsRequest(BaseModel): + """ + A request containing setting IDs to resolve. + """ # noqa: E501 + settings: List[StrictStr] = Field(description="An array of setting IDs to resolve.") + __properties: ClassVar[List[str]] = ["settings"] + + 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 ResolveSettingsRequest 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 ResolveSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "settings": obj.get("settings") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/resolved_llm_endpoint.py b/gooddata-api-client/gooddata_api_client/models/resolved_llm_endpoint.py new file mode 100644 index 000000000..4009ae2b7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/resolved_llm_endpoint.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ResolvedLlmEndpoint(BaseModel): + """ + ResolvedLlmEndpoint + """ # noqa: E501 + id: StrictStr = Field(description="Endpoint Id") + title: StrictStr = Field(description="Endpoint Title") + __properties: ClassVar[List[str]] = ["id", "title"] + + 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 ResolvedLlmEndpoint 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 ResolvedLlmEndpoint 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"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/resolved_llm_endpoints.py b/gooddata-api-client/gooddata_api_client/models/resolved_llm_endpoints.py new file mode 100644 index 000000000..69495ac54 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/resolved_llm_endpoints.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.resolved_llm_endpoint import ResolvedLlmEndpoint +from typing import Optional, Set +from typing_extensions import Self + +class ResolvedLlmEndpoints(BaseModel): + """ + ResolvedLlmEndpoints + """ # noqa: E501 + data: List[ResolvedLlmEndpoint] + __properties: ClassVar[List[str]] = ["data"] + + 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 ResolvedLlmEndpoints 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 each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResolvedLlmEndpoints from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [ResolvedLlmEndpoint.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/resolved_setting.py b/gooddata-api-client/gooddata_api_client/models/resolved_setting.py new file mode 100644 index 000000000..128d4e9c5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/resolved_setting.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class ResolvedSetting(BaseModel): + """ + Setting and its value. + """ # noqa: E501 + content: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + id: StrictStr = Field(description="Setting ID. Formerly used to identify a type of a particular setting, going to be removed in a favor of setting's type.") + type: Optional[StrictStr] = Field(default=None, description="Type of the setting.") + __properties: ClassVar[List[str]] = ["content", "id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['TIMEZONE', 'ACTIVE_THEME', 'ACTIVE_COLOR_PALETTE', 'ACTIVE_LLM_ENDPOINT', 'ACTIVE_LLM_PROVIDER', 'ACTIVE_CALENDARS', 'WHITE_LABELING', 'LOCALE', 'METADATA_LOCALE', 'FORMAT_LOCALE', 'MAPBOX_TOKEN', 'AG_GRID_TOKEN', 'WEEK_START', 'FISCAL_YEAR', 'SHOW_HIDDEN_CATALOG_ITEMS', 'OPERATOR_OVERRIDES', 'TIMEZONE_VALIDATION_ENABLED', 'OPENAI_CONFIG', 'ENABLE_FILE_ANALYTICS', 'ALERT', 'SEPARATORS', 'DATE_FILTER_CONFIG', 'JIT_PROVISIONING', 'JWT_JIT_PROVISIONING', 'DASHBOARD_FILTERS_APPLY_MODE', 'ENABLE_SLIDES_EXPORT', 'ENABLE_SNAPSHOT_EXPORT', 'AI_RATE_LIMIT', 'ATTACHMENT_SIZE_LIMIT', 'ATTACHMENT_LINK_TTL', 'AD_CATALOG_GROUPS_DEFAULT_EXPAND_STATE', 'ENABLE_DRILL_TO_URL_BY_DEFAULT', 'ALLOW_UNSAFE_FLEX_CONNECT_ENDPOINTS', 'ENABLE_AUTOMATION_EVALUATION_MODE', 'ENABLE_ACCESSIBILITY_MODE', 'REGISTERED_PLUGGABLE_APPLICATIONS', 'DATA_LOCALE', 'LDM_DEFAULT_LOCALE', 'EXPORT_RESULT_POLLING_TIMEOUT_SECONDS', 'MAX_ZOOM_LEVEL', 'SORT_CASE_SENSITIVE', 'METRIC_FORMAT_OVERRIDE', 'ENABLE_AI_ON_DATA', 'API_ENTITIES_DEFAULT_CONTENT_MEDIA_TYPE', 'ENABLE_NULL_JOINS', 'EXPORT_CSV_CUSTOM_DELIMITER', 'ENABLE_QUERY_TAGS', 'RESTRICT_BASE_UI', 'CERTIFY_PARENT_OBJECTS']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('TIMEZONE', 'ACTIVE_THEME', 'ACTIVE_COLOR_PALETTE', 'ACTIVE_LLM_ENDPOINT', 'ACTIVE_LLM_PROVIDER', 'ACTIVE_CALENDARS', 'WHITE_LABELING', 'LOCALE', 'METADATA_LOCALE', 'FORMAT_LOCALE', 'MAPBOX_TOKEN', 'AG_GRID_TOKEN', 'WEEK_START', 'FISCAL_YEAR', 'SHOW_HIDDEN_CATALOG_ITEMS', 'OPERATOR_OVERRIDES', 'TIMEZONE_VALIDATION_ENABLED', 'OPENAI_CONFIG', 'ENABLE_FILE_ANALYTICS', 'ALERT', 'SEPARATORS', 'DATE_FILTER_CONFIG', 'JIT_PROVISIONING', 'JWT_JIT_PROVISIONING', 'DASHBOARD_FILTERS_APPLY_MODE', 'ENABLE_SLIDES_EXPORT', 'ENABLE_SNAPSHOT_EXPORT', 'AI_RATE_LIMIT', 'ATTACHMENT_SIZE_LIMIT', 'ATTACHMENT_LINK_TTL', 'AD_CATALOG_GROUPS_DEFAULT_EXPAND_STATE', 'ENABLE_DRILL_TO_URL_BY_DEFAULT', 'ALLOW_UNSAFE_FLEX_CONNECT_ENDPOINTS', 'ENABLE_AUTOMATION_EVALUATION_MODE', 'ENABLE_ACCESSIBILITY_MODE', 'REGISTERED_PLUGGABLE_APPLICATIONS', 'DATA_LOCALE', 'LDM_DEFAULT_LOCALE', 'EXPORT_RESULT_POLLING_TIMEOUT_SECONDS', 'MAX_ZOOM_LEVEL', 'SORT_CASE_SENSITIVE', 'METRIC_FORMAT_OVERRIDE', 'ENABLE_AI_ON_DATA', 'API_ENTITIES_DEFAULT_CONTENT_MEDIA_TYPE', 'ENABLE_NULL_JOINS', 'EXPORT_CSV_CUSTOM_DELIMITER', 'ENABLE_QUERY_TAGS', 'RESTRICT_BASE_UI', 'CERTIFY_PARENT_OBJECTS')") + 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 ResolvedSetting 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 content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResolvedSetting from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/rest_api_identifier.py b/gooddata-api-client/gooddata_api_client/models/rest_api_identifier.py new file mode 100644 index 000000000..682fcae71 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/rest_api_identifier.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RestApiIdentifier(BaseModel): + """ + Object identifier. + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + 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 RestApiIdentifier 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 RestApiIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/result_cache_metadata.py b/gooddata-api-client/gooddata_api_client/models/result_cache_metadata.py new file mode 100644 index 000000000..b438f088d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/result_cache_metadata.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.afm import AFM +from gooddata_api_client.models.execution_response import ExecutionResponse +from gooddata_api_client.models.result_spec import ResultSpec +from typing import Optional, Set +from typing_extensions import Self + +class ResultCacheMetadata(BaseModel): + """ + All execution result's metadata used for calculation including ExecutionResponse + """ # noqa: E501 + afm: AFM + execution_response: ExecutionResponse = Field(alias="executionResponse") + result_size: StrictInt = Field(alias="resultSize") + result_spec: ResultSpec = Field(alias="resultSpec") + __properties: ClassVar[List[str]] = ["afm", "executionResponse", "resultSize", "resultSpec"] + + 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 ResultCacheMetadata 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 afm + if self.afm: + _dict['afm'] = self.afm.to_dict() + # override the default output from pydantic by calling `to_dict()` of execution_response + if self.execution_response: + _dict['executionResponse'] = self.execution_response.to_dict() + # override the default output from pydantic by calling `to_dict()` of result_spec + if self.result_spec: + _dict['resultSpec'] = self.result_spec.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResultCacheMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "afm": AFM.from_dict(obj["afm"]) if obj.get("afm") is not None else None, + "executionResponse": ExecutionResponse.from_dict(obj["executionResponse"]) if obj.get("executionResponse") is not None else None, + "resultSize": obj.get("resultSize"), + "resultSpec": ResultSpec.from_dict(obj["resultSpec"]) if obj.get("resultSpec") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/result_dimension.py b/gooddata-api-client/gooddata_api_client/models/result_dimension.py new file mode 100644 index 000000000..91b01ed74 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/result_dimension.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.result_dimension_header import ResultDimensionHeader +from typing import Optional, Set +from typing_extensions import Self + +class ResultDimension(BaseModel): + """ + Single result dimension + """ # noqa: E501 + headers: List[ResultDimensionHeader] + local_identifier: StrictStr = Field(description="Local identifier of the dimension.", alias="localIdentifier") + __properties: ClassVar[List[str]] = ["headers", "localIdentifier"] + + 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 ResultDimension 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 each item in headers (list) + _items = [] + if self.headers: + for _item_headers in self.headers: + if _item_headers: + _items.append(_item_headers.to_dict()) + _dict['headers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResultDimension from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "headers": [ResultDimensionHeader.from_dict(_item) for _item in obj["headers"]] if obj.get("headers") is not None else None, + "localIdentifier": obj.get("localIdentifier") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/result_dimension_header.py b/gooddata-api-client/gooddata_api_client/models/result_dimension_header.py new file mode 100644 index 000000000..42a5d7460 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/result_dimension_header.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.attribute_header import AttributeHeader +from gooddata_api_client.models.measure_group_headers import MeasureGroupHeaders +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +RESULTDIMENSIONHEADER_ONE_OF_SCHEMAS = ["AttributeHeader", "MeasureGroupHeaders"] + +class ResultDimensionHeader(BaseModel): + """ + One of the headers in a result dimension. + """ + # data type: MeasureGroupHeaders + oneof_schema_1_validator: Optional[MeasureGroupHeaders] = None + # data type: AttributeHeader + oneof_schema_2_validator: Optional[AttributeHeader] = None + actual_instance: Optional[Union[AttributeHeader, MeasureGroupHeaders]] = None + one_of_schemas: Set[str] = { "AttributeHeader", "MeasureGroupHeaders" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = ResultDimensionHeader.model_construct() + error_messages = [] + match = 0 + # validate data type: MeasureGroupHeaders + if not isinstance(v, MeasureGroupHeaders): + error_messages.append(f"Error! Input type `{type(v)}` is not `MeasureGroupHeaders`") + else: + match += 1 + # validate data type: AttributeHeader + if not isinstance(v, AttributeHeader): + error_messages.append(f"Error! Input type `{type(v)}` is not `AttributeHeader`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ResultDimensionHeader with oneOf schemas: AttributeHeader, MeasureGroupHeaders. 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 _try_deserialize(cls, json_str: str, data: dict) -> Self: + """Disambiguate oneOf by checking for distinguishing keys. + + AttributeHeader requires 'attributeHeader', MeasureGroupHeaders requires + 'measureGroupHeaders'. Because MeasureGroupHeaders.measureGroupHeaders is + Optional, the default pydantic-based try/except approach matches both + schemas whenever the JSON contains 'attributeHeader'. Field-based + checking avoids that false positive. + """ + instance = cls.model_construct() + + if "attributeHeader" in data: + instance.actual_instance = AttributeHeader.from_json(json_str) + return instance + + if "measureGroupHeaders" in data: + instance.actual_instance = MeasureGroupHeaders.from_json(json_str) + return instance + + raise ValueError( + "No match found when deserializing the JSON string into " + "ResultDimensionHeader with oneOf schemas: AttributeHeader, " + "MeasureGroupHeaders. The JSON object does not contain a " + "distinguishing key ('attributeHeader' or 'measureGroupHeaders')." + ) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + data = json.loads(json_str) + if isinstance(data, dict): + return cls._try_deserialize(json_str, data) + + # Fallback: brute-force try each schema (original behaviour) + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into MeasureGroupHeaders + try: + if match == 0: + instance.actual_instance = MeasureGroupHeaders.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AttributeHeader + try: + if match == 0: + instance.actual_instance = AttributeHeader.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ResultDimensionHeader with oneOf schemas: AttributeHeader, MeasureGroupHeaders. 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], AttributeHeader, MeasureGroupHeaders]]: + """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/gooddata-api-client/gooddata_api_client/models/result_spec.py b/gooddata-api-client/gooddata_api_client/models/result_spec.py new file mode 100644 index 000000000..9da41c20c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/result_spec.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.dimension import Dimension +from gooddata_api_client.models.total import Total +from typing import Optional, Set +from typing_extensions import Self + +class ResultSpec(BaseModel): + """ + Specifies how the result data will be formatted (```dimensions```) and which additional data shall be computed (```totals```). + """ # noqa: E501 + dimensions: List[Dimension] + totals: Optional[List[Total]] = None + __properties: ClassVar[List[str]] = ["dimensions", "totals"] + + 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 ResultSpec 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 each item in dimensions (list) + _items = [] + if self.dimensions: + for _item_dimensions in self.dimensions: + if _item_dimensions: + _items.append(_item_dimensions.to_dict()) + _dict['dimensions'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in totals (list) + _items = [] + if self.totals: + for _item_totals in self.totals: + if _item_totals: + _items.append(_item_totals.to_dict()) + _dict['totals'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResultSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dimensions": [Dimension.from_dict(_item) for _item in obj["dimensions"]] if obj.get("dimensions") is not None else None, + "totals": [Total.from_dict(_item) for _item in obj["totals"]] if obj.get("totals") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/route_result.py b/gooddata-api-client/gooddata_api_client/models/route_result.py new file mode 100644 index 000000000..c23c2d22c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/route_result.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class RouteResult(BaseModel): + """ + Question -> Use Case routing. May contain final answer is a special use case is not required. + """ # noqa: E501 + reasoning: StrictStr = Field(description="Explanation why LLM picked this use case.") + use_case: StrictStr = Field(description="Use case where LLM routed based on question.", alias="useCase") + __properties: ClassVar[List[str]] = ["reasoning", "useCase"] + + @field_validator('use_case') + def use_case_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['INVALID', 'GENERAL', 'SEARCH', 'CREATE_VISUALIZATION', 'EXTEND_VISUALIZATION', 'HOWTO', 'CHANGE_ANALYSIS', 'ALERT']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INVALID', 'GENERAL', 'SEARCH', 'CREATE_VISUALIZATION', 'EXTEND_VISUALIZATION', 'HOWTO', 'CHANGE_ANALYSIS', 'ALERT')") + 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 RouteResult 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 RouteResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reasoning": obj.get("reasoning"), + "useCase": obj.get("useCase") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/rsa_specification.py b/gooddata-api-client/gooddata_api_client/models/rsa_specification.py new file mode 100644 index 000000000..e70ee9dad --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/rsa_specification.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 RsaSpecification(BaseModel): + """ + RsaSpecification + """ # noqa: E501 + alg: StrictStr + e: StrictStr + kid: Annotated[str, Field(strict=True, max_length=255)] + kty: StrictStr + n: StrictStr + use: StrictStr + x5c: Optional[List[StrictStr]] = None + x5t: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["alg", "e", "kid", "kty", "n", "use", "x5c", "x5t"] + + @field_validator('alg') + def alg_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['RS256', 'RS384', 'RS512']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('RS256', 'RS384', 'RS512')") + return value + + @field_validator('kid') + def kid_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[^.]", value): + raise ValueError(r"must validate the regular expression /^[^.]/") + return value + + @field_validator('kty') + def kty_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['RSA']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('RSA')") + return value + + @field_validator('use') + def use_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['sig']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('sig')") + 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 RsaSpecification 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 RsaSpecification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alg": obj.get("alg"), + "e": obj.get("e"), + "kid": obj.get("kid"), + "kty": obj.get("kty"), + "n": obj.get("n"), + "use": obj.get("use"), + "x5c": obj.get("x5c"), + "x5t": obj.get("x5t") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/rule_permission.py b/gooddata-api-client/gooddata_api_client/models/rule_permission.py new file mode 100644 index 000000000..3aee474bf --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/rule_permission.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.granted_permission import GrantedPermission +from typing import Optional, Set +from typing_extensions import Self + +class RulePermission(BaseModel): + """ + List of rules + """ # noqa: E501 + permissions: Optional[List[GrantedPermission]] = Field(default=None, description="Permissions granted by the rule") + type: StrictStr = Field(description="Type of the rule") + __properties: ClassVar[List[str]] = ["permissions", "type"] + + 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 RulePermission 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 each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RulePermission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "permissions": [GrantedPermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/run_service_command_request.py b/gooddata-api-client/gooddata_api_client/models/run_service_command_request.py new file mode 100644 index 000000000..76dd3bb07 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/run_service_command_request.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 RunServiceCommandRequest(BaseModel): + """ + Request to run an AI Lake Service Command + """ # noqa: E501 + context: Optional[Dict[str, Optional[StrictStr]]] = Field(default=None, description="The context to pass to the command") + payload: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + __properties: ClassVar[List[str]] = ["context", "payload"] + + 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 RunServiceCommandRequest 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 context (nullable) is None + # and model_fields_set contains the field + if self.context is None and "context" in self.model_fields_set: + _dict['context'] = None + + # set to None if payload (nullable) is None + # and model_fields_set contains the field + if self.payload is None and "payload" in self.model_fields_set: + _dict['payload'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RunServiceCommandRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "context": obj.get("context"), + "payload": obj.get("payload") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/running_section.py b/gooddata-api-client/gooddata_api_client/models/running_section.py new file mode 100644 index 000000000..c67958147 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/running_section.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 RunningSection(BaseModel): + """ + Footer section of the slide + """ # noqa: E501 + left: Optional[StrictStr] = Field(default=None, description="Either {{logo}} variable or custom text with combination of other variables.") + right: Optional[StrictStr] = Field(default=None, description="Either {{logo}} variable or custom text with combination of other variables.") + __properties: ClassVar[List[str]] = ["left", "right"] + + 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 RunningSection 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 left (nullable) is None + # and model_fields_set contains the field + if self.left is None and "left" in self.model_fields_set: + _dict['left'] = None + + # set to None if right (nullable) is None + # and model_fields_set contains the field + if self.right is None and "right" in self.model_fields_set: + _dict['right'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RunningSection from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "left": obj.get("left"), + "right": obj.get("right") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/saved_visualization.py b/gooddata-api-client/gooddata_api_client/models/saved_visualization.py new file mode 100644 index 000000000..4ef90c976 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/saved_visualization.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class SavedVisualization(BaseModel): + """ + Created and saved visualization IDs. + """ # noqa: E501 + created_visualization_id: StrictStr = Field(description="Created visualization ID.", alias="createdVisualizationId") + saved_visualization_id: StrictStr = Field(description="Saved visualization ID.", alias="savedVisualizationId") + __properties: ClassVar[List[str]] = ["createdVisualizationId", "savedVisualizationId"] + + 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 SavedVisualization 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 SavedVisualization from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdVisualizationId": obj.get("createdVisualizationId"), + "savedVisualizationId": obj.get("savedVisualizationId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/scan_request.py b/gooddata-api-client/gooddata_api_client/models/scan_request.py new file mode 100644 index 000000000..017913c28 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/scan_request.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ScanRequest(BaseModel): + """ + A request containing all information critical to model scanning. + """ # noqa: E501 + scan_tables: StrictBool = Field(description="A flag indicating whether the tables should be scanned.", alias="scanTables") + scan_views: StrictBool = Field(description="A flag indicating whether the views should be scanned.", alias="scanViews") + schemata: Optional[List[StrictStr]] = Field(default=None, description="What schemata will be scanned.") + separator: StrictStr = Field(description="A separator between prefixes and the names.") + table_prefix: Optional[StrictStr] = Field(default=None, description="Tables starting with this prefix will be scanned. The prefix is then followed by the value of `separator` parameter. Given the table prefix is `out_table` and separator is `__`, the table with name like `out_table__customers` will be scanned.", alias="tablePrefix") + view_prefix: Optional[StrictStr] = Field(default=None, description="Views starting with this prefix will be scanned. The prefix is then followed by the value of `separator` parameter. Given the view prefix is `out_view` and separator is `__`, the table with name like `out_view__us_customers` will be scanned.", alias="viewPrefix") + __properties: ClassVar[List[str]] = ["scanTables", "scanViews", "schemata", "separator", "tablePrefix", "viewPrefix"] + + 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 ScanRequest 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 ScanRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scanTables": obj.get("scanTables"), + "scanViews": obj.get("scanViews"), + "schemata": obj.get("schemata"), + "separator": obj.get("separator"), + "tablePrefix": obj.get("tablePrefix"), + "viewPrefix": obj.get("viewPrefix") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/scan_result_pdm.py b/gooddata-api-client/gooddata_api_client/models/scan_result_pdm.py new file mode 100644 index 000000000..10fbfb7b1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/scan_result_pdm.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.declarative_tables import DeclarativeTables +from gooddata_api_client.models.table_warning import TableWarning +from typing import Optional, Set +from typing_extensions import Self + +class ScanResultPdm(BaseModel): + """ + Result of scan of data source physical model. + """ # noqa: E501 + pdm: DeclarativeTables + warnings: List[TableWarning] + __properties: ClassVar[List[str]] = ["pdm", "warnings"] + + 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 ScanResultPdm 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 pdm + if self.pdm: + _dict['pdm'] = self.pdm.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) + _items = [] + if self.warnings: + for _item_warnings in self.warnings: + if _item_warnings: + _items.append(_item_warnings.to_dict()) + _dict['warnings'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScanResultPdm from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pdm": DeclarativeTables.from_dict(obj["pdm"]) if obj.get("pdm") is not None else None, + "warnings": [TableWarning.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/scan_sql_request.py b/gooddata-api-client/gooddata_api_client/models/scan_sql_request.py new file mode 100644 index 000000000..b643c26ff --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/scan_sql_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ScanSqlRequest(BaseModel): + """ + A request with SQL query to by analyzed. + """ # noqa: E501 + sql: StrictStr = Field(description="SQL query to be analyzed.") + __properties: ClassVar[List[str]] = ["sql"] + + 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 ScanSqlRequest 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 ScanSqlRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sql": obj.get("sql") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/scan_sql_response.py b/gooddata-api-client/gooddata_api_client/models/scan_sql_response.py new file mode 100644 index 000000000..d155db3f1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/scan_sql_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.sql_column import SqlColumn +from typing import Optional, Set +from typing_extensions import Self + +class ScanSqlResponse(BaseModel): + """ + Result of scanSql. Consists of array of query columns including type. Sql query result data preview can be attached optionally + """ # noqa: E501 + columns: List[SqlColumn] = Field(description="Array of columns with types.") + data_preview: Optional[List[List[Optional[StrictStr]]]] = Field(default=None, description="Array of rows where each row is another array of string values.", alias="dataPreview") + __properties: ClassVar[List[str]] = ["columns", "dataPreview"] + + 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 ScanSqlResponse 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 each item in columns (list) + _items = [] + if self.columns: + for _item_columns in self.columns: + if _item_columns: + _items.append(_item_columns.to_dict()) + _dict['columns'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScanSqlResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "columns": [SqlColumn.from_dict(_item) for _item in obj["columns"]] if obj.get("columns") is not None else None, + "dataPreview": obj.get("dataPreview") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/search_knowledge_response_dto.py b/gooddata-api-client/gooddata_api_client/models/search_knowledge_response_dto.py new file mode 100644 index 000000000..14acb6092 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/search_knowledge_response_dto.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.knowledge_search_result_dto import KnowledgeSearchResultDto +from gooddata_api_client.models.search_statistics_dto import SearchStatisticsDto +from typing import Optional, Set +from typing_extensions import Self + +class SearchKnowledgeResponseDto(BaseModel): + """ + SearchKnowledgeResponseDto + """ # noqa: E501 + results: List[KnowledgeSearchResultDto] + statistics: SearchStatisticsDto + __properties: ClassVar[List[str]] = ["results", "statistics"] + + 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 SearchKnowledgeResponseDto 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 each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of statistics + if self.statistics: + _dict['statistics'] = self.statistics.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchKnowledgeResponseDto from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [KnowledgeSearchResultDto.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "statistics": SearchStatisticsDto.from_dict(obj["statistics"]) if obj.get("statistics") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/search_relationship_object.py b/gooddata-api-client/gooddata_api_client/models/search_relationship_object.py new file mode 100644 index 000000000..04beee8f9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/search_relationship_object.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class SearchRelationshipObject(BaseModel): + """ + SearchRelationshipObject + """ # noqa: E501 + source_object_id: StrictStr = Field(description="Source object ID.", alias="sourceObjectId") + source_object_title: StrictStr = Field(description="Source object title.", alias="sourceObjectTitle") + source_object_type: StrictStr = Field(description="Source object type, e.g. dashboard.", alias="sourceObjectType") + source_workspace_id: StrictStr = Field(description="Source workspace ID. If relationship is dashboard->visualization, this is the workspace where the dashboard is located.", alias="sourceWorkspaceId") + target_object_id: StrictStr = Field(description="Target object ID.", alias="targetObjectId") + target_object_title: StrictStr = Field(description="Target object title.", alias="targetObjectTitle") + target_object_type: StrictStr = Field(description="Target object type, e.g. visualization.", alias="targetObjectType") + target_workspace_id: StrictStr = Field(description="Target workspace ID. If relationship is dashboard->visualization, this is the workspace where the visualization is located.", alias="targetWorkspaceId") + __properties: ClassVar[List[str]] = ["sourceObjectId", "sourceObjectTitle", "sourceObjectType", "sourceWorkspaceId", "targetObjectId", "targetObjectTitle", "targetObjectType", "targetWorkspaceId"] + + 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 SearchRelationshipObject 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 SearchRelationshipObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sourceObjectId": obj.get("sourceObjectId"), + "sourceObjectTitle": obj.get("sourceObjectTitle"), + "sourceObjectType": obj.get("sourceObjectType"), + "sourceWorkspaceId": obj.get("sourceWorkspaceId"), + "targetObjectId": obj.get("targetObjectId"), + "targetObjectTitle": obj.get("targetObjectTitle"), + "targetObjectType": obj.get("targetObjectType"), + "targetWorkspaceId": obj.get("targetWorkspaceId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/search_request.py b/gooddata-api-client/gooddata_api_client/models/search_request.py new file mode 100644 index 000000000..4c4de3d1d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/search_request.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from gooddata_api_client.models.allowed_relationship_type import AllowedRelationshipType +from typing import Optional, Set +from typing_extensions import Self + +class SearchRequest(BaseModel): + """ + SearchRequest + """ # noqa: E501 + allowed_relationship_types: Optional[List[AllowedRelationshipType]] = Field(default=None, description="Filter relationships and results based on allowed relationship type combinations. When specified, only relationships matching the allowed types are returned, and results are filtered to include only direct matches or objects reachable via allowed relationships. When null or omitted, all relationships and results are returned (default behavior). Note: This filtering happens after the initial search, so the number of returned results may be lower than the requested limit if some results are filtered out.", alias="allowedRelationshipTypes") + deep_search: Optional[StrictBool] = Field(default=False, description="Turn on deep search. If true, content of complex objects will be searched as well, e.g. metrics in visualizations.", alias="deepSearch") + enable_hybrid_search: Optional[StrictBool] = Field(default=False, description="If true, enables hybrid search combining vector similarity and keyword matching. This can improve search results by considering both semantic similarity and exact keyword matches.", alias="enableHybridSearch") + exclude_tags: Optional[List[StrictStr]] = Field(default=None, description="Exclude objects that contain any of the specified tags. This parameter only affects the search results. Objects with excluded tags are completely hidden from the results.", alias="excludeTags") + include_hidden: Optional[StrictBool] = Field(default=False, description="If true, includes hidden objects in search results. If false (default), excludes objects where isHidden=true.", alias="includeHidden") + include_tags: Optional[List[StrictStr]] = Field(default=None, description="Include only objects that contain at least one of the specified tags (OR logic). This parameter only affects the search results. If an object has multiple tags, it will be included as long as it matches at least one tag from this parameter.", alias="includeTags") + limit: Optional[StrictInt] = Field(default=10, description="Maximum number of results to return. There is a hard limit and the actual number of returned results may be lower than what is requested. This can happen when post-search filters are applied (e.g., reranker threshold filtering or allowedRelationshipTypes filtering), which may exclude some results after the initial search.") + object_types: Optional[List[StrictStr]] = Field(default=None, description="List of object types to search for.", alias="objectTypes") + question: Annotated[str, Field(strict=True, max_length=1000)] = Field(description="Keyword/sentence is input for search.") + relevant_score_threshold: Optional[Union[StrictFloat, StrictInt]] = Field(default=0.3, description="Score, above which we return found objects. Below this score objects are not relevant.", alias="relevantScoreThreshold") + title_to_descriptor_ratio: Optional[Union[StrictFloat, StrictInt]] = Field(default=0.7, description="Temporary for experiments. Ratio of title score to descriptor score.", alias="titleToDescriptorRatio") + __properties: ClassVar[List[str]] = ["allowedRelationshipTypes", "deepSearch", "enableHybridSearch", "excludeTags", "includeHidden", "includeTags", "limit", "objectTypes", "question", "relevantScoreThreshold", "titleToDescriptorRatio"] + + @field_validator('object_types') + def object_types_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['attribute', 'metric', 'fact', 'label', 'date', 'dataset', 'visualization', 'dashboard']): + raise ValueError("each list item must be one of ('attribute', 'metric', 'fact', 'label', 'date', 'dataset', 'visualization', 'dashboard')") + 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 SearchRequest 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 each item in allowed_relationship_types (list) + _items = [] + if self.allowed_relationship_types: + for _item_allowed_relationship_types in self.allowed_relationship_types: + if _item_allowed_relationship_types: + _items.append(_item_allowed_relationship_types.to_dict()) + _dict['allowedRelationshipTypes'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowedRelationshipTypes": [AllowedRelationshipType.from_dict(_item) for _item in obj["allowedRelationshipTypes"]] if obj.get("allowedRelationshipTypes") is not None else None, + "deepSearch": obj.get("deepSearch") if obj.get("deepSearch") is not None else False, + "enableHybridSearch": obj.get("enableHybridSearch") if obj.get("enableHybridSearch") is not None else False, + "excludeTags": obj.get("excludeTags"), + "includeHidden": obj.get("includeHidden") if obj.get("includeHidden") is not None else False, + "includeTags": obj.get("includeTags"), + "limit": obj.get("limit") if obj.get("limit") is not None else 10, + "objectTypes": obj.get("objectTypes"), + "question": obj.get("question"), + "relevantScoreThreshold": obj.get("relevantScoreThreshold") if obj.get("relevantScoreThreshold") is not None else 0.3, + "titleToDescriptorRatio": obj.get("titleToDescriptorRatio") if obj.get("titleToDescriptorRatio") is not None else 0.7 + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/search_result.py b/gooddata-api-client/gooddata_api_client/models/search_result.py new file mode 100644 index 000000000..90a1c49ea --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/search_result.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.search_relationship_object import SearchRelationshipObject +from gooddata_api_client.models.search_result_object import SearchResultObject +from typing import Optional, Set +from typing_extensions import Self + +class SearchResult(BaseModel): + """ + SearchResult + """ # noqa: E501 + reasoning: StrictStr = Field(description="DEPRECATED: Use top-level reasoning.steps instead. If something is not working properly this field will contain explanation.") + relationships: List[SearchRelationshipObject] + results: List[SearchResultObject] + __properties: ClassVar[List[str]] = ["reasoning", "relationships", "results"] + + 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 SearchResult 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 each item in relationships (list) + _items = [] + if self.relationships: + for _item_relationships in self.relationships: + if _item_relationships: + _items.append(_item_relationships.to_dict()) + _dict['relationships'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reasoning": obj.get("reasoning"), + "relationships": [SearchRelationshipObject.from_dict(_item) for _item in obj["relationships"]] if obj.get("relationships") is not None else None, + "results": [SearchResultObject.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/search_result_object.py b/gooddata-api-client/gooddata_api_client/models/search_result_object.py new file mode 100644 index 000000000..13ed95e58 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/search_result_object.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class SearchResultObject(BaseModel): + """ + SearchResultObject + """ # noqa: E501 + created_at: Optional[datetime] = Field(default=None, description="Timestamp when object was created.", alias="createdAt") + description: Optional[StrictStr] = Field(default=None, description="Object description.") + id: StrictStr = Field(description="Object ID.") + is_hidden: Optional[StrictBool] = Field(default=None, description="If true, this object is hidden from AI search results by default.", alias="isHidden") + modified_at: Optional[datetime] = Field(default=None, description="Timestamp when object was last modified.", alias="modifiedAt") + score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Result score calculated by a similarity search algorithm (cosine_distance).") + score_descriptor: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Result score for descriptor containing(now) description and tags.", alias="scoreDescriptor") + score_exact_match: Optional[StrictInt] = Field(default=None, description="Result score for exact match(id/title). 1/1000. Other scores are multiplied by this.", alias="scoreExactMatch") + score_title: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Result score for object title.", alias="scoreTitle") + tags: Optional[List[StrictStr]] = None + title: StrictStr = Field(description="Object title.") + type: StrictStr = Field(description="Object type, e.g. dashboard.") + visualization_url: Optional[StrictStr] = Field(default=None, description="If the object is visualization, this field defines the type of visualization.", alias="visualizationUrl") + workspace_id: StrictStr = Field(description="Workspace ID.", alias="workspaceId") + __properties: ClassVar[List[str]] = ["createdAt", "description", "id", "isHidden", "modifiedAt", "score", "scoreDescriptor", "scoreExactMatch", "scoreTitle", "tags", "title", "type", "visualizationUrl", "workspaceId"] + + 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 SearchResultObject 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 SearchResultObject 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"), + "description": obj.get("description"), + "id": obj.get("id"), + "isHidden": obj.get("isHidden"), + "modifiedAt": obj.get("modifiedAt"), + "score": obj.get("score"), + "scoreDescriptor": obj.get("scoreDescriptor"), + "scoreExactMatch": obj.get("scoreExactMatch"), + "scoreTitle": obj.get("scoreTitle"), + "tags": obj.get("tags"), + "title": obj.get("title"), + "type": obj.get("type"), + "visualizationUrl": obj.get("visualizationUrl"), + "workspaceId": obj.get("workspaceId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/search_statistics_dto.py b/gooddata-api-client/gooddata_api_client/models/search_statistics_dto.py new file mode 100644 index 000000000..7657211b2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/search_statistics_dto.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class SearchStatisticsDto(BaseModel): + """ + SearchStatisticsDto + """ # noqa: E501 + average_similarity_score: Union[StrictFloat, StrictInt] = Field(alias="averageSimilarityScore") + total_results: StrictInt = Field(alias="totalResults") + __properties: ClassVar[List[str]] = ["averageSimilarityScore", "totalResults"] + + 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 SearchStatisticsDto 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 SearchStatisticsDto from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "averageSimilarityScore": obj.get("averageSimilarityScore"), + "totalResults": obj.get("totalResults") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/section_slide_template.py b/gooddata-api-client/gooddata_api_client/models/section_slide_template.py new file mode 100644 index 000000000..ea3996b98 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/section_slide_template.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.running_section import RunningSection +from typing import Optional, Set +from typing_extensions import Self + +class SectionSlideTemplate(BaseModel): + """ + Settings for section slide. + """ # noqa: E501 + background_image: Optional[StrictBool] = Field(default=True, description="Show background image on the slide.", alias="backgroundImage") + footer: Optional[RunningSection] = None + header: Optional[RunningSection] = None + __properties: ClassVar[List[str]] = ["backgroundImage", "footer", "header"] + + 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 SectionSlideTemplate 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 footer + if self.footer: + _dict['footer'] = self.footer.to_dict() + # override the default output from pydantic by calling `to_dict()` of header + if self.header: + _dict['header'] = self.header.to_dict() + # set to None if footer (nullable) is None + # and model_fields_set contains the field + if self.footer is None and "footer" in self.model_fields_set: + _dict['footer'] = None + + # set to None if header (nullable) is None + # and model_fields_set contains the field + if self.header is None and "header" in self.model_fields_set: + _dict['header'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SectionSlideTemplate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "backgroundImage": obj.get("backgroundImage") if obj.get("backgroundImage") is not None else True, + "footer": RunningSection.from_dict(obj["footer"]) if obj.get("footer") is not None else None, + "header": RunningSection.from_dict(obj["header"]) if obj.get("header") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/service_info.py b/gooddata-api-client/gooddata_api_client/models/service_info.py new file mode 100644 index 000000000..10a09c9c3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/service_info.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ServiceInfo(BaseModel): + """ + Non-sensitive metadata for an AI Lake pipeline + """ # noqa: E501 + name: StrictStr = Field(description="Human-readable name of the service") + service_id: StrictStr = Field(description="Internal identifier for the service configuration (UUID)", alias="serviceId") + __properties: ClassVar[List[str]] = ["name", "serviceId"] + + 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 ServiceInfo 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 ServiceInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "serviceId": obj.get("serviceId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/set_certification_request.py b/gooddata-api-client/gooddata_api_client/models/set_certification_request.py new file mode 100644 index 000000000..16362550b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/set_certification_request.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class SetCertificationRequest(BaseModel): + """ + Request to set or clear the certification of a workspace entity. + """ # noqa: E501 + id: StrictStr = Field(description="ID of the entity.") + message: Optional[StrictStr] = Field(default=None, description="Optional message associated with the certification.") + status: Optional[StrictStr] = Field(default=None, description="Certification status of the entity.") + type: StrictStr = Field(description="Type of the entity.") + __properties: ClassVar[List[str]] = ["id", "message", "status", "type"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['CERTIFIED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('CERTIFIED')") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['metric', 'visualizationObject', 'analyticalDashboard']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('metric', 'visualizationObject', 'analyticalDashboard')") + 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 SetCertificationRequest 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 message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SetCertificationRequest 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"), + "message": obj.get("message"), + "status": obj.get("status"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/settings.py b/gooddata-api-client/gooddata_api_client/models/settings.py new file mode 100644 index 000000000..b73ef4afb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/settings.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.pdf_table_style import PdfTableStyle +from typing import Optional, Set +from typing_extensions import Self + +class Settings(BaseModel): + """ + Additional settings. + """ # noqa: E501 + delimiter: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1)]] = Field(default=None, description="Set column delimiter. (CSV)") + export_info: Optional[StrictBool] = Field(default=False, description="If true, the export will contain the information about the export – exported date, filters, etc. Works only with `visualizationObject`. (XLSX, PDF)", alias="exportInfo") + merge_headers: Optional[StrictBool] = Field(default=None, description="Merge equal headers in neighbouring cells. (XLSX)", alias="mergeHeaders") + page_orientation: Optional[StrictStr] = Field(default='PORTRAIT', description="Set page orientation. (PDF)", alias="pageOrientation") + page_size: Optional[StrictStr] = Field(default='A4', description="Set page size. (PDF)", alias="pageSize") + pdf_page_size: Optional[StrictStr] = Field(default=None, description="Page size and orientation. (PDF)", alias="pdfPageSize") + pdf_table_style: Optional[List[PdfTableStyle]] = Field(default=None, description="Custom CSS styles for the table. (PDF, HTML)", alias="pdfTableStyle") + pdf_top_left_content: Optional[StrictStr] = Field(default=None, description="Top left header content. (PDF)", alias="pdfTopLeftContent") + pdf_top_right_content: Optional[StrictStr] = Field(default=None, description="Top right header content. (PDF)", alias="pdfTopRightContent") + show_filters: Optional[StrictBool] = Field(default=None, description="Print applied filters on top of the document. (PDF/HTML when visualizationObject is given)", alias="showFilters") + __properties: ClassVar[List[str]] = ["delimiter", "exportInfo", "mergeHeaders", "pageOrientation", "pageSize", "pdfPageSize", "pdfTableStyle", "pdfTopLeftContent", "pdfTopRightContent", "showFilters"] + + @field_validator('delimiter') + def delimiter_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[^\r\n\"]$", value): + raise ValueError(r"must validate the regular expression /^[^\r\n\"]$/") + return value + + @field_validator('page_orientation') + def page_orientation_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['PORTRAIT', 'LANDSCAPE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('PORTRAIT', 'LANDSCAPE')") + return value + + @field_validator('page_size') + def page_size_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['A3', 'A4', 'LETTER']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('A3', 'A4', 'LETTER')") + 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 Settings 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 each item in pdf_table_style (list) + _items = [] + if self.pdf_table_style: + for _item_pdf_table_style in self.pdf_table_style: + if _item_pdf_table_style: + _items.append(_item_pdf_table_style.to_dict()) + _dict['pdfTableStyle'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Settings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "delimiter": obj.get("delimiter"), + "exportInfo": obj.get("exportInfo") if obj.get("exportInfo") is not None else False, + "mergeHeaders": obj.get("mergeHeaders"), + "pageOrientation": obj.get("pageOrientation") if obj.get("pageOrientation") is not None else 'PORTRAIT', + "pageSize": obj.get("pageSize") if obj.get("pageSize") is not None else 'A4', + "pdfPageSize": obj.get("pdfPageSize"), + "pdfTableStyle": [PdfTableStyle.from_dict(_item) for _item in obj["pdfTableStyle"]] if obj.get("pdfTableStyle") is not None else None, + "pdfTopLeftContent": obj.get("pdfTopLeftContent"), + "pdfTopRightContent": obj.get("pdfTopRightContent"), + "showFilters": obj.get("showFilters") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/simple_measure_definition.py b/gooddata-api-client/gooddata_api_client/models/simple_measure_definition.py new file mode 100644 index 000000000..b20f276de --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/simple_measure_definition.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.simple_measure_definition_measure import SimpleMeasureDefinitionMeasure +from typing import Optional, Set +from typing_extensions import Self + +class SimpleMeasureDefinition(BaseModel): + """ + Metric defined by referencing a MAQL metric or an LDM fact object with aggregation. + """ # noqa: E501 + measure: SimpleMeasureDefinitionMeasure + __properties: ClassVar[List[str]] = ["measure"] + + 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 SimpleMeasureDefinition 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 measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SimpleMeasureDefinition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "measure": SimpleMeasureDefinitionMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/simple_measure_definition_measure.py b/gooddata-api-client/gooddata_api_client/models/simple_measure_definition_measure.py new file mode 100644 index 000000000..6b69bd9e4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/simple_measure_definition_measure.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.afm_object_identifier_core import AfmObjectIdentifierCore +from gooddata_api_client.models.filter_definition_for_simple_measure import FilterDefinitionForSimpleMeasure +from typing import Optional, Set +from typing_extensions import Self + +class SimpleMeasureDefinitionMeasure(BaseModel): + """ + SimpleMeasureDefinitionMeasure + """ # noqa: E501 + aggregation: Optional[StrictStr] = Field(default=None, description="Definition of aggregation type of the metric.") + compute_ratio: Optional[StrictBool] = Field(default=False, description="If true, compute the percentage of given metric values (broken down by AFM attributes) to the total (not broken down).", alias="computeRatio") + filters: Optional[List[FilterDefinitionForSimpleMeasure]] = Field(default=None, description="Metrics can be filtered by attribute filters with the same interface as ones for global AFM. Note that only one DateFilter is allowed.") + item: AfmObjectIdentifierCore + __properties: ClassVar[List[str]] = ["aggregation", "computeRatio", "filters", "item"] + + @field_validator('aggregation') + def aggregation_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['SUM', 'COUNT', 'AVG', 'MIN', 'MAX', 'MEDIAN', 'RUNSUM', 'APPROXIMATE_COUNT']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SUM', 'COUNT', 'AVG', 'MIN', 'MAX', 'MEDIAN', 'RUNSUM', 'APPROXIMATE_COUNT')") + 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 SimpleMeasureDefinitionMeasure 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 each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + # override the default output from pydantic by calling `to_dict()` of item + if self.item: + _dict['item'] = self.item.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SimpleMeasureDefinitionMeasure from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aggregation": obj.get("aggregation"), + "computeRatio": obj.get("computeRatio") if obj.get("computeRatio") is not None else False, + "filters": [FilterDefinitionForSimpleMeasure.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "item": AfmObjectIdentifierCore.from_dict(obj["item"]) if obj.get("item") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/skeleton.py b/gooddata-api-client/gooddata_api_client/models/skeleton.py new file mode 100644 index 000000000..a77267e81 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/skeleton.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 Skeleton(BaseModel): + """ + Skeleton + """ # noqa: E501 + content: Optional[List[Dict[str, Any]]] = None + href: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["content", "href"] + + 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 Skeleton 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 Skeleton from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "href": obj.get("href") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/slides_export_request.py b/gooddata-api-client/gooddata_api_client/models/slides_export_request.py new file mode 100644 index 000000000..29050701e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/slides_export_request.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 SlidesExportRequest(BaseModel): + """ + Export request object describing the export properties and metadata for slides exports. + """ # noqa: E501 + dashboard_id: Optional[StrictStr] = Field(default=None, description="Dashboard identifier", alias="dashboardId") + file_name: StrictStr = Field(description="File name to be used for retrieving the pdf document.", alias="fileName") + format: StrictStr = Field(description="Requested resulting file type.") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + template_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Export template identifier.", alias="templateId") + visualization_ids: Optional[Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=255)]], Field(max_length=1)]] = Field(default=None, description="List of visualization ids to be exported. Note that only one visualization is currently supported.", alias="visualizationIds") + widget_ids: Optional[Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=255)]], Field(max_length=1)]] = Field(default=None, description="List of widget identifiers to be exported. Note that only one widget is currently supported.", alias="widgetIds") + __properties: ClassVar[List[str]] = ["dashboardId", "fileName", "format", "metadata", "templateId", "visualizationIds", "widgetIds"] + + @field_validator('format') + def format_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['PDF', 'PPTX']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('PDF', 'PPTX')") + 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 SlidesExportRequest 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 metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + # set to None if template_id (nullable) is None + # and model_fields_set contains the field + if self.template_id is None and "template_id" in self.model_fields_set: + _dict['templateId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SlidesExportRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dashboardId": obj.get("dashboardId"), + "fileName": obj.get("fileName"), + "format": obj.get("format"), + "metadata": obj.get("metadata"), + "templateId": obj.get("templateId"), + "visualizationIds": obj.get("visualizationIds"), + "widgetIds": obj.get("widgetIds") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/smart_function_response.py b/gooddata-api-client/gooddata_api_client/models/smart_function_response.py new file mode 100644 index 000000000..4aa6d7921 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/smart_function_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.execution_links import ExecutionLinks +from typing import Optional, Set +from typing_extensions import Self + +class SmartFunctionResponse(BaseModel): + """ + SmartFunctionResponse + """ # noqa: E501 + links: ExecutionLinks + __properties: ClassVar[List[str]] = ["links"] + + 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 SmartFunctionResponse 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 links + if self.links: + _dict['links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SmartFunctionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "links": ExecutionLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/smtp.py b/gooddata-api-client/gooddata_api_client/models/smtp.py new file mode 100644 index 000000000..e09738492 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/smtp.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class Smtp(BaseModel): + """ + Custom SMTP destination for notifications. The properties host, port, username, and password are required on create and update + """ # noqa: E501 + from_email: Optional[StrictStr] = Field(default='no-reply@gooddata.com', description="E-mail address to send notifications from.", alias="fromEmail") + from_email_name: Optional[StrictStr] = Field(default='GoodData', description="An optional e-mail name to send notifications from.", alias="fromEmailName") + host: Optional[StrictStr] = Field(default=None, description="The SMTP server address.") + password: Optional[StrictStr] = Field(default=None, description="The SMTP server password.") + port: Optional[StrictInt] = Field(default=None, description="The SMTP server port.") + type: StrictStr = Field(description="The destination type.") + username: Optional[StrictStr] = Field(default=None, description="The SMTP server username.") + __properties: ClassVar[List[str]] = ["fromEmail", "fromEmailName", "host", "password", "port", "type", "username"] + + @field_validator('port') + def port_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set([25, 465, 587, 2525]): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values (25, 465, 587, 2525)") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['SMTP']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SMTP')") + 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 Smtp 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 Smtp from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fromEmail": obj.get("fromEmail") if obj.get("fromEmail") is not None else 'no-reply@gooddata.com', + "fromEmailName": obj.get("fromEmailName") if obj.get("fromEmailName") is not None else 'GoodData', + "host": obj.get("host"), + "password": obj.get("password"), + "port": obj.get("port"), + "type": obj.get("type"), + "username": obj.get("username") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/sort_key.py b/gooddata-api-client/gooddata_api_client/models/sort_key.py new file mode 100644 index 000000000..aa78b843e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/sort_key.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.sort_key_attribute import SortKeyAttribute +from gooddata_api_client.models.sort_key_total import SortKeyTotal +from gooddata_api_client.models.sort_key_value import SortKeyValue +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SORTKEY_ONE_OF_SCHEMAS = ["SortKeyAttribute", "SortKeyTotal", "SortKeyValue"] + +class SortKey(BaseModel): + """ + SortKey + """ + # data type: SortKeyAttribute + oneof_schema_1_validator: Optional[SortKeyAttribute] = None + # data type: SortKeyValue + oneof_schema_2_validator: Optional[SortKeyValue] = None + # data type: SortKeyTotal + oneof_schema_3_validator: Optional[SortKeyTotal] = None + actual_instance: Optional[Union[SortKeyAttribute, SortKeyTotal, SortKeyValue]] = None + one_of_schemas: Set[str] = { "SortKeyAttribute", "SortKeyTotal", "SortKeyValue" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = SortKey.model_construct() + error_messages = [] + match = 0 + # validate data type: SortKeyAttribute + if not isinstance(v, SortKeyAttribute): + error_messages.append(f"Error! Input type `{type(v)}` is not `SortKeyAttribute`") + else: + match += 1 + # validate data type: SortKeyValue + if not isinstance(v, SortKeyValue): + error_messages.append(f"Error! Input type `{type(v)}` is not `SortKeyValue`") + else: + match += 1 + # validate data type: SortKeyTotal + if not isinstance(v, SortKeyTotal): + error_messages.append(f"Error! Input type `{type(v)}` is not `SortKeyTotal`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SortKey with oneOf schemas: SortKeyAttribute, SortKeyTotal, SortKeyValue. 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 + + # deserialize data into SortKeyAttribute + try: + if match == 0: + instance.actual_instance = SortKeyAttribute.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SortKeyValue + try: + if match == 0: + instance.actual_instance = SortKeyValue.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SortKeyTotal + try: + if match == 0: + instance.actual_instance = SortKeyTotal.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SortKey with oneOf schemas: SortKeyAttribute, SortKeyTotal, SortKeyValue. 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], SortKeyAttribute, SortKeyTotal, SortKeyValue]]: + """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/gooddata-api-client/gooddata_api_client/models/sort_key_attribute.py b/gooddata-api-client/gooddata_api_client/models/sort_key_attribute.py new file mode 100644 index 000000000..f13dc713d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/sort_key_attribute.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.sort_key_attribute_attribute import SortKeyAttributeAttribute +from typing import Optional, Set +from typing_extensions import Self + +class SortKeyAttribute(BaseModel): + """ + Sorting rule for sorting by attribute value in current dimension. + """ # noqa: E501 + attribute: SortKeyAttributeAttribute + __properties: ClassVar[List[str]] = ["attribute"] + + 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 SortKeyAttribute 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 attribute + if self.attribute: + _dict['attribute'] = self.attribute.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SortKeyAttribute from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attribute": SortKeyAttributeAttribute.from_dict(obj["attribute"]) if obj.get("attribute") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/sort_key_attribute_attribute.py b/gooddata-api-client/gooddata_api_client/models/sort_key_attribute_attribute.py new file mode 100644 index 000000000..47f5555f2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/sort_key_attribute_attribute.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class SortKeyAttributeAttribute(BaseModel): + """ + SortKeyAttributeAttribute + """ # noqa: E501 + attribute_identifier: StrictStr = Field(description="Item reference (to 'itemIdentifiers') referencing, which item should be used for sorting. Only references to attributes are allowed.", alias="attributeIdentifier") + direction: Optional[StrictStr] = Field(default=None, description="Sorting elements - ascending/descending order.") + sort_type: Optional[StrictStr] = Field(default='DEFAULT', description="Mechanism by which this attribute should be sorted. Available options are: - DEFAULT: sorting based on default rules (using sort column if defined, otherwise this label) - LABEL: sorting by this label values - ATTRIBUTE: sorting by values of this label's attribute (or rather the primary label) - ATTRIBUTE: sorting by values of this label's attribute (or rather the primary label)- AREA: sorting by area (total or subtotal) corresponding to each attribute value. The area is computed by summing up all metric values in all other dimensions.", alias="sortType") + __properties: ClassVar[List[str]] = ["attributeIdentifier", "direction", "sortType"] + + @field_validator('direction') + def direction_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ASC', 'DESC']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ASC', 'DESC')") + return value + + @field_validator('sort_type') + def sort_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['DEFAULT', 'LABEL', 'ATTRIBUTE', 'AREA']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('DEFAULT', 'LABEL', 'ATTRIBUTE', 'AREA')") + 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 SortKeyAttributeAttribute 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 SortKeyAttributeAttribute from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributeIdentifier": obj.get("attributeIdentifier"), + "direction": obj.get("direction"), + "sortType": obj.get("sortType") if obj.get("sortType") is not None else 'DEFAULT' + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/sort_key_total.py b/gooddata-api-client/gooddata_api_client/models/sort_key_total.py new file mode 100644 index 000000000..ee53eb358 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/sort_key_total.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.sort_key_total_total import SortKeyTotalTotal +from typing import Optional, Set +from typing_extensions import Self + +class SortKeyTotal(BaseModel): + """ + Sorting rule for sorting by total value. DataColumnLocators are only required if there is ambiguity. Locator for measureGroup is taken from the metric of the total. + """ # noqa: E501 + total: SortKeyTotalTotal + __properties: ClassVar[List[str]] = ["total"] + + 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 SortKeyTotal 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 total + if self.total: + _dict['total'] = self.total.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SortKeyTotal from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": SortKeyTotalTotal.from_dict(obj["total"]) if obj.get("total") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/sort_key_total_total.py b/gooddata-api-client/gooddata_api_client/models/sort_key_total_total.py new file mode 100644 index 000000000..6fa7ad2d0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/sort_key_total_total.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.data_column_locators import DataColumnLocators +from typing import Optional, Set +from typing_extensions import Self + +class SortKeyTotalTotal(BaseModel): + """ + SortKeyTotalTotal + """ # noqa: E501 + data_column_locators: Optional[DataColumnLocators] = Field(default=None, alias="dataColumnLocators") + direction: Optional[StrictStr] = Field(default=None, description="Sorting elements - ascending/descending order.") + total_identifier: StrictStr = Field(description="Local identifier of the total to sort by.", alias="totalIdentifier") + __properties: ClassVar[List[str]] = ["dataColumnLocators", "direction", "totalIdentifier"] + + @field_validator('direction') + def direction_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ASC', 'DESC']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ASC', 'DESC')") + 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 SortKeyTotalTotal 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 data_column_locators + if self.data_column_locators: + _dict['dataColumnLocators'] = self.data_column_locators.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SortKeyTotalTotal from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataColumnLocators": DataColumnLocators.from_dict(obj["dataColumnLocators"]) if obj.get("dataColumnLocators") is not None else None, + "direction": obj.get("direction"), + "totalIdentifier": obj.get("totalIdentifier") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/sort_key_value.py b/gooddata-api-client/gooddata_api_client/models/sort_key_value.py new file mode 100644 index 000000000..d7e35d13d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/sort_key_value.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.sort_key_value_value import SortKeyValueValue +from typing import Optional, Set +from typing_extensions import Self + +class SortKeyValue(BaseModel): + """ + Sorting rule for sorting by measure value. DataColumnLocators for each dimension opposite to the sorted one must be specified. + """ # noqa: E501 + value: SortKeyValueValue + __properties: ClassVar[List[str]] = ["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 SortKeyValue 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 value + if self.value: + _dict['value'] = self.value.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SortKeyValue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "value": SortKeyValueValue.from_dict(obj["value"]) if obj.get("value") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/sort_key_value_value.py b/gooddata-api-client/gooddata_api_client/models/sort_key_value_value.py new file mode 100644 index 000000000..8d0fbd8ce --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/sort_key_value_value.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.data_column_locators import DataColumnLocators +from typing import Optional, Set +from typing_extensions import Self + +class SortKeyValueValue(BaseModel): + """ + SortKeyValueValue + """ # noqa: E501 + data_column_locators: DataColumnLocators = Field(alias="dataColumnLocators") + direction: Optional[StrictStr] = Field(default=None, description="Sorting elements - ascending/descending order.") + __properties: ClassVar[List[str]] = ["dataColumnLocators", "direction"] + + @field_validator('direction') + def direction_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ASC', 'DESC']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('ASC', 'DESC')") + 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 SortKeyValueValue 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 data_column_locators + if self.data_column_locators: + _dict['dataColumnLocators'] = self.data_column_locators.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SortKeyValueValue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataColumnLocators": DataColumnLocators.from_dict(obj["dataColumnLocators"]) if obj.get("dataColumnLocators") is not None else None, + "direction": obj.get("direction") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/sql_column.py b/gooddata-api-client/gooddata_api_client/models/sql_column.py new file mode 100644 index 000000000..d1bedcf82 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/sql_column.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class SqlColumn(BaseModel): + """ + A SQL query result column. + """ # noqa: E501 + data_type: StrictStr = Field(description="Column type", alias="dataType") + description: Optional[StrictStr] = Field(default=None, description="Column description/comment from database") + name: StrictStr = Field(description="Column name") + __properties: ClassVar[List[str]] = ["dataType", "description", "name"] + + @field_validator('data_type') + def data_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('INT', 'STRING', 'DATE', 'NUMERIC', 'TIMESTAMP', 'TIMESTAMP_TZ', 'BOOLEAN')") + 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 SqlColumn 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 SqlColumn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataType": obj.get("dataType"), + "description": obj.get("description"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/sql_query.py b/gooddata-api-client/gooddata_api_client/models/sql_query.py new file mode 100644 index 000000000..3e24b38e6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/sql_query.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class SqlQuery(BaseModel): + """ + SqlQuery + """ # noqa: E501 + sql: StrictStr + __properties: ClassVar[List[str]] = ["sql"] + + 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 SqlQuery 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 SqlQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sql": obj.get("sql") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/succeeded_operation.py b/gooddata-api-client/gooddata_api_client/models/succeeded_operation.py new file mode 100644 index 000000000..9cfd74f0f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/succeeded_operation.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.operation import Operation +from typing import Optional, Set +from typing_extensions import Self + +class SucceededOperation(Operation): + """ + Operation that has succeeded + """ # noqa: E501 + result: Optional[Dict[str, Any]] = Field(default=None, description="Operation-specific result payload, can be missing for operations like delete") + __properties: ClassVar[List[str]] = ["id", "kind", "status", "result"] + + 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 SucceededOperation 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 SucceededOperation 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"), + "kind": obj.get("kind"), + "status": obj.get("status"), + "result": obj.get("result") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/suggestion.py b/gooddata-api-client/gooddata_api_client/models/suggestion.py new file mode 100644 index 000000000..041cf69d9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/suggestion.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class Suggestion(BaseModel): + """ + List of suggestions for next steps. Filled when no visualization was created, suggests alternatives. + """ # noqa: E501 + label: StrictStr = Field(description="Suggestion button label") + query: StrictStr = Field(description="Suggestion query") + __properties: ClassVar[List[str]] = ["label", "query"] + + 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 Suggestion 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 Suggestion from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "label": obj.get("label"), + "query": obj.get("query") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/switch_identity_provider_request.py b/gooddata-api-client/gooddata_api_client/models/switch_identity_provider_request.py new file mode 100644 index 000000000..dd350fada --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/switch_identity_provider_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class SwitchIdentityProviderRequest(BaseModel): + """ + SwitchIdentityProviderRequest + """ # noqa: E501 + idp_id: StrictStr = Field(description="Identity provider ID to set as active for the organization.", alias="idpId") + __properties: ClassVar[List[str]] = ["idpId"] + + 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 SwitchIdentityProviderRequest 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 SwitchIdentityProviderRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idpId": obj.get("idpId") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/table.py b/gooddata-api-client/gooddata_api_client/models/table.py new file mode 100644 index 000000000..15a20e00d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/table.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class Table(BaseModel): + """ + Table + """ # noqa: E501 + table_name: StrictStr = Field(alias="tableName") + __properties: ClassVar[List[str]] = ["tableName"] + + 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 Table 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 Table from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tableName": obj.get("tableName") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/table_override.py b/gooddata-api-client/gooddata_api_client/models/table_override.py new file mode 100644 index 000000000..0bbe75132 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/table_override.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.column_override import ColumnOverride +from typing import Optional, Set +from typing_extensions import Self + +class TableOverride(BaseModel): + """ + Table override settings. + """ # noqa: E501 + columns: List[ColumnOverride] = Field(description="An array of column overrides") + path: List[StrictStr] = Field(description="Path for the table.") + __properties: ClassVar[List[str]] = ["columns", "path"] + + 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 TableOverride 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 each item in columns (list) + _items = [] + if self.columns: + for _item_columns in self.columns: + if _item_columns: + _items.append(_item_columns.to_dict()) + _dict['columns'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TableOverride from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "columns": [ColumnOverride.from_dict(_item) for _item in obj["columns"]] if obj.get("columns") is not None else None, + "path": obj.get("path") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/table_warning.py b/gooddata-api-client/gooddata_api_client/models/table_warning.py new file mode 100644 index 000000000..7cc4459ba --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/table_warning.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.column_warning import ColumnWarning +from typing import Optional, Set +from typing_extensions import Self + +class TableWarning(BaseModel): + """ + Warnings related to single table. + """ # noqa: E501 + columns: List[ColumnWarning] + message: Optional[StrictStr] = Field(default=None, description="Warning message related to the table.") + name: StrictStr = Field(description="Table name.") + __properties: ClassVar[List[str]] = ["columns", "message", "name"] + + 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 TableWarning 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 each item in columns (list) + _items = [] + if self.columns: + for _item_columns in self.columns: + if _item_columns: + _items.append(_item_columns.to_dict()) + _dict['columns'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TableWarning from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "columns": [ColumnWarning.from_dict(_item) for _item in obj["columns"]] if obj.get("columns") is not None else None, + "message": obj.get("message"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/tabular_export_request.py b/gooddata-api-client/gooddata_api_client/models/tabular_export_request.py new file mode 100644 index 000000000..685d6e42d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/tabular_export_request.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.custom_override import CustomOverride +from gooddata_api_client.models.settings import Settings +from typing import Optional, Set +from typing_extensions import Self + +class TabularExportRequest(BaseModel): + """ + Export request object describing the export properties and overrides for tabular exports. + """ # noqa: E501 + custom_override: Optional[CustomOverride] = Field(default=None, alias="customOverride") + execution_result: Optional[StrictStr] = Field(default=None, description="Execution result identifier.", alias="executionResult") + file_name: StrictStr = Field(description="Filename of downloaded file without extension.", alias="fileName") + format: StrictStr = Field(description="Expected file format.") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="Free-form JSON object") + related_dashboard_id: Optional[StrictStr] = Field(default=None, description="Analytical dashboard identifier. Optional identifier, which informs the system that the export is related to a specific dashboard.", alias="relatedDashboardId") + settings: Optional[Settings] = None + visualization_object: Optional[StrictStr] = Field(default=None, description="Visualization object identifier. Alternative to executionResult property.", alias="visualizationObject") + visualization_object_custom_filters: Optional[List[Dict[str, Any]]] = Field(default=None, description="Optional custom filters (as array of IFilter objects defined in UI SDK) to be applied when visualizationObject is given. Those filters override the original filters defined in the visualization.", alias="visualizationObjectCustomFilters") + __properties: ClassVar[List[str]] = ["customOverride", "executionResult", "fileName", "format", "metadata", "relatedDashboardId", "settings", "visualizationObject", "visualizationObjectCustomFilters"] + + @field_validator('format') + def format_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CSV', 'XLSX', 'HTML', 'PDF']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('CSV', 'XLSX', 'HTML', 'PDF')") + 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 TabularExportRequest 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 custom_override + if self.custom_override: + _dict['customOverride'] = self.custom_override.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TabularExportRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customOverride": CustomOverride.from_dict(obj["customOverride"]) if obj.get("customOverride") is not None else None, + "executionResult": obj.get("executionResult"), + "fileName": obj.get("fileName"), + "format": obj.get("format"), + "metadata": obj.get("metadata"), + "relatedDashboardId": obj.get("relatedDashboardId"), + "settings": Settings.from_dict(obj["settings"]) if obj.get("settings") is not None else None, + "visualizationObject": obj.get("visualizationObject"), + "visualizationObjectCustomFilters": obj.get("visualizationObjectCustomFilters") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/test_definition_request.py b/gooddata-api-client/gooddata_api_client/models/test_definition_request.py new file mode 100644 index 000000000..3d472159c --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/test_definition_request.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.data_source_parameter import DataSourceParameter +from typing import Optional, Set +from typing_extensions import Self + +class TestDefinitionRequest(BaseModel): + """ + A request containing all information for testing data source definition. + """ # noqa: E501 + client_id: Optional[StrictStr] = Field(default=None, description="Id for client based authentication for data sources which supports it.", alias="clientId") + client_secret: Optional[StrictStr] = Field(default=None, description="Secret for client based authentication for data sources which supports it.", alias="clientSecret") + parameters: Optional[List[DataSourceParameter]] = None + password: Optional[StrictStr] = Field(default=None, description="Database user password.") + private_key: Optional[StrictStr] = Field(default=None, description="Private key for data sources which supports key-pair authentication.", alias="privateKey") + private_key_passphrase: Optional[StrictStr] = Field(default=None, description="Passphrase for a encrypted version of a private key.", alias="privateKeyPassphrase") + var_schema: Optional[StrictStr] = Field(default=None, description="Database schema.", alias="schema") + token: Optional[StrictStr] = Field(default=None, description="Secret for token based authentication for data sources which supports it.") + type: StrictStr = Field(description="Type of database, where test should connect to.") + url: Optional[StrictStr] = Field(default=None, description="URL to database in JDBC format, where test should connect to.") + username: Optional[StrictStr] = Field(default=None, description="Database user name.") + __properties: ClassVar[List[str]] = ["clientId", "clientSecret", "parameters", "password", "privateKey", "privateKeyPassphrase", "schema", "token", "type", "url", "username"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['POSTGRESQL', 'REDSHIFT', 'VERTICA', 'SNOWFLAKE', 'ADS', 'BIGQUERY', 'MSSQL', 'PRESTO', 'DREMIO', 'DRILL', 'GREENPLUM', 'AZURESQL', 'SYNAPSESQL', 'DATABRICKS', 'GDSTORAGE', 'CLICKHOUSE', 'MYSQL', 'MARIADB', 'ORACLE', 'PINOT', 'SINGLESTORE', 'MOTHERDUCK', 'FLEXCONNECT', 'STARROCKS', 'ATHENA', 'MONGODB', 'CRATEDB', 'AILAKEHOUSE']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('POSTGRESQL', 'REDSHIFT', 'VERTICA', 'SNOWFLAKE', 'ADS', 'BIGQUERY', 'MSSQL', 'PRESTO', 'DREMIO', 'DRILL', 'GREENPLUM', 'AZURESQL', 'SYNAPSESQL', 'DATABRICKS', 'GDSTORAGE', 'CLICKHOUSE', 'MYSQL', 'MARIADB', 'ORACLE', 'PINOT', 'SINGLESTORE', 'MOTHERDUCK', 'FLEXCONNECT', 'STARROCKS', 'ATHENA', 'MONGODB', 'CRATEDB', 'AILAKEHOUSE')") + 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 TestDefinitionRequest 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 each item in parameters (list) + _items = [] + if self.parameters: + for _item_parameters in self.parameters: + if _item_parameters: + _items.append(_item_parameters.to_dict()) + _dict['parameters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TestDefinitionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret"), + "parameters": [DataSourceParameter.from_dict(_item) for _item in obj["parameters"]] if obj.get("parameters") is not None else None, + "password": obj.get("password"), + "privateKey": obj.get("privateKey"), + "privateKeyPassphrase": obj.get("privateKeyPassphrase"), + "schema": obj.get("schema"), + "token": obj.get("token"), + "type": obj.get("type"), + "url": obj.get("url"), + "username": obj.get("username") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/test_destination_request.py b/gooddata-api-client/gooddata_api_client/models/test_destination_request.py new file mode 100644 index 000000000..824b46c56 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/test_destination_request.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from gooddata_api_client.models.automation_external_recipient import AutomationExternalRecipient +from gooddata_api_client.models.declarative_notification_channel_destination import DeclarativeNotificationChannelDestination +from typing import Optional, Set +from typing_extensions import Self + +class TestDestinationRequest(BaseModel): + """ + Request body with notification channel destination to test. + """ # noqa: E501 + destination: DeclarativeNotificationChannelDestination + external_recipients: Optional[Annotated[List[AutomationExternalRecipient], Field(max_length=1)]] = Field(default=None, description="External recipients of the test result.", alias="externalRecipients") + __properties: ClassVar[List[str]] = ["destination", "externalRecipients"] + + 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 TestDestinationRequest 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 destination + if self.destination: + _dict['destination'] = self.destination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in external_recipients (list) + _items = [] + if self.external_recipients: + for _item_external_recipients in self.external_recipients: + if _item_external_recipients: + _items.append(_item_external_recipients.to_dict()) + _dict['externalRecipients'] = _items + # set to None if external_recipients (nullable) is None + # and model_fields_set contains the field + if self.external_recipients is None and "external_recipients" in self.model_fields_set: + _dict['externalRecipients'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TestDestinationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "destination": DeclarativeNotificationChannelDestination.from_dict(obj["destination"]) if obj.get("destination") is not None else None, + "externalRecipients": [AutomationExternalRecipient.from_dict(_item) for _item in obj["externalRecipients"]] if obj.get("externalRecipients") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/test_llm_provider_definition_request.py b/gooddata-api-client/gooddata_api_client/models/test_llm_provider_definition_request.py new file mode 100644 index 000000000..b58a0dc31 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/test_llm_provider_definition_request.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.llm_model import LlmModel +from gooddata_api_client.models.test_llm_provider_definition_request_provider_config import TestLlmProviderDefinitionRequestProviderConfig +from typing import Optional, Set +from typing_extensions import Self + +class TestLlmProviderDefinitionRequest(BaseModel): + """ + TestLlmProviderDefinitionRequest + """ # noqa: E501 + models: Optional[List[LlmModel]] = Field(default=None, description="Models to test.") + provider_config: TestLlmProviderDefinitionRequestProviderConfig = Field(alias="providerConfig") + __properties: ClassVar[List[str]] = ["models", "providerConfig"] + + 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 TestLlmProviderDefinitionRequest 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 each item in models (list) + _items = [] + if self.models: + for _item_models in self.models: + if _item_models: + _items.append(_item_models.to_dict()) + _dict['models'] = _items + # override the default output from pydantic by calling `to_dict()` of provider_config + if self.provider_config: + _dict['providerConfig'] = self.provider_config.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TestLlmProviderDefinitionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "models": [LlmModel.from_dict(_item) for _item in obj["models"]] if obj.get("models") is not None else None, + "providerConfig": TestLlmProviderDefinitionRequestProviderConfig.from_dict(obj["providerConfig"]) if obj.get("providerConfig") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/test_llm_provider_definition_request_provider_config.py b/gooddata-api-client/gooddata_api_client/models/test_llm_provider_definition_request_provider_config.py new file mode 100644 index 000000000..02306d0ca --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/test_llm_provider_definition_request_provider_config.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.aws_bedrock_provider_config import AwsBedrockProviderConfig +from gooddata_api_client.models.azure_foundry_provider_config import AzureFoundryProviderConfig +from gooddata_api_client.models.open_ai_provider_config import OpenAIProviderConfig +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +TESTLLMPROVIDERDEFINITIONREQUESTPROVIDERCONFIG_ONE_OF_SCHEMAS = ["AwsBedrockProviderConfig", "AzureFoundryProviderConfig", "OpenAIProviderConfig"] + +class TestLlmProviderDefinitionRequestProviderConfig(BaseModel): + """ + TestLlmProviderDefinitionRequestProviderConfig + """ + # data type: AwsBedrockProviderConfig + oneof_schema_1_validator: Optional[AwsBedrockProviderConfig] = None + # data type: AzureFoundryProviderConfig + oneof_schema_2_validator: Optional[AzureFoundryProviderConfig] = None + # data type: OpenAIProviderConfig + oneof_schema_3_validator: Optional[OpenAIProviderConfig] = None + actual_instance: Optional[Union[AwsBedrockProviderConfig, AzureFoundryProviderConfig, OpenAIProviderConfig]] = None + one_of_schemas: Set[str] = { "AwsBedrockProviderConfig", "AzureFoundryProviderConfig", "OpenAIProviderConfig" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 = TestLlmProviderDefinitionRequestProviderConfig.model_construct() + error_messages = [] + match = 0 + # validate data type: AwsBedrockProviderConfig + if not isinstance(v, AwsBedrockProviderConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `AwsBedrockProviderConfig`") + else: + match += 1 + # validate data type: AzureFoundryProviderConfig + if not isinstance(v, AzureFoundryProviderConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `AzureFoundryProviderConfig`") + else: + match += 1 + # validate data type: OpenAIProviderConfig + if not isinstance(v, OpenAIProviderConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIProviderConfig`") + else: + match += 1 + if match > 1: + # more than 1 match + # Accept first match for forward/backward compatibility + return v + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in TestLlmProviderDefinitionRequestProviderConfig with oneOf schemas: AwsBedrockProviderConfig, AzureFoundryProviderConfig, OpenAIProviderConfig. 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 + + # deserialize data into AwsBedrockProviderConfig + try: + if match == 0: + instance.actual_instance = AwsBedrockProviderConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AzureFoundryProviderConfig + try: + if match == 0: + instance.actual_instance = AzureFoundryProviderConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OpenAIProviderConfig + try: + if match == 0: + instance.actual_instance = OpenAIProviderConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # Accept first match for forward/backward compatibility + return instance + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into TestLlmProviderDefinitionRequestProviderConfig with oneOf schemas: AwsBedrockProviderConfig, AzureFoundryProviderConfig, OpenAIProviderConfig. 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], AwsBedrockProviderConfig, AzureFoundryProviderConfig, OpenAIProviderConfig]]: + """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/gooddata-api-client/gooddata_api_client/models/test_llm_provider_response.py b/gooddata-api-client/gooddata_api_client/models/test_llm_provider_response.py new file mode 100644 index 000000000..e71aa4d03 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/test_llm_provider_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.model_test_result import ModelTestResult +from typing import Optional, Set +from typing_extensions import Self + +class TestLlmProviderResponse(BaseModel): + """ + TestLlmProviderResponse + """ # noqa: E501 + model_results: List[ModelTestResult] = Field(description="Per-model test results.", alias="modelResults") + provider_message: StrictStr = Field(description="Message about the provider connectivity test.", alias="providerMessage") + provider_reachable: StrictBool = Field(description="Whether the LLM provider is reachable.", alias="providerReachable") + __properties: ClassVar[List[str]] = ["modelResults", "providerMessage", "providerReachable"] + + 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 TestLlmProviderResponse 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 each item in model_results (list) + _items = [] + if self.model_results: + for _item_model_results in self.model_results: + if _item_model_results: + _items.append(_item_model_results.to_dict()) + _dict['modelResults'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TestLlmProviderResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "modelResults": [ModelTestResult.from_dict(_item) for _item in obj["modelResults"]] if obj.get("modelResults") is not None else None, + "providerMessage": obj.get("providerMessage"), + "providerReachable": obj.get("providerReachable") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/test_notification.py b/gooddata-api-client/gooddata_api_client/models/test_notification.py new file mode 100644 index 000000000..f413a377f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/test_notification.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.notification_content import NotificationContent +from typing import Optional, Set +from typing_extensions import Self + +class TestNotification(NotificationContent): + """ + TestNotification + """ # noqa: E501 + message: StrictStr + __properties: ClassVar[List[str]] = ["type", "message"] + + 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 TestNotification 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 TestNotification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "message": obj.get("message") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/test_query_duration.py b/gooddata-api-client/gooddata_api_client/models/test_query_duration.py new file mode 100644 index 000000000..871abccf0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/test_query_duration.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 TestQueryDuration(BaseModel): + """ + A structure containing duration of the test queries run on a data source. It is omitted if an error happens. + """ # noqa: E501 + create_cache_table: Optional[StrictInt] = Field(default=None, description="Field containing duration of a test 'create table as select' query on a datasource. In milliseconds. The field is omitted if a data source doesn't support caching.", alias="createCacheTable") + simple_select: StrictInt = Field(description="Field containing duration of a test select query on a data source. In milliseconds.", alias="simpleSelect") + __properties: ClassVar[List[str]] = ["createCacheTable", "simpleSelect"] + + 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 TestQueryDuration 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 TestQueryDuration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createCacheTable": obj.get("createCacheTable"), + "simpleSelect": obj.get("simpleSelect") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/test_request.py b/gooddata-api-client/gooddata_api_client/models/test_request.py new file mode 100644 index 000000000..08d861113 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/test_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.data_source_parameter import DataSourceParameter +from typing import Optional, Set +from typing_extensions import Self + +class TestRequest(BaseModel): + """ + A request containing all information for testing existing data source. + """ # noqa: E501 + client_id: Optional[StrictStr] = Field(default=None, description="Id for client based authentication for data sources which supports it.", alias="clientId") + client_secret: Optional[StrictStr] = Field(default=None, description="Secret for client based authentication for data sources which supports it.", alias="clientSecret") + parameters: Optional[List[DataSourceParameter]] = None + password: Optional[StrictStr] = Field(default=None, description="Database user password.") + private_key: Optional[StrictStr] = Field(default=None, description="Private key for data sources which supports key-pair authentication.", alias="privateKey") + private_key_passphrase: Optional[StrictStr] = Field(default=None, description="Passphrase for a encrypted version of a private key.", alias="privateKeyPassphrase") + var_schema: Optional[StrictStr] = Field(default=None, description="Database schema.", alias="schema") + token: Optional[StrictStr] = Field(default=None, description="Secret for token based authentication for data sources which supports it.") + url: Optional[StrictStr] = Field(default=None, description="URL to database in JDBC format, where test should connect to.") + username: Optional[StrictStr] = Field(default=None, description="Database user name.") + __properties: ClassVar[List[str]] = ["clientId", "clientSecret", "parameters", "password", "privateKey", "privateKeyPassphrase", "schema", "token", "url", "username"] + + 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 TestRequest 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 each item in parameters (list) + _items = [] + if self.parameters: + for _item_parameters in self.parameters: + if _item_parameters: + _items.append(_item_parameters.to_dict()) + _dict['parameters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret"), + "parameters": [DataSourceParameter.from_dict(_item) for _item in obj["parameters"]] if obj.get("parameters") is not None else None, + "password": obj.get("password"), + "privateKey": obj.get("privateKey"), + "privateKeyPassphrase": obj.get("privateKeyPassphrase"), + "schema": obj.get("schema"), + "token": obj.get("token"), + "url": obj.get("url"), + "username": obj.get("username") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/test_response.py b/gooddata-api-client/gooddata_api_client/models/test_response.py new file mode 100644 index 000000000..c03271cab --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/test_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.test_query_duration import TestQueryDuration +from typing import Optional, Set +from typing_extensions import Self + +class TestResponse(BaseModel): + """ + Response from data source testing. + """ # noqa: E501 + error: Optional[StrictStr] = Field(default=None, description="Field containing more details in case of a failure. Details are available to a privileged user only.") + query_duration_millis: Optional[TestQueryDuration] = Field(default=None, alias="queryDurationMillis") + successful: StrictBool = Field(description="A flag indicating whether test passed or not.") + __properties: ClassVar[List[str]] = ["error", "queryDurationMillis", "successful"] + + 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 TestResponse 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 query_duration_millis + if self.query_duration_millis: + _dict['queryDurationMillis'] = self.query_duration_millis.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TestResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "queryDurationMillis": TestQueryDuration.from_dict(obj["queryDurationMillis"]) if obj.get("queryDurationMillis") is not None else None, + "successful": obj.get("successful") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/thought.py b/gooddata-api-client/gooddata_api_client/models/thought.py new file mode 100644 index 000000000..5b2cc3782 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/thought.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class Thought(BaseModel): + """ + Detailed thoughts/messages within this step. + """ # noqa: E501 + text: StrictStr = Field(description="The text content of this thought.") + __properties: ClassVar[List[str]] = ["text"] + + 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 Thought 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 Thought from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "text": obj.get("text") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/total.py b/gooddata-api-client/gooddata_api_client/models/total.py new file mode 100644 index 000000000..4a04759fd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/total.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.total_dimension import TotalDimension +from typing import Optional, Set +from typing_extensions import Self + +class Total(BaseModel): + """ + Definition of a total. There are two types of totals: grand totals and subtotals. Grand total data will be returned in a separate section of the result structure while subtotals are fully integrated into the main result data. The mechanism for this distinction is automatic and it's described in `TotalDimension` + """ # noqa: E501 + function: StrictStr = Field(description="Aggregation function to compute the total.") + local_identifier: StrictStr = Field(description="Total identification within this request. Used e.g. in sorting by a total.", alias="localIdentifier") + metric: StrictStr = Field(description="The metric for which the total will be computed") + total_dimensions: List[TotalDimension] = Field(alias="totalDimensions") + __properties: ClassVar[List[str]] = ["function", "localIdentifier", "metric", "totalDimensions"] + + @field_validator('function') + def function_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['SUM', 'MIN', 'MAX', 'AVG', 'MED', 'NAT']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('SUM', 'MIN', 'MAX', 'AVG', 'MED', 'NAT')") + 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 Total 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 each item in total_dimensions (list) + _items = [] + if self.total_dimensions: + for _item_total_dimensions in self.total_dimensions: + if _item_total_dimensions: + _items.append(_item_total_dimensions.to_dict()) + _dict['totalDimensions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Total from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function": obj.get("function"), + "localIdentifier": obj.get("localIdentifier"), + "metric": obj.get("metric"), + "totalDimensions": [TotalDimension.from_dict(_item) for _item in obj["totalDimensions"]] if obj.get("totalDimensions") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/total_dimension.py b/gooddata-api-client/gooddata_api_client/models/total_dimension.py new file mode 100644 index 000000000..bbf7d948e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/total_dimension.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class TotalDimension(BaseModel): + """ + A list of dimensions across which the total will be computed. Total headers for only these dimensions will be returned in the result. + """ # noqa: E501 + dimension_identifier: Annotated[str, Field(strict=True)] = Field(description="An identifier of a dimension for which the total will be computed.", alias="dimensionIdentifier") + total_dimension_items: List[StrictStr] = Field(description="List of dimension items which will be used for total computation. The total is a grand total in this dimension if the list is empty or it includes the first dimension item from the dimension definition, and its data and header will be returned in a separate `ExecutionResultGrandTotal` structure. Otherwise, it is a subtotal and the data will be integrated into the main result.", alias="totalDimensionItems") + __properties: ClassVar[List[str]] = ["dimensionIdentifier", "totalDimensionItems"] + + @field_validator('dimension_identifier') + def dimension_identifier_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[.a-zA-Z0-9_-]+$", value): + raise ValueError(r"must validate the regular expression /^[.a-zA-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 TotalDimension 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 TotalDimension from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dimensionIdentifier": obj.get("dimensionIdentifier"), + "totalDimensionItems": obj.get("totalDimensionItems") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/total_execution_result_header.py b/gooddata-api-client/gooddata_api_client/models/total_execution_result_header.py new file mode 100644 index 000000000..f3789fb5d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/total_execution_result_header.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.total_result_header import TotalResultHeader +from typing import Optional, Set +from typing_extensions import Self + +class TotalExecutionResultHeader(BaseModel): + """ + TotalExecutionResultHeader + """ # noqa: E501 + total_header: TotalResultHeader = Field(alias="totalHeader") + __properties: ClassVar[List[str]] = ["totalHeader"] + + 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 TotalExecutionResultHeader 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 total_header + if self.total_header: + _dict['totalHeader'] = self.total_header.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TotalExecutionResultHeader from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalHeader": TotalResultHeader.from_dict(obj["totalHeader"]) if obj.get("totalHeader") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/total_result_header.py b/gooddata-api-client/gooddata_api_client/models/total_result_header.py new file mode 100644 index 000000000..59547cd40 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/total_result_header.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class TotalResultHeader(BaseModel): + """ + Header containing the information related to a subtotal. + """ # noqa: E501 + function: StrictStr + __properties: ClassVar[List[str]] = ["function"] + + 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 TotalResultHeader 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 TotalResultHeader from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function": obj.get("function") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/trigger_automation_request.py b/gooddata-api-client/gooddata_api_client/models/trigger_automation_request.py new file mode 100644 index 000000000..768321fa9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/trigger_automation_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.ad_hoc_automation import AdHocAutomation +from typing import Optional, Set +from typing_extensions import Self + +class TriggerAutomationRequest(BaseModel): + """ + TriggerAutomationRequest + """ # noqa: E501 + automation: AdHocAutomation + __properties: ClassVar[List[str]] = ["automation"] + + 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 TriggerAutomationRequest 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 automation + if self.automation: + _dict['automation'] = self.automation.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TriggerAutomationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "automation": AdHocAutomation.from_dict(obj["automation"]) if obj.get("automation") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/trigger_quality_issues_calculation_response.py b/gooddata-api-client/gooddata_api_client/models/trigger_quality_issues_calculation_response.py new file mode 100644 index 000000000..642dc4255 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/trigger_quality_issues_calculation_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class TriggerQualityIssuesCalculationResponse(BaseModel): + """ + TriggerQualityIssuesCalculationResponse + """ # noqa: E501 + process_id: StrictStr = Field(description="Process ID for tracking the calculation status", alias="processId") + status: StrictStr = Field(description="Current status of the calculation") + __properties: ClassVar[List[str]] = ["processId", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['RUNNING', 'COMPLETED', 'FAILED', 'CANCELLED', 'DISABLED']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('RUNNING', 'COMPLETED', 'FAILED', 'CANCELLED', 'DISABLED')") + 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 TriggerQualityIssuesCalculationResponse 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 TriggerQualityIssuesCalculationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "processId": obj.get("processId"), + "status": obj.get("status") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/upsert_knowledge_document_request_dto.py b/gooddata-api-client/gooddata_api_client/models/upsert_knowledge_document_request_dto.py new file mode 100644 index 000000000..5ac93db8e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/upsert_knowledge_document_request_dto.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpsertKnowledgeDocumentRequestDto(BaseModel): + """ + UpsertKnowledgeDocumentRequestDto + """ # noqa: E501 + content: StrictStr + filename: StrictStr + page_boundaries: Optional[List[StrictInt]] = Field(default=None, alias="pageBoundaries") + scopes: Optional[List[StrictStr]] = None + title: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["content", "filename", "pageBoundaries", "scopes", "title"] + + 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 UpsertKnowledgeDocumentRequestDto 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 UpsertKnowledgeDocumentRequestDto from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "filename": obj.get("filename"), + "pageBoundaries": obj.get("pageBoundaries"), + "scopes": obj.get("scopes"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/upsert_knowledge_document_response_dto.py b/gooddata-api-client/gooddata_api_client/models/upsert_knowledge_document_response_dto.py new file mode 100644 index 000000000..4bc21e1a2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/upsert_knowledge_document_response_dto.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UpsertKnowledgeDocumentResponseDto(BaseModel): + """ + UpsertKnowledgeDocumentResponseDto + """ # noqa: E501 + filename: StrictStr + message: StrictStr + num_chunks: StrictInt = Field(alias="numChunks") + success: StrictBool + __properties: ClassVar[List[str]] = ["filename", "message", "numChunks", "success"] + + 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 UpsertKnowledgeDocumentResponseDto 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 UpsertKnowledgeDocumentResponseDto from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filename": obj.get("filename"), + "message": obj.get("message"), + "numChunks": obj.get("numChunks"), + "success": obj.get("success") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/user_assignee.py b/gooddata-api-client/gooddata_api_client/models/user_assignee.py new file mode 100644 index 000000000..f3687d191 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/user_assignee.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 UserAssignee(BaseModel): + """ + List of users + """ # noqa: E501 + email: Optional[StrictStr] = Field(default=None, description="User email address") + id: StrictStr + name: Optional[StrictStr] = Field(default=None, description="User name") + __properties: ClassVar[List[str]] = ["email", "id", "name"] + + 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 UserAssignee 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 UserAssignee from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "id": obj.get("id"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/user_context.py b/gooddata-api-client/gooddata_api_client/models/user_context.py new file mode 100644 index 000000000..4c717e5c0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/user_context.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.active_object_identification import ActiveObjectIdentification +from typing import Optional, Set +from typing_extensions import Self + +class UserContext(BaseModel): + """ + User context, which can affect the behavior of the underlying AI features. + """ # noqa: E501 + active_object: ActiveObjectIdentification = Field(alias="activeObject") + __properties: ClassVar[List[str]] = ["activeObject"] + + 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 UserContext 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 active_object + if self.active_object: + _dict['activeObject'] = self.active_object.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserContext from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "activeObject": ActiveObjectIdentification.from_dict(obj["activeObject"]) if obj.get("activeObject") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/user_group_assignee.py b/gooddata-api-client/gooddata_api_client/models/user_group_assignee.py new file mode 100644 index 000000000..c1b2ef2d3 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/user_group_assignee.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 UserGroupAssignee(BaseModel): + """ + List of user groups + """ # noqa: E501 + id: StrictStr + name: Optional[StrictStr] = Field(default=None, description="User group name") + __properties: ClassVar[List[str]] = ["id", "name"] + + 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 UserGroupAssignee 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 UserGroupAssignee 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/user_group_identifier.py b/gooddata-api-client/gooddata_api_client/models/user_group_identifier.py new file mode 100644 index 000000000..dcddbb8bb --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/user_group_identifier.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 UserGroupIdentifier(BaseModel): + """ + A list of groups where user is a member + """ # noqa: E501 + id: StrictStr + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "name"] + + 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 UserGroupIdentifier 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 UserGroupIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/user_group_permission.py b/gooddata-api-client/gooddata_api_client/models/user_group_permission.py new file mode 100644 index 000000000..deddb7ccf --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/user_group_permission.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.granted_permission import GrantedPermission +from typing import Optional, Set +from typing_extensions import Self + +class UserGroupPermission(BaseModel): + """ + List of user groups + """ # noqa: E501 + id: StrictStr + name: Optional[StrictStr] = Field(default=None, description="Name of the user group") + permissions: Optional[List[GrantedPermission]] = Field(default=None, description="Permissions granted to the user group") + __properties: ClassVar[List[str]] = ["id", "name", "permissions"] + + 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 UserGroupPermission 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 each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserGroupPermission 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"), + "permissions": [GrantedPermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/user_management_data_source_permission_assignment.py b/gooddata-api-client/gooddata_api_client/models/user_management_data_source_permission_assignment.py new file mode 100644 index 000000000..febf65c0b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/user_management_data_source_permission_assignment.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class UserManagementDataSourcePermissionAssignment(BaseModel): + """ + Datasource permission assignments for users and userGroups + """ # noqa: E501 + id: StrictStr = Field(description="Id of the datasource") + name: Optional[StrictStr] = Field(default=None, description="Name of the datasource") + permissions: List[StrictStr] + __properties: ClassVar[List[str]] = ["id", "name", "permissions"] + + @field_validator('permissions') + def permissions_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['MANAGE', 'USE']): + raise ValueError("each list item must be one of ('MANAGE', 'USE')") + 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 UserManagementDataSourcePermissionAssignment 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. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "name", + ]) + + _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 UserManagementDataSourcePermissionAssignment 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"), + "permissions": obj.get("permissions") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/user_management_permission_assignments.py b/gooddata-api-client/gooddata_api_client/models/user_management_permission_assignments.py new file mode 100644 index 000000000..2d7adb2d6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/user_management_permission_assignments.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.user_management_data_source_permission_assignment import UserManagementDataSourcePermissionAssignment +from gooddata_api_client.models.user_management_workspace_permission_assignment import UserManagementWorkspacePermissionAssignment +from typing import Optional, Set +from typing_extensions import Self + +class UserManagementPermissionAssignments(BaseModel): + """ + UserManagementPermissionAssignments + """ # noqa: E501 + data_sources: List[UserManagementDataSourcePermissionAssignment] = Field(alias="dataSources") + workspaces: List[UserManagementWorkspacePermissionAssignment] + __properties: ClassVar[List[str]] = ["dataSources", "workspaces"] + + 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 UserManagementPermissionAssignments 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 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 each item in workspaces (list) + _items = [] + if self.workspaces: + for _item_workspaces in self.workspaces: + if _item_workspaces: + _items.append(_item_workspaces.to_dict()) + _dict['workspaces'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserManagementPermissionAssignments from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataSources": [UserManagementDataSourcePermissionAssignment.from_dict(_item) for _item in obj["dataSources"]] if obj.get("dataSources") is not None else None, + "workspaces": [UserManagementWorkspacePermissionAssignment.from_dict(_item) for _item in obj["workspaces"]] if obj.get("workspaces") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/user_management_user_group_member.py b/gooddata-api-client/gooddata_api_client/models/user_management_user_group_member.py new file mode 100644 index 000000000..43d783065 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/user_management_user_group_member.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 UserManagementUserGroupMember(BaseModel): + """ + UserManagementUserGroupMember + """ # noqa: E501 + id: StrictStr + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "name"] + + 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 UserManagementUserGroupMember 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. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "name", + ]) + + _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 UserManagementUserGroupMember 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/user_management_user_group_members.py b/gooddata-api-client/gooddata_api_client/models/user_management_user_group_members.py new file mode 100644 index 000000000..7607430ca --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/user_management_user_group_members.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.user_management_user_group_member import UserManagementUserGroupMember +from typing import Optional, Set +from typing_extensions import Self + +class UserManagementUserGroupMembers(BaseModel): + """ + UserManagementUserGroupMembers + """ # noqa: E501 + members: List[UserManagementUserGroupMember] + __properties: ClassVar[List[str]] = ["members"] + + 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 UserManagementUserGroupMembers 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 each item in members (list) + _items = [] + if self.members: + for _item_members in self.members: + if _item_members: + _items.append(_item_members.to_dict()) + _dict['members'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserManagementUserGroupMembers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "members": [UserManagementUserGroupMember.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/user_management_user_groups.py b/gooddata-api-client/gooddata_api_client/models/user_management_user_groups.py new file mode 100644 index 000000000..a93e871a4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/user_management_user_groups.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.user_management_user_groups_item import UserManagementUserGroupsItem +from typing import Optional, Set +from typing_extensions import Self + +class UserManagementUserGroups(BaseModel): + """ + UserManagementUserGroups + """ # noqa: E501 + total_count: StrictInt = Field(description="Total number of groups", alias="totalCount") + user_groups: List[UserManagementUserGroupsItem] = Field(alias="userGroups") + __properties: ClassVar[List[str]] = ["totalCount", "userGroups"] + + 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 UserManagementUserGroups 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 each item in user_groups (list) + _items = [] + if self.user_groups: + for _item_user_groups in self.user_groups: + if _item_user_groups: + _items.append(_item_user_groups.to_dict()) + _dict['userGroups'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserManagementUserGroups from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalCount": obj.get("totalCount"), + "userGroups": [UserManagementUserGroupsItem.from_dict(_item) for _item in obj["userGroups"]] if obj.get("userGroups") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/user_management_user_groups_item.py b/gooddata-api-client/gooddata_api_client/models/user_management_user_groups_item.py new file mode 100644 index 000000000..e4abb9da1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/user_management_user_groups_item.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.user_management_data_source_permission_assignment import UserManagementDataSourcePermissionAssignment +from gooddata_api_client.models.user_management_workspace_permission_assignment import UserManagementWorkspacePermissionAssignment +from typing import Optional, Set +from typing_extensions import Self + +class UserManagementUserGroupsItem(BaseModel): + """ + List of groups + """ # noqa: E501 + data_sources: List[UserManagementDataSourcePermissionAssignment] = Field(alias="dataSources") + id: StrictStr + name: Optional[StrictStr] = Field(default=None, description="Group name") + organization_admin: StrictBool = Field(description="Is group organization admin", alias="organizationAdmin") + user_count: StrictInt = Field(description="The number of users belonging to the group", alias="userCount") + workspaces: List[UserManagementWorkspacePermissionAssignment] + __properties: ClassVar[List[str]] = ["dataSources", "id", "name", "organizationAdmin", "userCount", "workspaces"] + + 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 UserManagementUserGroupsItem 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 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 each item in workspaces (list) + _items = [] + if self.workspaces: + for _item_workspaces in self.workspaces: + if _item_workspaces: + _items.append(_item_workspaces.to_dict()) + _dict['workspaces'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserManagementUserGroupsItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataSources": [UserManagementDataSourcePermissionAssignment.from_dict(_item) for _item in obj["dataSources"]] if obj.get("dataSources") is not None else None, + "id": obj.get("id"), + "name": obj.get("name"), + "organizationAdmin": obj.get("organizationAdmin"), + "userCount": obj.get("userCount"), + "workspaces": [UserManagementWorkspacePermissionAssignment.from_dict(_item) for _item in obj["workspaces"]] if obj.get("workspaces") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/user_management_users.py b/gooddata-api-client/gooddata_api_client/models/user_management_users.py new file mode 100644 index 000000000..690dee6dc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/user_management_users.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.user_management_users_item import UserManagementUsersItem +from typing import Optional, Set +from typing_extensions import Self + +class UserManagementUsers(BaseModel): + """ + UserManagementUsers + """ # noqa: E501 + total_count: StrictInt = Field(description="The total number of users is based on applied filters.", alias="totalCount") + users: List[UserManagementUsersItem] + __properties: ClassVar[List[str]] = ["totalCount", "users"] + + 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 UserManagementUsers 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 each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserManagementUsers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalCount": obj.get("totalCount"), + "users": [UserManagementUsersItem.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/user_management_users_item.py b/gooddata-api-client/gooddata_api_client/models/user_management_users_item.py new file mode 100644 index 000000000..915e71b47 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/user_management_users_item.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.user_group_identifier import UserGroupIdentifier +from gooddata_api_client.models.user_management_data_source_permission_assignment import UserManagementDataSourcePermissionAssignment +from gooddata_api_client.models.user_management_workspace_permission_assignment import UserManagementWorkspacePermissionAssignment +from typing import Optional, Set +from typing_extensions import Self + +class UserManagementUsersItem(BaseModel): + """ + List of users + """ # noqa: E501 + data_sources: List[UserManagementDataSourcePermissionAssignment] = Field(alias="dataSources") + email: Optional[StrictStr] = Field(default=None, description="User email address") + id: StrictStr + name: Optional[StrictStr] = Field(default=None, description="User name") + organization_admin: StrictBool = Field(description="Is user organization admin", alias="organizationAdmin") + user_groups: List[UserGroupIdentifier] = Field(alias="userGroups") + workspaces: List[UserManagementWorkspacePermissionAssignment] + __properties: ClassVar[List[str]] = ["dataSources", "email", "id", "name", "organizationAdmin", "userGroups", "workspaces"] + + 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 UserManagementUsersItem 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 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 each item in user_groups (list) + _items = [] + if self.user_groups: + for _item_user_groups in self.user_groups: + if _item_user_groups: + _items.append(_item_user_groups.to_dict()) + _dict['userGroups'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in workspaces (list) + _items = [] + if self.workspaces: + for _item_workspaces in self.workspaces: + if _item_workspaces: + _items.append(_item_workspaces.to_dict()) + _dict['workspaces'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserManagementUsersItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataSources": [UserManagementDataSourcePermissionAssignment.from_dict(_item) for _item in obj["dataSources"]] if obj.get("dataSources") is not None else None, + "email": obj.get("email"), + "id": obj.get("id"), + "name": obj.get("name"), + "organizationAdmin": obj.get("organizationAdmin"), + "userGroups": [UserGroupIdentifier.from_dict(_item) for _item in obj["userGroups"]] if obj.get("userGroups") is not None else None, + "workspaces": [UserManagementWorkspacePermissionAssignment.from_dict(_item) for _item in obj["workspaces"]] if obj.get("workspaces") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/user_management_workspace_permission_assignment.py b/gooddata-api-client/gooddata_api_client/models/user_management_workspace_permission_assignment.py new file mode 100644 index 000000000..e561b76a9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/user_management_workspace_permission_assignment.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 import Optional, Set +from typing_extensions import Self + +class UserManagementWorkspacePermissionAssignment(BaseModel): + """ + Workspace permission assignments for users and userGroups + """ # noqa: E501 + hierarchy_permissions: List[StrictStr] = Field(alias="hierarchyPermissions") + id: StrictStr + name: Optional[StrictStr] = None + permissions: List[StrictStr] + __properties: ClassVar[List[str]] = ["hierarchyPermissions", "id", "name", "permissions"] + + @field_validator('hierarchy_permissions') + def hierarchy_permissions_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['MANAGE', 'ANALYZE', 'EXPORT', 'EXPORT_TABULAR', 'EXPORT_PDF', 'CREATE_AUTOMATION', 'USE_AI_ASSISTANT', 'WRITE_KNOWLEDGE_DOCUMENTS', 'READ_KNOWLEDGE_DOCUMENTS', 'CREATE_FILTER_VIEW', 'VIEW']): + raise ValueError("each list item must be one of ('MANAGE', 'ANALYZE', 'EXPORT', 'EXPORT_TABULAR', 'EXPORT_PDF', 'CREATE_AUTOMATION', 'USE_AI_ASSISTANT', 'WRITE_KNOWLEDGE_DOCUMENTS', 'READ_KNOWLEDGE_DOCUMENTS', 'CREATE_FILTER_VIEW', 'VIEW')") + return value + + @field_validator('permissions') + def permissions_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['MANAGE', 'ANALYZE', 'EXPORT', 'EXPORT_TABULAR', 'EXPORT_PDF', 'CREATE_AUTOMATION', 'USE_AI_ASSISTANT', 'WRITE_KNOWLEDGE_DOCUMENTS', 'READ_KNOWLEDGE_DOCUMENTS', 'CREATE_FILTER_VIEW', 'VIEW']): + raise ValueError("each list item must be one of ('MANAGE', 'ANALYZE', 'EXPORT', 'EXPORT_TABULAR', 'EXPORT_PDF', 'CREATE_AUTOMATION', 'USE_AI_ASSISTANT', 'WRITE_KNOWLEDGE_DOCUMENTS', 'READ_KNOWLEDGE_DOCUMENTS', 'CREATE_FILTER_VIEW', 'VIEW')") + 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 UserManagementWorkspacePermissionAssignment 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. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "name", + ]) + + _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 UserManagementWorkspacePermissionAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hierarchyPermissions": obj.get("hierarchyPermissions"), + "id": obj.get("id"), + "name": obj.get("name"), + "permissions": obj.get("permissions") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/user_permission.py b/gooddata-api-client/gooddata_api_client/models/user_permission.py new file mode 100644 index 000000000..e404a0088 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/user_permission.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.granted_permission import GrantedPermission +from typing import Optional, Set +from typing_extensions import Self + +class UserPermission(BaseModel): + """ + List of users + """ # noqa: E501 + email: Optional[StrictStr] = Field(default=None, description="User email address") + id: StrictStr + name: Optional[StrictStr] = Field(default=None, description="Name of user") + permissions: Optional[List[GrantedPermission]] = Field(default=None, description="Permissions granted to the user") + __properties: ClassVar[List[str]] = ["email", "id", "name", "permissions"] + + 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 UserPermission 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 each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserPermission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "id": obj.get("id"), + "name": obj.get("name"), + "permissions": [GrantedPermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/validate_by_item.py b/gooddata-api-client/gooddata_api_client/models/validate_by_item.py new file mode 100644 index 000000000..96416fc3f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/validate_by_item.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ValidateByItem(BaseModel): + """ + ValidateByItem + """ # noqa: E501 + id: StrictStr = Field(description="Specifies entity used for valid elements computation.") + type: Annotated[str, Field(strict=True)] = Field(description="Specifies entity type which could be label, attribute, fact, or metric.") + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(label)|(attribute)|(fact)|(metric)$", value): + raise ValueError(r"must validate the regular expression /^(label)|(attribute)|(fact)|(metric)$/") + 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 ValidateByItem 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 ValidateByItem 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/validate_llm_endpoint_by_id_request.py b/gooddata-api-client/gooddata_api_client/models/validate_llm_endpoint_by_id_request.py new file mode 100644 index 000000000..218c13de1 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/validate_llm_endpoint_by_id_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 ValidateLLMEndpointByIdRequest(BaseModel): + """ + ValidateLLMEndpointByIdRequest + """ # noqa: E501 + base_url: Optional[StrictStr] = Field(default=None, description="Base URL for the LLM endpoint validation", alias="baseUrl") + llm_model: Optional[StrictStr] = Field(default=None, description="LLM model for the LLM endpoint validation", alias="llmModel") + llm_organization: Optional[StrictStr] = Field(default=None, description="Organization name for the LLM endpoint validation", alias="llmOrganization") + provider: Optional[StrictStr] = Field(default=None, description="Provider for the LLM endpoint validation") + token: Optional[StrictStr] = Field(default=None, description="Token for the LLM endpoint validation") + __properties: ClassVar[List[str]] = ["baseUrl", "llmModel", "llmOrganization", "provider", "token"] + + 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 ValidateLLMEndpointByIdRequest 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 ValidateLLMEndpointByIdRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "baseUrl": obj.get("baseUrl"), + "llmModel": obj.get("llmModel"), + "llmOrganization": obj.get("llmOrganization"), + "provider": obj.get("provider"), + "token": obj.get("token") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/validate_llm_endpoint_request.py b/gooddata-api-client/gooddata_api_client/models/validate_llm_endpoint_request.py new file mode 100644 index 000000000..a656535b6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/validate_llm_endpoint_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 ValidateLLMEndpointRequest(BaseModel): + """ + ValidateLLMEndpointRequest + """ # noqa: E501 + base_url: Optional[StrictStr] = Field(default=None, description="Base URL for the LLM endpoint validation", alias="baseUrl") + llm_model: Optional[StrictStr] = Field(default=None, description="LLM model for the LLM endpoint validation", alias="llmModel") + llm_organization: Optional[StrictStr] = Field(default=None, description="Organization name for the LLM endpoint validation", alias="llmOrganization") + provider: StrictStr = Field(description="Provider for the LLM endpoint validation") + token: StrictStr = Field(description="Token for the LLM endpoint validation") + __properties: ClassVar[List[str]] = ["baseUrl", "llmModel", "llmOrganization", "provider", "token"] + + 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 ValidateLLMEndpointRequest 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 ValidateLLMEndpointRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "baseUrl": obj.get("baseUrl"), + "llmModel": obj.get("llmModel"), + "llmOrganization": obj.get("llmOrganization"), + "provider": obj.get("provider"), + "token": obj.get("token") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/validate_llm_endpoint_response.py b/gooddata-api-client/gooddata_api_client/models/validate_llm_endpoint_response.py new file mode 100644 index 000000000..7a0ebc9df --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/validate_llm_endpoint_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ValidateLLMEndpointResponse(BaseModel): + """ + ValidateLLMEndpointResponse + """ # noqa: E501 + message: StrictStr = Field(description="Additional message about the LLM endpoint validation") + successful: StrictBool = Field(description="Whether the LLM endpoint validation was successful") + __properties: ClassVar[List[str]] = ["message", "successful"] + + 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 ValidateLLMEndpointResponse 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 ValidateLLMEndpointResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "successful": obj.get("successful") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/value.py b/gooddata-api-client/gooddata_api_client/models/value.py new file mode 100644 index 000000000..a97dc6bd2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/value.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class Value(BaseModel): + """ + Value + """ # noqa: E501 + value: Union[StrictFloat, StrictInt] = Field(description="Value of the alert threshold to compare the metric to.") + __properties: ClassVar[List[str]] = ["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 Value 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 Value from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "value": obj.get("value") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/visible_filter.py b/gooddata-api-client/gooddata_api_client/models/visible_filter.py new file mode 100644 index 000000000..c9bd80257 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/visible_filter.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class VisibleFilter(BaseModel): + """ + VisibleFilter + """ # noqa: E501 + is_all_time_date_filter: Optional[StrictBool] = Field(default=False, description="Indicates if the filter is an all-time date filter. Such a filter is not included in report computation, so there is no filter with the same 'localIdentifier' to be found. In such cases, this flag is used to inform the server to not search for the filter in the definitions and include it anyways.", alias="isAllTimeDateFilter") + local_identifier: Optional[StrictStr] = Field(default=None, alias="localIdentifier") + title: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["isAllTimeDateFilter", "localIdentifier", "title"] + + 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 VisibleFilter 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 VisibleFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "isAllTimeDateFilter": obj.get("isAllTimeDateFilter") if obj.get("isAllTimeDateFilter") is not None else False, + "localIdentifier": obj.get("localIdentifier"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/visual_export_request.py b/gooddata-api-client/gooddata_api_client/models/visual_export_request.py new file mode 100644 index 000000000..5f04c980e --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/visual_export_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 VisualExportRequest(BaseModel): + """ + Export request object describing the export properties and metadata for dashboard PDF exports. + """ # noqa: E501 + dashboard_id: StrictStr = Field(description="Dashboard identifier", alias="dashboardId") + file_name: StrictStr = Field(description="File name to be used for retrieving the pdf document.", alias="fileName") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="Metadata definition in free-form JSON format.") + __properties: ClassVar[List[str]] = ["dashboardId", "fileName", "metadata"] + + 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 VisualExportRequest 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 VisualExportRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dashboardId": obj.get("dashboardId"), + "fileName": obj.get("fileName"), + "metadata": obj.get("metadata") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/visualization_config.py b/gooddata-api-client/gooddata_api_client/models/visualization_config.py new file mode 100644 index 000000000..9e25ca6a5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/visualization_config.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.anomaly_detection_config import AnomalyDetectionConfig +from gooddata_api_client.models.clustering_config import ClusteringConfig +from gooddata_api_client.models.forecast_config import ForecastConfig +from gooddata_api_client.models.what_if_scenario_config import WhatIfScenarioConfig +from typing import Optional, Set +from typing_extensions import Self + +class VisualizationConfig(BaseModel): + """ + Visualization config for smart-function rendering. + """ # noqa: E501 + anomaly_detection: Optional[AnomalyDetectionConfig] = Field(default=None, alias="anomalyDetection") + clustering: Optional[ClusteringConfig] = None + forecast: Optional[ForecastConfig] = None + what_if: Optional[WhatIfScenarioConfig] = Field(default=None, alias="whatIf") + __properties: ClassVar[List[str]] = ["anomalyDetection", "clustering", "forecast", "whatIf"] + + 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 VisualizationConfig 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 anomaly_detection + if self.anomaly_detection: + _dict['anomalyDetection'] = self.anomaly_detection.to_dict() + # override the default output from pydantic by calling `to_dict()` of clustering + if self.clustering: + _dict['clustering'] = self.clustering.to_dict() + # override the default output from pydantic by calling `to_dict()` of forecast + if self.forecast: + _dict['forecast'] = self.forecast.to_dict() + # override the default output from pydantic by calling `to_dict()` of what_if + if self.what_if: + _dict['whatIf'] = self.what_if.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VisualizationConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "anomalyDetection": AnomalyDetectionConfig.from_dict(obj["anomalyDetection"]) if obj.get("anomalyDetection") is not None else None, + "clustering": ClusteringConfig.from_dict(obj["clustering"]) if obj.get("clustering") is not None else None, + "forecast": ForecastConfig.from_dict(obj["forecast"]) if obj.get("forecast") is not None else None, + "whatIf": WhatIfScenarioConfig.from_dict(obj["whatIf"]) if obj.get("whatIf") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/webhook.py b/gooddata-api-client/gooddata_api_client/models/webhook.py new file mode 100644 index 000000000..165ae6e78 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/webhook.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, 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 Webhook(BaseModel): + """ + Webhook destination for notifications. The property url is required on create and update. + """ # noqa: E501 + has_secret_key: Optional[StrictBool] = Field(default=None, description="Flag indicating if webhook has a hmac secret key.", alias="hasSecretKey") + has_token: Optional[StrictBool] = Field(default=None, description="Flag indicating if webhook has a token.", alias="hasToken") + secret_key: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Hmac secret key for the webhook signature.", alias="secretKey") + token: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="Bearer token for the webhook.") + type: StrictStr = Field(description="The destination type.") + url: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The webhook URL.") + __properties: ClassVar[List[str]] = ["hasSecretKey", "hasToken", "secretKey", "token", "type", "url"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['WEBHOOK']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('WEBHOOK')") + return value + + @field_validator('url') + def url_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"https?\:\/\/.*", value): + raise ValueError(r"must validate the regular expression /https?\:\/\/.*/") + 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 Webhook 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. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "has_secret_key", + "has_token", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if has_secret_key (nullable) is None + # and model_fields_set contains the field + if self.has_secret_key is None and "has_secret_key" in self.model_fields_set: + _dict['hasSecretKey'] = None + + # set to None if has_token (nullable) is None + # and model_fields_set contains the field + if self.has_token is None and "has_token" in self.model_fields_set: + _dict['hasToken'] = None + + # set to None if secret_key (nullable) is None + # and model_fields_set contains the field + if self.secret_key is None and "secret_key" in self.model_fields_set: + _dict['secretKey'] = None + + # set to None if token (nullable) is None + # and model_fields_set contains the field + if self.token is None and "token" in self.model_fields_set: + _dict['token'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Webhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hasSecretKey": obj.get("hasSecretKey"), + "hasToken": obj.get("hasToken"), + "secretKey": obj.get("secretKey"), + "token": obj.get("token"), + "type": obj.get("type"), + "url": obj.get("url") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/webhook_automation_info.py b/gooddata-api-client/gooddata_api_client/models/webhook_automation_info.py new file mode 100644 index 000000000..07fa14cfc --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/webhook_automation_info.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class WebhookAutomationInfo(BaseModel): + """ + WebhookAutomationInfo + """ # noqa: E501 + dashboard_title: Optional[StrictStr] = Field(default=None, alias="dashboardTitle") + dashboard_url: StrictStr = Field(alias="dashboardURL") + id: StrictStr + is_custom_dashboard_url: StrictBool = Field(alias="isCustomDashboardURL") + title: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["dashboardTitle", "dashboardURL", "id", "isCustomDashboardURL", "title"] + + 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 WebhookAutomationInfo 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 WebhookAutomationInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dashboardTitle": obj.get("dashboardTitle"), + "dashboardURL": obj.get("dashboardURL"), + "id": obj.get("id"), + "isCustomDashboardURL": obj.get("isCustomDashboardURL"), + "title": obj.get("title") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/webhook_message.py b/gooddata-api-client/gooddata_api_client/models/webhook_message.py new file mode 100644 index 000000000..80b52a2e2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/webhook_message.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.webhook_message_data import WebhookMessageData +from typing import Optional, Set +from typing_extensions import Self + +class WebhookMessage(BaseModel): + """ + WebhookMessage + """ # noqa: E501 + data: WebhookMessageData + timestamp: datetime + type: StrictStr + __properties: ClassVar[List[str]] = ["data", "timestamp", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['automation-task.completed', 'automation-task.limit-exceeded']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('automation-task.completed', 'automation-task.limit-exceeded')") + 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 WebhookMessage 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 data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebhookMessage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": WebhookMessageData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "timestamp": obj.get("timestamp"), + "type": obj.get("type") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/webhook_message_data.py b/gooddata-api-client/gooddata_api_client/models/webhook_message_data.py new file mode 100644 index 000000000..44971edd7 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/webhook_message_data.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List, Optional +from gooddata_api_client.models.alert_description import AlertDescription +from gooddata_api_client.models.export_result import ExportResult +from gooddata_api_client.models.notification_filter import NotificationFilter +from gooddata_api_client.models.webhook_automation_info import WebhookAutomationInfo +from gooddata_api_client.models.webhook_recipient import WebhookRecipient +from typing import Optional, Set +from typing_extensions import Self + +class WebhookMessageData(BaseModel): + """ + WebhookMessageData + """ # noqa: E501 + alert: Optional[AlertDescription] = None + automation: WebhookAutomationInfo + dashboard_tabular_exports: Optional[List[ExportResult]] = Field(default=None, alias="dashboardTabularExports") + details: Optional[Dict[str, StrictStr]] = None + filters: Optional[List[NotificationFilter]] = None + image_exports: Optional[List[ExportResult]] = Field(default=None, alias="imageExports") + notification_source: Optional[StrictStr] = Field(default=None, alias="notificationSource") + raw_exports: Optional[List[ExportResult]] = Field(default=None, alias="rawExports") + recipients: Optional[List[WebhookRecipient]] = None + remaining_action_count: Optional[StrictInt] = Field(default=None, alias="remainingActionCount") + slides_exports: Optional[List[ExportResult]] = Field(default=None, alias="slidesExports") + tabular_exports: Optional[List[ExportResult]] = Field(default=None, alias="tabularExports") + visual_exports: Optional[List[ExportResult]] = Field(default=None, alias="visualExports") + __properties: ClassVar[List[str]] = ["alert", "automation", "dashboardTabularExports", "details", "filters", "imageExports", "notificationSource", "rawExports", "recipients", "remainingActionCount", "slidesExports", "tabularExports", "visualExports"] + + 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 WebhookMessageData 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 alert + if self.alert: + _dict['alert'] = self.alert.to_dict() + # override the default output from pydantic by calling `to_dict()` of automation + if self.automation: + _dict['automation'] = self.automation.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in dashboard_tabular_exports (list) + _items = [] + if self.dashboard_tabular_exports: + for _item_dashboard_tabular_exports in self.dashboard_tabular_exports: + if _item_dashboard_tabular_exports: + _items.append(_item_dashboard_tabular_exports.to_dict()) + _dict['dashboardTabularExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in image_exports (list) + _items = [] + if self.image_exports: + for _item_image_exports in self.image_exports: + if _item_image_exports: + _items.append(_item_image_exports.to_dict()) + _dict['imageExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in raw_exports (list) + _items = [] + if self.raw_exports: + for _item_raw_exports in self.raw_exports: + if _item_raw_exports: + _items.append(_item_raw_exports.to_dict()) + _dict['rawExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in recipients (list) + _items = [] + if self.recipients: + for _item_recipients in self.recipients: + if _item_recipients: + _items.append(_item_recipients.to_dict()) + _dict['recipients'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in slides_exports (list) + _items = [] + if self.slides_exports: + for _item_slides_exports in self.slides_exports: + if _item_slides_exports: + _items.append(_item_slides_exports.to_dict()) + _dict['slidesExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in tabular_exports (list) + _items = [] + if self.tabular_exports: + for _item_tabular_exports in self.tabular_exports: + if _item_tabular_exports: + _items.append(_item_tabular_exports.to_dict()) + _dict['tabularExports'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in visual_exports (list) + _items = [] + if self.visual_exports: + for _item_visual_exports in self.visual_exports: + if _item_visual_exports: + _items.append(_item_visual_exports.to_dict()) + _dict['visualExports'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebhookMessageData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alert": AlertDescription.from_dict(obj["alert"]) if obj.get("alert") is not None else None, + "automation": WebhookAutomationInfo.from_dict(obj["automation"]) if obj.get("automation") is not None else None, + "dashboardTabularExports": [ExportResult.from_dict(_item) for _item in obj["dashboardTabularExports"]] if obj.get("dashboardTabularExports") is not None else None, + "details": obj.get("details"), + "filters": [NotificationFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "imageExports": [ExportResult.from_dict(_item) for _item in obj["imageExports"]] if obj.get("imageExports") is not None else None, + "notificationSource": obj.get("notificationSource"), + "rawExports": [ExportResult.from_dict(_item) for _item in obj["rawExports"]] if obj.get("rawExports") is not None else None, + "recipients": [WebhookRecipient.from_dict(_item) for _item in obj["recipients"]] if obj.get("recipients") is not None else None, + "remainingActionCount": obj.get("remainingActionCount"), + "slidesExports": [ExportResult.from_dict(_item) for _item in obj["slidesExports"]] if obj.get("slidesExports") is not None else None, + "tabularExports": [ExportResult.from_dict(_item) for _item in obj["tabularExports"]] if obj.get("tabularExports") is not None else None, + "visualExports": [ExportResult.from_dict(_item) for _item in obj["visualExports"]] if obj.get("visualExports") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/webhook_recipient.py b/gooddata-api-client/gooddata_api_client/models/webhook_recipient.py new file mode 100644 index 000000000..c28c8a7b6 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/webhook_recipient.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class WebhookRecipient(BaseModel): + """ + WebhookRecipient + """ # noqa: E501 + email: StrictStr + id: StrictStr + __properties: ClassVar[List[str]] = ["email", "id"] + + 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 WebhookRecipient 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 WebhookRecipient from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "id": obj.get("id") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/what_if_measure_adjustment_config.py b/gooddata-api-client/gooddata_api_client/models/what_if_measure_adjustment_config.py new file mode 100644 index 000000000..f554b46b5 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/what_if_measure_adjustment_config.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class WhatIfMeasureAdjustmentConfig(BaseModel): + """ + Measure adjustments for this scenario + """ # noqa: E501 + metric_id: StrictStr = Field(description="ID of the metric or fact to adjust", alias="metricId") + metric_type: StrictStr = Field(description="Type: metric or fact", alias="metricType") + scenario_maql: StrictStr = Field(description="Alternative MAQL expression for this scenario", alias="scenarioMaql") + __properties: ClassVar[List[str]] = ["metricId", "metricType", "scenarioMaql"] + + 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 WhatIfMeasureAdjustmentConfig 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 WhatIfMeasureAdjustmentConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "metricId": obj.get("metricId"), + "metricType": obj.get("metricType"), + "scenarioMaql": obj.get("scenarioMaql") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/what_if_scenario_config.py b/gooddata-api-client/gooddata_api_client/models/what_if_scenario_config.py new file mode 100644 index 000000000..798d770ee --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/what_if_scenario_config.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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, StrictBool +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.what_if_scenario_item import WhatIfScenarioItem +from typing import Optional, Set +from typing_extensions import Self + +class WhatIfScenarioConfig(BaseModel): + """ + What-if scenario configuration. + """ # noqa: E501 + include_baseline: StrictBool = Field(description="Whether baseline (unmodified) values are included", alias="includeBaseline") + scenarios: List[WhatIfScenarioItem] = Field(description="Scenarios with alternative measure calculations") + __properties: ClassVar[List[str]] = ["includeBaseline", "scenarios"] + + 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 WhatIfScenarioConfig 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 each item in scenarios (list) + _items = [] + if self.scenarios: + for _item_scenarios in self.scenarios: + if _item_scenarios: + _items.append(_item_scenarios.to_dict()) + _dict['scenarios'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WhatIfScenarioConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "includeBaseline": obj.get("includeBaseline"), + "scenarios": [WhatIfScenarioItem.from_dict(_item) for _item in obj["scenarios"]] if obj.get("scenarios") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/what_if_scenario_item.py b/gooddata-api-client/gooddata_api_client/models/what_if_scenario_item.py new file mode 100644 index 000000000..a1e995dd4 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/what_if_scenario_item.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.what_if_measure_adjustment_config import WhatIfMeasureAdjustmentConfig +from typing import Optional, Set +from typing_extensions import Self + +class WhatIfScenarioItem(BaseModel): + """ + Scenarios with alternative measure calculations + """ # noqa: E501 + adjustments: List[WhatIfMeasureAdjustmentConfig] = Field(description="Measure adjustments for this scenario") + label: StrictStr = Field(description="Human-readable scenario label") + __properties: ClassVar[List[str]] = ["adjustments", "label"] + + 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 WhatIfScenarioItem 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 each item in adjustments (list) + _items = [] + if self.adjustments: + for _item_adjustments in self.adjustments: + if _item_adjustments: + _items.append(_item_adjustments.to_dict()) + _dict['adjustments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WhatIfScenarioItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "adjustments": [WhatIfMeasureAdjustmentConfig.from_dict(_item) for _item in obj["adjustments"]] if obj.get("adjustments") is not None else None, + "label": obj.get("label") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/widget_slides_template.py b/gooddata-api-client/gooddata_api_client/models/widget_slides_template.py new file mode 100644 index 000000000..90d6de280 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/widget_slides_template.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.content_slide_template import ContentSlideTemplate +from typing import Optional, Set +from typing_extensions import Self + +class WidgetSlidesTemplate(BaseModel): + """ + Template for widget slides export. Available variables: {{currentPageNumber}}, {{dashboardDateFilters}}, {{dashboardDescription}}, {{dashboardFilters}}, {{dashboardId}}, {{dashboardName}}, {{dashboardTags}}, {{dashboardUrl}}, {{exportedAt}}, {{exportedBy}}, {{logo}}, {{totalPages}}, {{workspaceId}}, {{workspaceName}} + """ # noqa: E501 + applied_on: Annotated[List[StrictStr], Field(min_length=1)] = Field(description="Export types this template applies to.", alias="appliedOn") + content_slide: Optional[ContentSlideTemplate] = Field(default=None, alias="contentSlide") + __properties: ClassVar[List[str]] = ["appliedOn", "contentSlide"] + + @field_validator('applied_on') + def applied_on_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['PDF', 'PPTX']): + raise ValueError("each list item must be one of ('PDF', 'PPTX')") + 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 WidgetSlidesTemplate 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_slide + if self.content_slide: + _dict['contentSlide'] = self.content_slide.to_dict() + # set to None if content_slide (nullable) is None + # and model_fields_set contains the field + if self.content_slide is None and "content_slide" in self.model_fields_set: + _dict['contentSlide'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WidgetSlidesTemplate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "appliedOn": obj.get("appliedOn"), + "contentSlide": ContentSlideTemplate.from_dict(obj["contentSlide"]) if obj.get("contentSlide") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/workspace_automation_identifier.py b/gooddata-api-client/gooddata_api_client/models/workspace_automation_identifier.py new file mode 100644 index 000000000..1dd79a496 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/workspace_automation_identifier.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Optional, Set +from typing_extensions import Self + +class WorkspaceAutomationIdentifier(BaseModel): + """ + WorkspaceAutomationIdentifier + """ # noqa: E501 + id: StrictStr + __properties: ClassVar[List[str]] = ["id"] + + 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 WorkspaceAutomationIdentifier 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 WorkspaceAutomationIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/workspace_automation_management_bulk_request.py b/gooddata-api-client/gooddata_api_client/models/workspace_automation_management_bulk_request.py new file mode 100644 index 000000000..02d7281a0 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/workspace_automation_management_bulk_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing import Any, ClassVar, Dict, List +from gooddata_api_client.models.workspace_automation_identifier import WorkspaceAutomationIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class WorkspaceAutomationManagementBulkRequest(BaseModel): + """ + WorkspaceAutomationManagementBulkRequest + """ # noqa: E501 + automations: List[WorkspaceAutomationIdentifier] + __properties: ClassVar[List[str]] = ["automations"] + + 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 WorkspaceAutomationManagementBulkRequest 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 each item in automations (list) + _items = [] + if self.automations: + for _item_automations in self.automations: + if _item_automations: + _items.append(_item_automations.to_dict()) + _dict['automations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WorkspaceAutomationManagementBulkRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "automations": [WorkspaceAutomationIdentifier.from_dict(_item) for _item in obj["automations"]] if obj.get("automations") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/workspace_data_source.py b/gooddata-api-client/gooddata_api_client/models/workspace_data_source.py new file mode 100644 index 000000000..2835ffa9a --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/workspace_data_source.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 WorkspaceDataSource(BaseModel): + """ + The data source used for the particular workspace instead of the one defined in the LDM inherited from its parent workspace. Such data source cannot be defined for a single or a top-parent workspace. + """ # noqa: E501 + id: StrictStr = Field(description="The ID of the used data source.") + schema_path: Optional[List[StrictStr]] = Field(default=None, description="The full schema path as array of its path parts. Will be rendered as subPath1.subPath2...", alias="schemaPath") + __properties: ClassVar[List[str]] = ["id", "schemaPath"] + + 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 WorkspaceDataSource 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 WorkspaceDataSource 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"), + "schemaPath": obj.get("schemaPath") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/workspace_identifier.py b/gooddata-api-client/gooddata_api_client/models/workspace_identifier.py new file mode 100644 index 000000000..38bdb8f1f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/workspace_identifier.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class WorkspaceIdentifier(BaseModel): + """ + A workspace identifier. + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] = Field(description="Identifier of the workspace.") + type: StrictStr = Field(description="A type.") + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(?!\.)[.A-Za-z0-9_-]{1,255}$", value): + raise ValueError(r"must validate the regular expression /^(?!\.)[.A-Za-z0-9_-]{1,255}$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['workspace']): + # Accept unknown enum values for forward/backward compatibility + return value # raise ValueError("must be one of enum values ('workspace')") + 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 WorkspaceIdentifier 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 WorkspaceIdentifier 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/workspace_permission_assignment.py b/gooddata-api-client/gooddata_api_client/models/workspace_permission_assignment.py new file mode 100644 index 000000000..7809c8701 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/workspace_permission_assignment.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.assignee_identifier import AssigneeIdentifier +from typing import Optional, Set +from typing_extensions import Self + +class WorkspacePermissionAssignment(BaseModel): + """ + Workspace permission assignments + """ # noqa: E501 + assignee_identifier: AssigneeIdentifier = Field(alias="assigneeIdentifier") + hierarchy_permissions: Optional[List[StrictStr]] = Field(default=None, alias="hierarchyPermissions") + permissions: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["assigneeIdentifier", "hierarchyPermissions", "permissions"] + + @field_validator('hierarchy_permissions') + def hierarchy_permissions_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['MANAGE', 'ANALYZE', 'EXPORT', 'EXPORT_TABULAR', 'EXPORT_PDF', 'CREATE_AUTOMATION', 'USE_AI_ASSISTANT', 'WRITE_KNOWLEDGE_DOCUMENTS', 'READ_KNOWLEDGE_DOCUMENTS', 'CREATE_FILTER_VIEW', 'VIEW']): + raise ValueError("each list item must be one of ('MANAGE', 'ANALYZE', 'EXPORT', 'EXPORT_TABULAR', 'EXPORT_PDF', 'CREATE_AUTOMATION', 'USE_AI_ASSISTANT', 'WRITE_KNOWLEDGE_DOCUMENTS', 'READ_KNOWLEDGE_DOCUMENTS', 'CREATE_FILTER_VIEW', 'VIEW')") + return value + + @field_validator('permissions') + def permissions_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['MANAGE', 'ANALYZE', 'EXPORT', 'EXPORT_TABULAR', 'EXPORT_PDF', 'CREATE_AUTOMATION', 'USE_AI_ASSISTANT', 'WRITE_KNOWLEDGE_DOCUMENTS', 'READ_KNOWLEDGE_DOCUMENTS', 'CREATE_FILTER_VIEW', 'VIEW']): + raise ValueError("each list item must be one of ('MANAGE', 'ANALYZE', 'EXPORT', 'EXPORT_TABULAR', 'EXPORT_PDF', 'CREATE_AUTOMATION', 'USE_AI_ASSISTANT', 'WRITE_KNOWLEDGE_DOCUMENTS', 'READ_KNOWLEDGE_DOCUMENTS', 'CREATE_FILTER_VIEW', 'VIEW')") + 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 WorkspacePermissionAssignment 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 assignee_identifier + if self.assignee_identifier: + _dict['assigneeIdentifier'] = self.assignee_identifier.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WorkspacePermissionAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assigneeIdentifier": AssigneeIdentifier.from_dict(obj["assigneeIdentifier"]) if obj.get("assigneeIdentifier") is not None else None, + "hierarchyPermissions": obj.get("hierarchyPermissions"), + "permissions": obj.get("permissions") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/workspace_user.py b/gooddata-api-client/gooddata_api_client/models/workspace_user.py new file mode 100644 index 000000000..cf82fbb71 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/workspace_user.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 WorkspaceUser(BaseModel): + """ + List of workspace users + """ # noqa: E501 + email: Optional[StrictStr] = Field(default=None, description="User email address") + id: StrictStr + name: Optional[StrictStr] = Field(default=None, description="User name") + __properties: ClassVar[List[str]] = ["email", "id", "name"] + + 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 WorkspaceUser 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 WorkspaceUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "id": obj.get("id"), + "name": obj.get("name") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/workspace_user_group.py b/gooddata-api-client/gooddata_api_client/models/workspace_user_group.py new file mode 100644 index 000000000..8ab1e37ab --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/workspace_user_group.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 WorkspaceUserGroup(BaseModel): + """ + List of workspace groups + """ # noqa: E501 + id: StrictStr + name: Optional[StrictStr] = Field(default=None, description="Group name") + __properties: ClassVar[List[str]] = ["id", "name"] + + 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 WorkspaceUserGroup 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 WorkspaceUserGroup 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") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/workspace_user_groups.py b/gooddata-api-client/gooddata_api_client/models/workspace_user_groups.py new file mode 100644 index 000000000..4904e1af9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/workspace_user_groups.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.workspace_user_group import WorkspaceUserGroup +from typing import Optional, Set +from typing_extensions import Self + +class WorkspaceUserGroups(BaseModel): + """ + WorkspaceUserGroups + """ # noqa: E501 + total_count: StrictInt = Field(description="Total number of groups", alias="totalCount") + user_groups: List[WorkspaceUserGroup] = Field(alias="userGroups") + __properties: ClassVar[List[str]] = ["totalCount", "userGroups"] + + 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 WorkspaceUserGroups 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 each item in user_groups (list) + _items = [] + if self.user_groups: + for _item_user_groups in self.user_groups: + if _item_user_groups: + _items.append(_item_user_groups.to_dict()) + _dict['userGroups'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WorkspaceUserGroups from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalCount": obj.get("totalCount"), + "userGroups": [WorkspaceUserGroup.from_dict(_item) for _item in obj["userGroups"]] if obj.get("userGroups") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/workspace_users.py b/gooddata-api-client/gooddata_api_client/models/workspace_users.py new file mode 100644 index 000000000..83e041377 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/workspace_users.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 +from gooddata_api_client.models.workspace_user import WorkspaceUser +from typing import Optional, Set +from typing_extensions import Self + +class WorkspaceUsers(BaseModel): + """ + WorkspaceUsers + """ # noqa: E501 + total_count: StrictInt = Field(description="The total number of users is based on applied filters.", alias="totalCount") + users: List[WorkspaceUser] + __properties: ClassVar[List[str]] = ["totalCount", "users"] + + 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 WorkspaceUsers 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 each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WorkspaceUsers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalCount": obj.get("totalCount"), + "users": [WorkspaceUser.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/models/xliff.py b/gooddata-api-client/gooddata_api_client/models/xliff.py new file mode 100644 index 000000000..bbd481ae2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/models/xliff.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: v0 + Contact: support@gooddata.com + 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 gooddata_api_client.models.file import File +from typing import Optional, Set +from typing_extensions import Self + +class Xliff(BaseModel): + """ + Xliff + """ # noqa: E501 + file: Optional[List[File]] = None + other_attributes: Optional[Dict[str, StrictStr]] = Field(default=None, alias="otherAttributes") + space: Optional[StrictStr] = None + src_lang: Optional[StrictStr] = Field(default=None, alias="srcLang") + trg_lang: Optional[StrictStr] = Field(default=None, alias="trgLang") + version: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["file", "otherAttributes", "space", "srcLang", "trgLang", "version"] + + 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 Xliff 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 each item in file (list) + _items = [] + if self.file: + for _item_file in self.file: + if _item_file: + _items.append(_item_file.to_dict()) + _dict['file'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Xliff from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "file": [File.from_dict(_item) for _item in obj["file"]] if obj.get("file") is not None else None, + "otherAttributes": obj.get("otherAttributes"), + "space": obj.get("space"), + "srcLang": obj.get("srcLang"), + "trgLang": obj.get("trgLang"), + "version": obj.get("version") + }) + return _obj + + diff --git a/gooddata-api-client/gooddata_api_client/py.typed b/gooddata-api-client/gooddata_api_client/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/gooddata-api-client/pyproject.toml b/gooddata-api-client/pyproject.toml new file mode 100644 index 000000000..1282a1438 --- /dev/null +++ b/gooddata-api-client/pyproject.toml @@ -0,0 +1,22 @@ +[project] +name = "gooddata-api-client" +version = "1.61.0" +description = "OpenAPI definition" +authors = [ + {name = "GoodData (generated by OpenAPI Generator)", email = "support@gooddata.com"}, +] +license = { text = "MIT" } +readme = "README.md" +keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI definition"] +requires-python = ">=3.10" + +dependencies = [ + "urllib3 >= 2.1.0, < 3.0.0", + "python-dateutil >= 2.8.2", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" diff --git a/schemas/gooddata-api-client.json b/schemas/gooddata-api-client.json index d3c38d784..05722fa6f 100644 --- a/schemas/gooddata-api-client.json +++ b/schemas/gooddata-api-client.json @@ -5285,6 +5285,145 @@ ], "type": "object" }, + "AnalyzeCsvRequest": { + "description": "Bulk CSV analysis request.", + "properties": { + "analyzeRequests": { + "description": "List of individual CSV analysis requests.", + "items": { + "$ref": "#/components/schemas/AnalyzeCsvRequestItem" + }, + "type": "array" + } + }, + "required": [ + "analyzeRequests" + ], + "type": "object" + }, + "AnalyzeCsvRequestItem": { + "description": "CSV analysis request.", + "properties": { + "config": { + "$ref": "#/components/schemas/AnalyzeCsvRequestItemConfig" + }, + "location": { + "description": "Location of the CSV file to analyze.", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "AnalyzeCsvRequestItemConfig": { + "description": "CSV analysis request config.", + "properties": { + "delimiters": { + "description": "Possible column delimiters.", + "items": { + "description": "Possible column delimiters.", + "type": "string" + }, + "type": "array" + }, + "headerDetectMaxRows": { + "description": "Maximum number of rows to work with during header detection.", + "format": "int32", + "type": "integer" + }, + "headerRowCount": { + "description": "Number of rows to consider as header, if null, header will be detected.", + "format": "int32", + "type": "integer" + }, + "resultRows": { + "description": "Number of rows to return in the flight that represents analysis result. If 0, no rows are returned, if less than 0, all rows that were in the sample are returned.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "AnalyzeCsvResponse": { + "description": "Describes the results of a CSV analysis of a single file.", + "properties": { + "columns": { + "description": "List of column metadata.", + "items": { + "$ref": "#/components/schemas/AnalyzeCsvResponseColumn" + }, + "type": "array" + }, + "config": { + "$ref": "#/components/schemas/AnalyzeCsvResponseConfig" + }, + "location": { + "description": "Location of the analyzed file in the source data source.", + "type": "string" + }, + "previewData": { + "description": "Preview of the first N rows of the file.", + "items": { + "description": "Preview of the first N rows of the file.", + "items": { + "description": "Preview of the first N rows of the file.", + "type": "object" + }, + "type": "array" + }, + "type": "array" + } + }, + "required": [ + "columns", + "location", + "previewData" + ], + "type": "object" + }, + "AnalyzeCsvResponseColumn": { + "description": "Describes the result column.", + "properties": { + "detectedDateFormats": { + "description": "List of date formats that can be used to parse this column as date. Null if there are none.", + "items": { + "description": "List of date formats that can be used to parse this column as date. Null if there are none.", + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Name of the column as specified in the file (or autogenerated one if the file has no header).", + "type": "string" + }, + "type": { + "description": "Type of the column (e.g. string, bool, etc.).", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "type": "object" + }, + "AnalyzeCsvResponseConfig": { + "description": "Config used to process the CSV file.", + "properties": { + "convertOptions": { + "$ref": "#/components/schemas/CsvConvertOptions" + }, + "parseOptions": { + "$ref": "#/components/schemas/CsvParseOptions" + }, + "readOptions": { + "$ref": "#/components/schemas/CsvReadOptions" + } + }, + "type": "object" + }, "AnomalyDetection": { "properties": { "dataset": { @@ -6279,6 +6418,52 @@ ], "type": "object" }, + "CacheRemovalInterval": { + "description": "Information about a period in time and how much cached data was removed.", + "properties": { + "from": { + "description": "Start timestamp of the removal interval.", + "format": "date-time", + "type": "string" + }, + "removed": { + "description": "Bytes removed during this interval.", + "format": "int64", + "type": "integer" + }, + "to": { + "description": "End timestamp of the removal interval.", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "from", + "removed", + "to" + ], + "type": "object" + }, + "CacheUsageData": { + "description": "Result of scan of data source physical model.", + "properties": { + "organizationCacheUsage": { + "$ref": "#/components/schemas/OrganizationCacheUsage" + }, + "workspaceCacheUsages": { + "additionalProperties": { + "$ref": "#/components/schemas/WorkspaceCacheUsage" + }, + "description": "Map of data about the cache usage of the individual workspaces.", + "type": "object" + } + }, + "required": [ + "organizationCacheUsage", + "workspaceCacheUsages" + ], + "type": "object" + }, "ChangeAnalysisParams": { "description": "Change analysis specification.", "properties": { @@ -7189,6 +7374,32 @@ }, "type": "object" }, + "ConvertGeoFileRequest": { + "description": "Request to convert a geo file to GeoParquet format.", + "properties": { + "location": { + "description": "Location of the file in the staging area to convert.", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "ConvertGeoFileResponse": { + "description": "Response after successfully converting a geo file.", + "properties": { + "location": { + "description": "Location of the converted GeoParquet file in the staging area.", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, "CoverSlideTemplate": { "description": "Settings for cover slide.", "nullable": true, @@ -7386,6 +7597,204 @@ ], "type": "object" }, + "CsvConvertOptions": { + "description": "Options for converting CSV files when reading.", + "properties": { + "autoDictEncode": { + "description": "Whether to try to automatically dict-encode string / binary data.", + "type": "boolean" + }, + "autoDictMaxCardinality": { + "description": "The maximum dictionary cardinality for autoDictEncode.", + "format": "int32", + "type": "integer" + }, + "checkUtf8": { + "description": "Whether to check UTF8 validity of string columns.", + "type": "boolean" + }, + "columnTypes": { + "description": "Information about the column types in the table.", + "items": { + "$ref": "#/components/schemas/CsvConvertOptionsColumnType" + }, + "type": "array" + }, + "decimalPoint": { + "description": "The character used as decimal point in floating-point and decimal data.", + "type": "string" + }, + "falseValues": { + "description": "Sequence of strings that denote false Booleans in the data.", + "items": { + "description": "Sequence of strings that denote false Booleans in the data.", + "type": "string" + }, + "type": "array" + }, + "includeColumns": { + "description": "The names of columns to include in the Table. If empty, the Table will include all columns from the CSV file. If not empty, only these columns will be included, in this order.", + "items": { + "description": "The names of columns to include in the Table. If empty, the Table will include all columns from the CSV file. If not empty, only these columns will be included, in this order.", + "type": "string" + }, + "type": "array" + }, + "includeMissingColumns": { + "description": "If false, columns in includeColumns but not in the CSV file will error out.", + "type": "boolean" + }, + "nullValues": { + "description": "Sequence of strings that denote nulls in the data.", + "items": { + "description": "Sequence of strings that denote nulls in the data.", + "type": "string" + }, + "type": "array" + }, + "quotedStringsCanBeNull": { + "description": "Whether quoted values can be null.", + "type": "boolean" + }, + "stringsCanBeNull": { + "description": "Whether string / binary columns can have null values.", + "type": "boolean" + }, + "timestampParsers": { + "description": "Sequence of strptime()-compatible format strings, tried in order when attempting to infer or convert timestamp values.", + "items": { + "description": "Sequence of strptime()-compatible format strings, tried in order when attempting to infer or convert timestamp values.", + "type": "string" + }, + "type": "array" + }, + "trueValues": { + "description": "Sequence of strings that denote true Booleans in the data.", + "items": { + "description": "Sequence of strings that denote true Booleans in the data.", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CsvConvertOptionsColumnType": { + "description": "Information about a certain column in the table.", + "properties": { + "name": { + "description": "The column name.", + "type": "string" + }, + "nullable": { + "description": "Whether the data in the given column can be null.", + "type": "boolean" + }, + "type": { + "description": "The column type.", + "type": "string" + } + }, + "type": "object" + }, + "CsvManifestBody": { + "description": "Body of the CSV manifest.", + "properties": { + "column_date_formats": { + "additionalProperties": { + "description": "Map of column names to date formats to use when parsing them as dates.", + "type": "string" + }, + "description": "Map of column names to date formats to use when parsing them as dates.", + "type": "object" + }, + "convert": { + "$ref": "#/components/schemas/CsvConvertOptions" + }, + "parse": { + "$ref": "#/components/schemas/CsvParseOptions" + }, + "read": { + "$ref": "#/components/schemas/CsvReadOptions" + }, + "read_method": { + "description": "Method used to read the CSV file.", + "type": "string" + } + }, + "type": "object" + }, + "CsvParseOptions": { + "description": "Options for parsing CSV files.", + "properties": { + "delimiter": { + "description": "The character delimiting individual cells in the CSV data.", + "type": "string" + }, + "doubleQuote": { + "description": "Whether two quotes in a quoted CSV value denote a single quote in the data.", + "type": "boolean" + }, + "escapeChar": { + "description": "The character used optionally for escaping special characters or false to disable escaping.", + "type": "object" + }, + "ignoreEmptyLines": { + "description": "Whether empty lines are ignored in CSV input.", + "type": "boolean" + }, + "newlinesInValues": { + "description": "Whether newline characters are allowed in CSV values.", + "type": "boolean" + }, + "quoteChar": { + "description": "The character used optionally for quoting CSV values or false to disable quoting.", + "type": "object" + } + }, + "type": "object" + }, + "CsvReadOptions": { + "description": "Options for reading CSV files.", + "properties": { + "autoGenerateColumnNames": { + "description": "Whether to autogenerate column names if columnNames is empty.", + "type": "boolean" + }, + "blockSize": { + "description": "How many bytes to process at a time from the input stream.", + "format": "int32", + "type": "integer" + }, + "columnNames": { + "description": "The column names of the target table.", + "items": { + "description": "The column names of the target table.", + "type": "string" + }, + "type": "array" + }, + "encoding": { + "description": "The character encoding of the CSV data.", + "type": "string" + }, + "skipRows": { + "description": "The number of rows to skip before the column names (if any) and the CSV data.", + "format": "int32", + "type": "integer" + }, + "skipRowsAfterNames": { + "description": "The number of rows to skip after the column names.", + "format": "int32", + "type": "integer" + }, + "useThreads": { + "description": "Whether to use multiple threads to accelerate reading.", + "type": "boolean" + } + }, + "type": "object" + }, "CustomLabel": { "description": "Custom label object override.", "properties": { @@ -8938,6 +9347,7 @@ "description": "Column name", "example": "customer_id", "maxLength": 255, + "pattern": "^[^\u0000]*$", "type": "string" }, "referencedTableColumn": { @@ -11857,6 +12267,23 @@ ], "type": "object" }, + "DeleteFilesRequest": { + "description": "Request to delete files from the storage.", + "properties": { + "fileNames": { + "description": "Names of the files to delete.", + "items": { + "description": "Names of the files to delete.", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "fileNames" + ], + "type": "object" + }, "DeleteKnowledgeDocumentResponseDto": { "properties": { "message": { @@ -13087,6 +13514,39 @@ }, "type": "object" }, + "GdStorageFile": { + "description": "File stored in GD Storage.", + "properties": { + "modifiedAt": { + "description": "Last modification timestamp of the file.", + "format": "date-time", + "type": "string" + }, + "name": { + "description": "Name of the file.", + "type": "string" + }, + "size": { + "description": "Size of the file in bytes.", + "format": "int64", + "type": "integer" + }, + "type": { + "description": "Type of the file.", + "enum": [ + "CSV" + ], + "type": "string" + } + }, + "required": [ + "modifiedAt", + "name", + "size", + "type" + ], + "type": "object" + }, "GenerateDescriptionRequest": { "properties": { "objectId": { @@ -13300,6 +13760,73 @@ ], "type": "object" }, + "GeoJsonFeature": { + "description": "GeoJSON Feature", + "properties": { + "geometry": { + "$ref": "#/components/schemas/GeoJsonGeometry" + }, + "id": { + "type": "object" + }, + "properties": { + "additionalProperties": { + "type": "object" + }, + "type": "object" + }, + "type": { + "type": "string" + } + }, + "required": [ + "properties", + "type" + ], + "type": "object" + }, + "GeoJsonFeatureCollection": { + "description": "GeoJSON FeatureCollection", + "properties": { + "bbox": { + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + }, + "features": { + "items": { + "$ref": "#/components/schemas/GeoJsonFeature" + }, + "type": "array" + }, + "type": { + "type": "string" + } + }, + "required": [ + "features", + "type" + ], + "type": "object" + }, + "GeoJsonGeometry": { + "description": "GeoJSON Geometry", + "properties": { + "coordinates": { + "type": "object" + }, + "type": { + "type": "string" + } + }, + "required": [ + "coordinates", + "type" + ], + "type": "object" + }, "GetQualityIssuesResponse": { "properties": { "issues": { @@ -13627,6 +14154,125 @@ ], "type": "object" }, + "ImportCsvRequest": { + "description": "Request containing the information necessary to import one or more CSV files from the staging area.", + "properties": { + "tables": { + "description": "Information about the individual tables.", + "items": { + "$ref": "#/components/schemas/ImportCsvRequestTable" + }, + "type": "array" + } + }, + "required": [ + "tables" + ], + "type": "object" + }, + "ImportCsvRequestTable": { + "description": "Information about a particular table.", + "properties": { + "name": { + "description": "Name of the table.", + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/ImportCsvRequestTableSource" + } + }, + "required": [ + "name", + "source" + ], + "type": "object" + }, + "ImportCsvRequestTableSource": { + "description": "Information about source data for a particular table.", + "properties": { + "config": { + "$ref": "#/components/schemas/ImportCsvRequestTableSourceConfig" + }, + "location": { + "description": "Location of the data in the staging area.", + "type": "string" + } + }, + "required": [ + "config", + "location" + ], + "type": "object" + }, + "ImportCsvRequestTableSourceConfig": { + "description": "Config to use when accessing the data for executions, etc.", + "properties": { + "columnDateFormats": { + "additionalProperties": { + "description": "Date formats to use to use to read the given columns.", + "type": "string" + }, + "description": "Date formats to use to use to read the given columns.", + "type": "object" + }, + "convertOptions": { + "$ref": "#/components/schemas/CsvConvertOptions" + }, + "parseOptions": { + "$ref": "#/components/schemas/CsvParseOptions" + }, + "readOptions": { + "$ref": "#/components/schemas/CsvReadOptions" + } + }, + "type": "object" + }, + "ImportCsvResponse": { + "description": "Response containing the information about the imported CSV file.", + "properties": { + "name": { + "description": "Name of the table the file was imported to.", + "type": "string" + }, + "version": { + "description": "Version the file was imported as.", + "format": "int32", + "type": "integer" + } + }, + "required": [ + "name", + "version" + ], + "type": "object" + }, + "ImportGeoCollectionRequest": { + "description": "Request to import a geo collection file from the staging area.", + "properties": { + "location": { + "description": "Location of the file in the staging area.", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "ImportGeoCollectionResponse": { + "description": "Response after successfully importing a geo collection.", + "properties": { + "version": { + "description": "The version of the imported geo collection.", + "format": "int32", + "type": "integer" + } + }, + "required": [ + "version" + ], + "type": "object" + }, "InPlatform": { "allOf": [ { @@ -31728,6 +32374,69 @@ ], "type": "object" }, + "OrganizationCacheSettings": { + "description": "Settings for organization cache.", + "properties": { + "extraCacheBudget": { + "description": "Extra cache budget the organization can allocate among its workspaces, in bytes.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "extraCacheBudget" + ], + "type": "object" + }, + "OrganizationCacheUsage": { + "description": "Data about the whole organization's cache usage.", + "properties": { + "current": { + "$ref": "#/components/schemas/OrganizationCurrentCacheUsage" + }, + "removalIntervals": { + "description": "List of cache removal intervals.", + "items": { + "$ref": "#/components/schemas/CacheRemovalInterval" + }, + "type": "array" + }, + "settings": { + "$ref": "#/components/schemas/OrganizationCacheSettings" + } + }, + "required": [ + "current", + "removalIntervals", + "settings" + ], + "type": "object" + }, + "OrganizationCurrentCacheUsage": { + "description": "Current cache usage of the organization.", + "properties": { + "cacheUsed": { + "description": "Cache currently used by the organization, in bytes.", + "format": "int64", + "type": "integer" + }, + "removalPeriodStart": { + "description": "Start timestamp of removal period.", + "format": "date-time", + "type": "string" + }, + "removedSinceStart": { + "description": "Bytes removed since start due to insufficient cache.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "cacheUsed", + "removedSinceStart" + ], + "type": "object" + }, "OrganizationPermissionAssignment": { "description": "Organization permission assignments", "properties": { @@ -32777,6 +33486,63 @@ ], "type": "object" }, + "ReadCsvFileManifestsRequest": { + "description": "Request to read the manifests of the specified CSV files.", + "properties": { + "manifestRequests": { + "description": "Files to read the manifests for.", + "items": { + "$ref": "#/components/schemas/ReadCsvFileManifestsRequestItem" + }, + "type": "array" + } + }, + "required": [ + "manifestRequests" + ], + "type": "object" + }, + "ReadCsvFileManifestsRequestItem": { + "description": "Request to read the manifest of a single CSV file.", + "properties": { + "fileName": { + "description": "Name of the CSV file to read the manifest for.", + "type": "string" + }, + "version": { + "description": "Optional version of the file to read the manifest for. If null or not specified, the latest version is read.", + "format": "int32", + "type": "integer" + } + }, + "required": [ + "fileName" + ], + "type": "object" + }, + "ReadCsvFileManifestsResponse": { + "description": "Describes the results of a CSV manifest read of a single file.", + "properties": { + "manifest": { + "$ref": "#/components/schemas/CsvManifestBody" + }, + "name": { + "description": "Name of the file in the source data source.", + "type": "string" + }, + "version": { + "description": "Version of the file in the source data source.", + "format": "int32", + "type": "integer" + } + }, + "required": [ + "manifest", + "name", + "version" + ], + "type": "object" + }, "Reasoning": { "description": "Reasoning wrapper containing steps taken during request handling.", "properties": { @@ -34971,6 +35737,32 @@ "Unit": { "type": "object" }, + "UploadFileResponse": { + "description": "Information related to the file uploaded to the staging area.", + "properties": { + "location": { + "description": "Location to use when referencing the uploaded file in subsequent requests.", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "UploadGeoCollectionFileResponse": { + "description": "Information related to the geo collection file uploaded to the staging area.", + "properties": { + "location": { + "description": "Location to use when referencing the uploaded file in subsequent requests.", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, "UpsertKnowledgeDocumentRequestDto": { "properties": { "content": { @@ -35936,6 +36728,76 @@ ], "type": "object" }, + "WorkspaceCacheSettings": { + "description": "Cache settings for the workspace.", + "properties": { + "extraCache": { + "description": "Extra cache for the workspace, in bytes.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "extraCache" + ], + "type": "object" + }, + "WorkspaceCacheUsage": { + "description": "Data about a particular workspace cache usage.", + "properties": { + "current": { + "$ref": "#/components/schemas/WorkspaceCurrentCacheUsage" + }, + "removalIntervals": { + "description": "List of cache removal intervals for workspace.", + "items": { + "$ref": "#/components/schemas/CacheRemovalInterval" + }, + "type": "array" + }, + "settings": { + "$ref": "#/components/schemas/WorkspaceCacheSettings" + } + }, + "required": [ + "current", + "removalIntervals", + "settings" + ], + "type": "object" + }, + "WorkspaceCurrentCacheUsage": { + "description": "Current cache usage of the workspace.", + "properties": { + "cacheAvailable": { + "description": "Cache available for the workspace.", + "format": "int64", + "type": "integer" + }, + "cacheUsed": { + "description": "Cache used by the workspace.", + "format": "int64", + "type": "integer" + }, + "removalPeriodStart": { + "description": "Start timestamp of removal period for the workspace.", + "format": "date-time", + "type": "string" + }, + "removedSinceStart": { + "description": "Bytes removed since start due to insufficient cache for the workspace.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "cacheAvailable", + "cacheUsed", + "removalPeriodStart", + "removedSinceStart" + ], + "type": "object" + }, "WorkspaceDataSource": { "description": "The data source used for the particular workspace instead of the one defined in the LDM inherited from its parent workspace. Such data source cannot be defined for a single or a top-parent workspace.", "properties": { @@ -36472,6 +37334,35 @@ ] } }, + "/api/v1/actions/collectCacheUsage": { + "get": { + "description": "Get the detailed data about how much cache your organization is currently using, broken down by individual workspaces.", + "operationId": "collectCacheUsage", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CacheUsageData" + } + } + }, + "description": "OK" + } + }, + "summary": "Collect data about the current cache usage", + "tags": [ + "Cache usage", + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, "/api/v1/actions/collectUsage": { "get": { "description": "Provides information about platform usage, like amount of users, workspaces, ...\n\n_NOTE_: The `admin` user is always excluded from this amount.", @@ -36544,6 +37435,149 @@ } } }, + "/api/v1/actions/customGeoCollection/convert": { + "post": { + "description": "Converts a geo file from the staging area to GeoParquet format. Supported source formats: GeoJSON (.geojson, .json), ESRI Shapefile (.zip). If the source file is already in GeoParquet format, the same location is returned without conversion.", + "operationId": "convertGeoFile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConvertGeoFileRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ConvertGeoFileResponse" + } + } + }, + "description": "Conversion was successful." + }, + "400": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ConvertGeoFileResponse" + } + } + }, + "description": "Invalid request or unsupported file format." + } + }, + "summary": "Convert a geo file to GeoParquet format", + "tags": [ + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/customGeoCollection/staging/upload": { + "post": { + "description": "Provides a location for uploading staging files for custom geo collections. Supported file types: GeoParquet (.parquet), GeoJSON (.geojson, .json), ESRI Shapefile (.zip). Maximum file size: 100 MB.", + "operationId": "customGeoCollectionStagingUpload", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "properties": { + "file": { + "description": "The geo collection file to upload. Supported formats: GeoParquet (.parquet), GeoJSON (.geojson, .json), ESRI Shapefile (.zip).", + "format": "binary", + "type": "string" + } + }, + "required": [ + "file" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/UploadGeoCollectionFileResponse" + } + } + }, + "description": "Upload was successful." + } + }, + "summary": "Upload a geo collection file to the staging area", + "tags": [ + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/customGeoCollection/{collectionId}/import": { + "post": { + "description": "Import a geo collection file from the staging area to be available for use. The file must be in GeoParquet format (use the convert endpoint first for other formats). Validates file size (max 100 MB), organization storage quota (max 1 GB total), and GeoParquet schema (requires id, geometry, and bbox columns).", + "operationId": "importCustomGeoCollection", + "parameters": [ + { + "in": "path", + "name": "collectionId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportGeoCollectionRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ImportGeoCollectionResponse" + } + } + }, + "description": "Successful import." + } + }, + "summary": "Import custom geo collection", + "tags": [ + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, "/api/v1/actions/dataSource/test": { "post": { "description": "Test if it is possible to connect to a database using a connection provided by the data source definition in the request body.", @@ -37114,6 +38148,284 @@ } } }, + "/api/v1/actions/fileStorage/dataSources/{dataSourceId}/deleteFiles": { + "post": { + "description": "Delete the files in the given data source.", + "operationId": "deleteFiles", + "parameters": [ + { + "in": "path", + "name": "dataSourceId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteFilesRequest" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Successful deletion." + } + }, + "summary": "Delete datasource files", + "tags": [ + "Data source files deletion", + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/fileStorage/dataSources/{dataSourceId}/importCsv": { + "post": { + "description": "Import the CSV files at the given locations in the staging area to the final location.", + "operationId": "importCsv", + "parameters": [ + { + "in": "path", + "name": "dataSourceId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportCsvRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ImportCsvResponse" + }, + "type": "array" + } + } + }, + "description": "Successful import." + } + }, + "summary": "Import CSV", + "tags": [ + "Data source files import", + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/fileStorage/dataSources/{dataSourceId}/listFiles": { + "post": { + "description": "List all the files in the given data source.", + "operationId": "listFiles", + "parameters": [ + { + "in": "path", + "name": "dataSourceId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/GdStorageFile" + }, + "type": "array" + } + } + }, + "description": "Successful listing." + } + }, + "summary": "List datasource files", + "tags": [ + "Data source files listing", + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/fileStorage/dataSources/{dataSourceId}/readCsvFileManifests": { + "post": { + "description": "Read the manifests of the CSV files in the given data source.", + "operationId": "readCsvFileManifests", + "parameters": [ + { + "in": "path", + "name": "dataSourceId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReadCsvFileManifestsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ReadCsvFileManifestsResponse" + }, + "type": "array" + } + } + }, + "description": "Successful listing." + } + }, + "summary": "Read CSV file manifests", + "tags": [ + "Data source files manifest read", + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/fileStorage/staging/analyzeCsv": { + "post": { + "description": "Analyzes CSV files at the given locations", + "operationId": "analyzeCsv", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnalyzeCsvRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AnalyzeCsvResponse" + }, + "type": "array" + } + } + }, + "description": "Successful analysis." + } + }, + "summary": "Analyze CSV", + "tags": [ + "Data source files analysis", + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/fileStorage/staging/upload": { + "post": { + "description": "Provides a location for uploading staging files.", + "operationId": "stagingUpload", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "properties": { + "file": { + "description": "The file to upload.", + "format": "binary", + "type": "string" + } + }, + "required": [ + "file" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UploadFileResponse" + } + } + }, + "description": "Upload was successful." + } + }, + "summary": "Upload a file to the staging area", + "tags": [ + "Data source staging location", + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, "/api/v1/actions/notificationChannels/test": { "post": { "description": "Tests the notification channel by sending a test notification.", @@ -63548,6 +64860,176 @@ } } }, + "/api/v1/location/collections/{collectionId}/items": { + "get": { + "description": "Retrieve features from a GeoCollections collection as GeoJSON", + "operationId": "getCollectionItems", + "parameters": [ + { + "description": "Collection identifier", + "example": "countries", + "in": "path", + "name": "collectionId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Maximum number of features to return", + "example": 100, + "in": "query", + "name": "limit", + "required": false, + "schema": { + "maximum": 100, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Bounding box filter (minx,miny,maxx,maxy)", + "example": "-180,-90,180,90", + "in": "query", + "name": "bbox", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "List of values to filter features by", + "example": "US,CA,MX", + "in": "query", + "name": "values", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/GeoJsonFeatureCollection" + } + } + }, + "description": "Features retrieved successfully" + }, + "404": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/GeoJsonFeatureCollection" + } + } + }, + "description": "Collection not found" + } + }, + "summary": "Get collection features", + "tags": [ + "OGC API Features" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "VIEW" + ] + } + } + }, + "/api/v1/location/custom/collections/{collectionId}/items": { + "get": { + "description": "Retrieve features from a custom (organization-scoped) GeoCollections collection as GeoJSON", + "operationId": "getCustomCollectionItems", + "parameters": [ + { + "description": "Collection identifier", + "example": "my-custom-collection", + "in": "path", + "name": "collectionId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Maximum number of features to return", + "example": 100, + "in": "query", + "name": "limit", + "required": false, + "schema": { + "maximum": 100, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Bounding box filter (minx,miny,maxx,maxy)", + "example": "-180,-90,180,90", + "in": "query", + "name": "bbox", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "List of values to filter features by", + "example": "US,CA,MX", + "in": "query", + "name": "values", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/GeoJsonFeatureCollection" + } + } + }, + "description": "Features retrieved successfully" + }, + "404": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/GeoJsonFeatureCollection" + } + } + }, + "description": "Collection not found" + } + }, + "summary": "Get custom collection features", + "tags": [ + "OGC API Features" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "VIEW" + ] + } + } + }, "/api/v1/options": { "get": { "description": "Retrieves links for all options for different configurations.", @@ -63631,6 +65113,10 @@ "description": "| APIs for interaction with the AI Lake", "name": "AI Lake" }, + { + "description": "OGC API Features implementation for GeoCollections collections", + "name": "OGC API Features" + }, { "description": "Use case APIs for user management", "name": "User management" diff --git a/schemas/gooddata-result-client.json b/schemas/gooddata-result-client.json new file mode 100644 index 000000000..c60f7cbe2 --- /dev/null +++ b/schemas/gooddata-result-client.json @@ -0,0 +1,1514 @@ +{ + "components": { + "schemas": { + "AnalyzeCsvRequest": { + "description": "Bulk CSV analysis request.", + "properties": { + "analyzeRequests": { + "description": "List of individual CSV analysis requests.", + "items": { + "$ref": "#/components/schemas/AnalyzeCsvRequestItem" + }, + "type": "array" + } + }, + "required": [ + "analyzeRequests" + ], + "type": "object" + }, + "AnalyzeCsvRequestItem": { + "description": "CSV analysis request.", + "properties": { + "config": { + "$ref": "#/components/schemas/AnalyzeCsvRequestItemConfig" + }, + "location": { + "description": "Location of the CSV file to analyze.", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "AnalyzeCsvRequestItemConfig": { + "description": "CSV analysis request config.", + "properties": { + "delimiters": { + "description": "Possible column delimiters.", + "items": { + "description": "Possible column delimiters.", + "type": "string" + }, + "type": "array" + }, + "headerDetectMaxRows": { + "description": "Maximum number of rows to work with during header detection.", + "format": "int32", + "type": "integer" + }, + "headerRowCount": { + "description": "Number of rows to consider as header, if null, header will be detected.", + "format": "int32", + "type": "integer" + }, + "resultRows": { + "description": "Number of rows to return in the flight that represents analysis result. If 0, no rows are returned, if less than 0, all rows that were in the sample are returned.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "AnalyzeCsvResponse": { + "description": "Describes the results of a CSV analysis of a single file.", + "properties": { + "columns": { + "description": "List of column metadata.", + "items": { + "$ref": "#/components/schemas/AnalyzeCsvResponseColumn" + }, + "type": "array" + }, + "config": { + "$ref": "#/components/schemas/AnalyzeCsvResponseConfig" + }, + "location": { + "description": "Location of the analyzed file in the source data source.", + "type": "string" + }, + "previewData": { + "description": "Preview of the first N rows of the file.", + "items": { + "description": "Preview of the first N rows of the file.", + "items": { + "description": "Preview of the first N rows of the file.", + "type": "object" + }, + "type": "array" + }, + "type": "array" + } + }, + "required": [ + "columns", + "location", + "previewData" + ], + "type": "object" + }, + "AnalyzeCsvResponseColumn": { + "description": "Describes the result column.", + "properties": { + "detectedDateFormats": { + "description": "List of date formats that can be used to parse this column as date. Null if there are none.", + "items": { + "description": "List of date formats that can be used to parse this column as date. Null if there are none.", + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Name of the column as specified in the file (or autogenerated one if the file has no header).", + "type": "string" + }, + "type": { + "description": "Type of the column (e.g. string, bool, etc.).", + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "type": "object" + }, + "AnalyzeCsvResponseConfig": { + "description": "Config used to process the CSV file.", + "properties": { + "convertOptions": { + "$ref": "#/components/schemas/CsvConvertOptions" + }, + "parseOptions": { + "$ref": "#/components/schemas/CsvParseOptions" + }, + "readOptions": { + "$ref": "#/components/schemas/CsvReadOptions" + } + }, + "type": "object" + }, + "CacheRemovalInterval": { + "description": "Information about a period in time and how much cached data was removed.", + "properties": { + "from": { + "description": "Start timestamp of the removal interval.", + "format": "date-time", + "type": "string" + }, + "removed": { + "description": "Bytes removed during this interval.", + "format": "int64", + "type": "integer" + }, + "to": { + "description": "End timestamp of the removal interval.", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "from", + "removed", + "to" + ], + "type": "object" + }, + "CacheUsageData": { + "description": "Result of scan of data source physical model.", + "properties": { + "organizationCacheUsage": { + "$ref": "#/components/schemas/OrganizationCacheUsage" + }, + "workspaceCacheUsages": { + "additionalProperties": { + "$ref": "#/components/schemas/WorkspaceCacheUsage" + }, + "description": "Map of data about the cache usage of the individual workspaces.", + "type": "object" + } + }, + "required": [ + "organizationCacheUsage", + "workspaceCacheUsages" + ], + "type": "object" + }, + "ConvertGeoFileRequest": { + "description": "Request to convert a geo file to GeoParquet format.", + "properties": { + "location": { + "description": "Location of the file in the staging area to convert.", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "ConvertGeoFileResponse": { + "description": "Response after successfully converting a geo file.", + "properties": { + "location": { + "description": "Location of the converted GeoParquet file in the staging area.", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "CsvConvertOptions": { + "description": "Options for converting CSV files when reading.", + "properties": { + "autoDictEncode": { + "description": "Whether to try to automatically dict-encode string / binary data.", + "type": "boolean" + }, + "autoDictMaxCardinality": { + "description": "The maximum dictionary cardinality for autoDictEncode.", + "format": "int32", + "type": "integer" + }, + "checkUtf8": { + "description": "Whether to check UTF8 validity of string columns.", + "type": "boolean" + }, + "columnTypes": { + "description": "Information about the column types in the table.", + "items": { + "$ref": "#/components/schemas/CsvConvertOptionsColumnType" + }, + "type": "array" + }, + "decimalPoint": { + "description": "The character used as decimal point in floating-point and decimal data.", + "type": "string" + }, + "falseValues": { + "description": "Sequence of strings that denote false Booleans in the data.", + "items": { + "description": "Sequence of strings that denote false Booleans in the data.", + "type": "string" + }, + "type": "array" + }, + "includeColumns": { + "description": "The names of columns to include in the Table. If empty, the Table will include all columns from the CSV file. If not empty, only these columns will be included, in this order.", + "items": { + "description": "The names of columns to include in the Table. If empty, the Table will include all columns from the CSV file. If not empty, only these columns will be included, in this order.", + "type": "string" + }, + "type": "array" + }, + "includeMissingColumns": { + "description": "If false, columns in includeColumns but not in the CSV file will error out.", + "type": "boolean" + }, + "nullValues": { + "description": "Sequence of strings that denote nulls in the data.", + "items": { + "description": "Sequence of strings that denote nulls in the data.", + "type": "string" + }, + "type": "array" + }, + "quotedStringsCanBeNull": { + "description": "Whether quoted values can be null.", + "type": "boolean" + }, + "stringsCanBeNull": { + "description": "Whether string / binary columns can have null values.", + "type": "boolean" + }, + "timestampParsers": { + "description": "Sequence of strptime()-compatible format strings, tried in order when attempting to infer or convert timestamp values.", + "items": { + "description": "Sequence of strptime()-compatible format strings, tried in order when attempting to infer or convert timestamp values.", + "type": "string" + }, + "type": "array" + }, + "trueValues": { + "description": "Sequence of strings that denote true Booleans in the data.", + "items": { + "description": "Sequence of strings that denote true Booleans in the data.", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CsvConvertOptionsColumnType": { + "description": "Information about a certain column in the table.", + "properties": { + "name": { + "description": "The column name.", + "type": "string" + }, + "nullable": { + "description": "Whether the data in the given column can be null.", + "type": "boolean" + }, + "type": { + "description": "The column type.", + "type": "string" + } + }, + "type": "object" + }, + "CsvManifestBody": { + "description": "Body of the CSV manifest.", + "properties": { + "column_date_formats": { + "additionalProperties": { + "description": "Map of column names to date formats to use when parsing them as dates.", + "type": "string" + }, + "description": "Map of column names to date formats to use when parsing them as dates.", + "type": "object" + }, + "convert": { + "$ref": "#/components/schemas/CsvConvertOptions" + }, + "parse": { + "$ref": "#/components/schemas/CsvParseOptions" + }, + "read": { + "$ref": "#/components/schemas/CsvReadOptions" + }, + "read_method": { + "description": "Method used to read the CSV file.", + "type": "string" + } + }, + "type": "object" + }, + "CsvParseOptions": { + "description": "Options for parsing CSV files.", + "properties": { + "delimiter": { + "description": "The character delimiting individual cells in the CSV data.", + "type": "string" + }, + "doubleQuote": { + "description": "Whether two quotes in a quoted CSV value denote a single quote in the data.", + "type": "boolean" + }, + "escapeChar": { + "description": "The character used optionally for escaping special characters or false to disable escaping.", + "type": "object" + }, + "ignoreEmptyLines": { + "description": "Whether empty lines are ignored in CSV input.", + "type": "boolean" + }, + "newlinesInValues": { + "description": "Whether newline characters are allowed in CSV values.", + "type": "boolean" + }, + "quoteChar": { + "description": "The character used optionally for quoting CSV values or false to disable quoting.", + "type": "object" + } + }, + "type": "object" + }, + "CsvReadOptions": { + "description": "Options for reading CSV files.", + "properties": { + "autoGenerateColumnNames": { + "description": "Whether to autogenerate column names if columnNames is empty.", + "type": "boolean" + }, + "blockSize": { + "description": "How many bytes to process at a time from the input stream.", + "format": "int32", + "type": "integer" + }, + "columnNames": { + "description": "The column names of the target table.", + "items": { + "description": "The column names of the target table.", + "type": "string" + }, + "type": "array" + }, + "encoding": { + "description": "The character encoding of the CSV data.", + "type": "string" + }, + "skipRows": { + "description": "The number of rows to skip before the column names (if any) and the CSV data.", + "format": "int32", + "type": "integer" + }, + "skipRowsAfterNames": { + "description": "The number of rows to skip after the column names.", + "format": "int32", + "type": "integer" + }, + "useThreads": { + "description": "Whether to use multiple threads to accelerate reading.", + "type": "boolean" + } + }, + "type": "object" + }, + "DeleteFilesRequest": { + "description": "Request to delete files from the storage.", + "properties": { + "fileNames": { + "description": "Names of the files to delete.", + "items": { + "description": "Names of the files to delete.", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "fileNames" + ], + "type": "object" + }, + "GdStorageFile": { + "description": "File stored in GD Storage.", + "properties": { + "modifiedAt": { + "description": "Last modification timestamp of the file.", + "format": "date-time", + "type": "string" + }, + "name": { + "description": "Name of the file.", + "type": "string" + }, + "size": { + "description": "Size of the file in bytes.", + "format": "int64", + "type": "integer" + }, + "type": { + "description": "Type of the file.", + "enum": [ + "CSV" + ], + "type": "string" + } + }, + "required": [ + "modifiedAt", + "name", + "size", + "type" + ], + "type": "object" + }, + "GeoJsonFeature": { + "description": "GeoJSON Feature", + "properties": { + "geometry": { + "$ref": "#/components/schemas/GeoJsonGeometry" + }, + "id": { + "type": "object" + }, + "properties": { + "additionalProperties": { + "type": "object" + }, + "type": "object" + }, + "type": { + "type": "string" + } + }, + "required": [ + "properties", + "type" + ], + "type": "object" + }, + "GeoJsonFeatureCollection": { + "description": "GeoJSON FeatureCollection", + "properties": { + "bbox": { + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + }, + "features": { + "items": { + "$ref": "#/components/schemas/GeoJsonFeature" + }, + "type": "array" + }, + "type": { + "type": "string" + } + }, + "required": [ + "features", + "type" + ], + "type": "object" + }, + "GeoJsonGeometry": { + "description": "GeoJSON Geometry", + "properties": { + "coordinates": { + "type": "object" + }, + "type": { + "type": "string" + } + }, + "required": [ + "coordinates", + "type" + ], + "type": "object" + }, + "ImportCsvRequest": { + "description": "Request containing the information necessary to import one or more CSV files from the staging area.", + "properties": { + "tables": { + "description": "Information about the individual tables.", + "items": { + "$ref": "#/components/schemas/ImportCsvRequestTable" + }, + "type": "array" + } + }, + "required": [ + "tables" + ], + "type": "object" + }, + "ImportCsvRequestTable": { + "description": "Information about a particular table.", + "properties": { + "name": { + "description": "Name of the table.", + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/ImportCsvRequestTableSource" + } + }, + "required": [ + "name", + "source" + ], + "type": "object" + }, + "ImportCsvRequestTableSource": { + "description": "Information about source data for a particular table.", + "properties": { + "config": { + "$ref": "#/components/schemas/ImportCsvRequestTableSourceConfig" + }, + "location": { + "description": "Location of the data in the staging area.", + "type": "string" + } + }, + "required": [ + "config", + "location" + ], + "type": "object" + }, + "ImportCsvRequestTableSourceConfig": { + "description": "Config to use when accessing the data for executions, etc.", + "properties": { + "columnDateFormats": { + "additionalProperties": { + "description": "Date formats to use to use to read the given columns.", + "type": "string" + }, + "description": "Date formats to use to use to read the given columns.", + "type": "object" + }, + "convertOptions": { + "$ref": "#/components/schemas/CsvConvertOptions" + }, + "parseOptions": { + "$ref": "#/components/schemas/CsvParseOptions" + }, + "readOptions": { + "$ref": "#/components/schemas/CsvReadOptions" + } + }, + "type": "object" + }, + "ImportCsvResponse": { + "description": "Response containing the information about the imported CSV file.", + "properties": { + "name": { + "description": "Name of the table the file was imported to.", + "type": "string" + }, + "version": { + "description": "Version the file was imported as.", + "format": "int32", + "type": "integer" + } + }, + "required": [ + "name", + "version" + ], + "type": "object" + }, + "ImportGeoCollectionRequest": { + "description": "Request to import a geo collection file from the staging area.", + "properties": { + "location": { + "description": "Location of the file in the staging area.", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "ImportGeoCollectionResponse": { + "description": "Response after successfully importing a geo collection.", + "properties": { + "version": { + "description": "The version of the imported geo collection.", + "format": "int32", + "type": "integer" + } + }, + "required": [ + "version" + ], + "type": "object" + }, + "OrganizationCacheSettings": { + "description": "Settings for organization cache.", + "properties": { + "extraCacheBudget": { + "description": "Extra cache budget the organization can allocate among its workspaces, in bytes.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "extraCacheBudget" + ], + "type": "object" + }, + "OrganizationCacheUsage": { + "description": "Data about the whole organization's cache usage.", + "properties": { + "current": { + "$ref": "#/components/schemas/OrganizationCurrentCacheUsage" + }, + "removalIntervals": { + "description": "List of cache removal intervals.", + "items": { + "$ref": "#/components/schemas/CacheRemovalInterval" + }, + "type": "array" + }, + "settings": { + "$ref": "#/components/schemas/OrganizationCacheSettings" + } + }, + "required": [ + "current", + "removalIntervals", + "settings" + ], + "type": "object" + }, + "OrganizationCurrentCacheUsage": { + "description": "Current cache usage of the organization.", + "properties": { + "cacheUsed": { + "description": "Cache currently used by the organization, in bytes.", + "format": "int64", + "type": "integer" + }, + "removalPeriodStart": { + "description": "Start timestamp of removal period.", + "format": "date-time", + "type": "string" + }, + "removedSinceStart": { + "description": "Bytes removed since start due to insufficient cache.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "cacheUsed", + "removedSinceStart" + ], + "type": "object" + }, + "ReadCsvFileManifestsRequest": { + "description": "Request to read the manifests of the specified CSV files.", + "properties": { + "manifestRequests": { + "description": "Files to read the manifests for.", + "items": { + "$ref": "#/components/schemas/ReadCsvFileManifestsRequestItem" + }, + "type": "array" + } + }, + "required": [ + "manifestRequests" + ], + "type": "object" + }, + "ReadCsvFileManifestsRequestItem": { + "description": "Request to read the manifest of a single CSV file.", + "properties": { + "fileName": { + "description": "Name of the CSV file to read the manifest for.", + "type": "string" + }, + "version": { + "description": "Optional version of the file to read the manifest for. If null or not specified, the latest version is read.", + "format": "int32", + "type": "integer" + } + }, + "required": [ + "fileName" + ], + "type": "object" + }, + "ReadCsvFileManifestsResponse": { + "description": "Describes the results of a CSV manifest read of a single file.", + "properties": { + "manifest": { + "$ref": "#/components/schemas/CsvManifestBody" + }, + "name": { + "description": "Name of the file in the source data source.", + "type": "string" + }, + "version": { + "description": "Version of the file in the source data source.", + "format": "int32", + "type": "integer" + } + }, + "required": [ + "manifest", + "name", + "version" + ], + "type": "object" + }, + "UploadFileResponse": { + "description": "Information related to the file uploaded to the staging area.", + "properties": { + "location": { + "description": "Location to use when referencing the uploaded file in subsequent requests.", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "UploadGeoCollectionFileResponse": { + "description": "Information related to the geo collection file uploaded to the staging area.", + "properties": { + "location": { + "description": "Location to use when referencing the uploaded file in subsequent requests.", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "WorkspaceCacheSettings": { + "description": "Cache settings for the workspace.", + "properties": { + "extraCache": { + "description": "Extra cache for the workspace, in bytes.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "extraCache" + ], + "type": "object" + }, + "WorkspaceCacheUsage": { + "description": "Data about a particular workspace cache usage.", + "properties": { + "current": { + "$ref": "#/components/schemas/WorkspaceCurrentCacheUsage" + }, + "removalIntervals": { + "description": "List of cache removal intervals for workspace.", + "items": { + "$ref": "#/components/schemas/CacheRemovalInterval" + }, + "type": "array" + }, + "settings": { + "$ref": "#/components/schemas/WorkspaceCacheSettings" + } + }, + "required": [ + "current", + "removalIntervals", + "settings" + ], + "type": "object" + }, + "WorkspaceCurrentCacheUsage": { + "description": "Current cache usage of the workspace.", + "properties": { + "cacheAvailable": { + "description": "Cache available for the workspace.", + "format": "int64", + "type": "integer" + }, + "cacheUsed": { + "description": "Cache used by the workspace.", + "format": "int64", + "type": "integer" + }, + "removalPeriodStart": { + "description": "Start timestamp of removal period for the workspace.", + "format": "date-time", + "type": "string" + }, + "removedSinceStart": { + "description": "Bytes removed since start due to insufficient cache for the workspace.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "cacheAvailable", + "cacheUsed", + "removalPeriodStart", + "removedSinceStart" + ], + "type": "object" + } + } + }, + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "openapi": "3.0.1", + "paths": { + "/api/v1/actions/collectCacheUsage": { + "get": { + "description": "Get the detailed data about how much cache your organization is currently using, broken down by individual workspaces.", + "operationId": "collectCacheUsage", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CacheUsageData" + } + } + }, + "description": "OK" + } + }, + "summary": "Collect data about the current cache usage", + "tags": [ + "Cache usage", + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/customGeoCollection/convert": { + "post": { + "description": "Converts a geo file from the staging area to GeoParquet format. Supported source formats: GeoJSON (.geojson, .json), ESRI Shapefile (.zip). If the source file is already in GeoParquet format, the same location is returned without conversion.", + "operationId": "convertGeoFile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConvertGeoFileRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ConvertGeoFileResponse" + } + } + }, + "description": "Conversion was successful." + }, + "400": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ConvertGeoFileResponse" + } + } + }, + "description": "Invalid request or unsupported file format." + } + }, + "summary": "Convert a geo file to GeoParquet format", + "tags": [ + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/customGeoCollection/staging/upload": { + "post": { + "description": "Provides a location for uploading staging files for custom geo collections. Supported file types: GeoParquet (.parquet), GeoJSON (.geojson, .json), ESRI Shapefile (.zip). Maximum file size: 100 MB.", + "operationId": "customGeoCollectionStagingUpload", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "properties": { + "file": { + "description": "The geo collection file to upload. Supported formats: GeoParquet (.parquet), GeoJSON (.geojson, .json), ESRI Shapefile (.zip).", + "format": "binary", + "type": "string" + } + }, + "required": [ + "file" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/UploadGeoCollectionFileResponse" + } + } + }, + "description": "Upload was successful." + } + }, + "summary": "Upload a geo collection file to the staging area", + "tags": [ + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/customGeoCollection/{collectionId}/import": { + "post": { + "description": "Import a geo collection file from the staging area to be available for use. The file must be in GeoParquet format (use the convert endpoint first for other formats). Validates file size (max 100 MB), organization storage quota (max 1 GB total), and GeoParquet schema (requires id, geometry, and bbox columns).", + "operationId": "importCustomGeoCollection", + "parameters": [ + { + "in": "path", + "name": "collectionId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportGeoCollectionRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ImportGeoCollectionResponse" + } + } + }, + "description": "Successful import." + } + }, + "summary": "Import custom geo collection", + "tags": [ + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/fileStorage/dataSources/{dataSourceId}/deleteFiles": { + "post": { + "description": "Delete the files in the given data source.", + "operationId": "deleteFiles", + "parameters": [ + { + "in": "path", + "name": "dataSourceId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteFilesRequest" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Successful deletion." + } + }, + "summary": "Delete datasource files", + "tags": [ + "Data source files deletion", + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/fileStorage/dataSources/{dataSourceId}/importCsv": { + "post": { + "description": "Import the CSV files at the given locations in the staging area to the final location.", + "operationId": "importCsv", + "parameters": [ + { + "in": "path", + "name": "dataSourceId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportCsvRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ImportCsvResponse" + }, + "type": "array" + } + } + }, + "description": "Successful import." + } + }, + "summary": "Import CSV", + "tags": [ + "Data source files import", + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/fileStorage/dataSources/{dataSourceId}/listFiles": { + "post": { + "description": "List all the files in the given data source.", + "operationId": "listFiles", + "parameters": [ + { + "in": "path", + "name": "dataSourceId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/GdStorageFile" + }, + "type": "array" + } + } + }, + "description": "Successful listing." + } + }, + "summary": "List datasource files", + "tags": [ + "Data source files listing", + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/fileStorage/dataSources/{dataSourceId}/readCsvFileManifests": { + "post": { + "description": "Read the manifests of the CSV files in the given data source.", + "operationId": "readCsvFileManifests", + "parameters": [ + { + "in": "path", + "name": "dataSourceId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReadCsvFileManifestsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ReadCsvFileManifestsResponse" + }, + "type": "array" + } + } + }, + "description": "Successful listing." + } + }, + "summary": "Read CSV file manifests", + "tags": [ + "Data source files manifest read", + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/fileStorage/staging/analyzeCsv": { + "post": { + "description": "Analyzes CSV files at the given locations", + "operationId": "analyzeCsv", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnalyzeCsvRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AnalyzeCsvResponse" + }, + "type": "array" + } + } + }, + "description": "Successful analysis." + } + }, + "summary": "Analyze CSV", + "tags": [ + "Data source files analysis", + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/actions/fileStorage/staging/upload": { + "post": { + "description": "Provides a location for uploading staging files.", + "operationId": "stagingUpload", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "properties": { + "file": { + "description": "The file to upload.", + "format": "binary", + "type": "string" + } + }, + "required": [ + "file" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UploadFileResponse" + } + } + }, + "description": "Upload was successful." + } + }, + "summary": "Upload a file to the staging area", + "tags": [ + "Data source staging location", + "actions" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "MANAGE" + ] + } + } + }, + "/api/v1/location/collections/{collectionId}/items": { + "get": { + "description": "Retrieve features from a GeoCollections collection as GeoJSON", + "operationId": "getCollectionItems", + "parameters": [ + { + "description": "Collection identifier", + "example": "countries", + "in": "path", + "name": "collectionId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Maximum number of features to return", + "example": 100, + "in": "query", + "name": "limit", + "required": false, + "schema": { + "maximum": 100, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Bounding box filter (minx,miny,maxx,maxy)", + "example": "-180,-90,180,90", + "in": "query", + "name": "bbox", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "List of values to filter features by", + "example": "US,CA,MX", + "in": "query", + "name": "values", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/GeoJsonFeatureCollection" + } + } + }, + "description": "Features retrieved successfully" + }, + "404": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/GeoJsonFeatureCollection" + } + } + }, + "description": "Collection not found" + } + }, + "summary": "Get collection features", + "tags": [ + "OGC API Features" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "VIEW" + ] + } + } + }, + "/api/v1/location/custom/collections/{collectionId}/items": { + "get": { + "description": "Retrieve features from a custom (organization-scoped) GeoCollections collection as GeoJSON", + "operationId": "getCustomCollectionItems", + "parameters": [ + { + "description": "Collection identifier", + "example": "my-custom-collection", + "in": "path", + "name": "collectionId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Maximum number of features to return", + "example": 100, + "in": "query", + "name": "limit", + "required": false, + "schema": { + "maximum": 100, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Bounding box filter (minx,miny,maxx,maxy)", + "example": "-180,-90,180,90", + "in": "query", + "name": "bbox", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "List of values to filter features by", + "example": "US,CA,MX", + "in": "query", + "name": "values", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/GeoJsonFeatureCollection" + } + } + }, + "description": "Features retrieved successfully" + }, + "404": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/GeoJsonFeatureCollection" + } + } + }, + "description": "Collection not found" + } + }, + "summary": "Get custom collection features", + "tags": [ + "OGC API Features" + ], + "x-gdc-security-info": { + "description": "Minimal permission required to use this endpoint.", + "permissions": [ + "VIEW" + ] + } + } + } + }, + "servers": [ + { + "description": "Generated server url", + "url": "http://localhost:3000" + }, + { + "description": "GoodData.CN endpoint", + "url": "/" + } + ], + "tags": [ + { + "description": "| execution of some form of computation (RPC over JSON)", + "name": "actions" + }, + { + "description": "OGC API Features implementation for GeoCollections collections", + "name": "OGC API Features" + } + ] +} diff --git a/uv.lock b/uv.lock index 2b09e4ddd..4da2f5706 100644 --- a/uv.lock +++ b/uv.lock @@ -735,14 +735,18 @@ name = "gooddata-api-client" version = "1.61.0" source = { editable = "gooddata-api-client" } dependencies = [ + { name = "pydantic" }, { name = "python-dateutil" }, + { name = "typing-extensions" }, { name = "urllib3" }, ] [package.metadata] requires-dist = [ - { name = "python-dateutil" }, - { name = "urllib3", specifier = ">=2.6.1" }, + { name = "pydantic", specifier = ">=2" }, + { name = "python-dateutil", specifier = ">=2.8.2" }, + { name = "typing-extensions", specifier = ">=4.7.1" }, + { name = "urllib3", specifier = ">=2.1.0,<3.0.0" }, ] [[package]] From 49f349092268b4863fa1d5e43d528dd86f057615 Mon Sep 17 00:00:00 2001 From: Jan Kadlec Date: Fri, 13 Mar 2026 10:48:38 +0100 Subject: [PATCH 2/3] feat(gooddata-sdk): add CSV upload support for GDSTORAGE data sources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add five new methods to CatalogDataSourceService: - staging_upload — upload a CSV to the staging area - analyze_csv — detect columns, types, and parse config - import_csv — import a staged CSV into a GDSTORAGE data source - delete_csv_files — remove files from a data source - upload_csv — end-to-end convenience wrapper Also add CatalogDataSourceGdStorage entity model with _NoCredentials support (GDSTORAGE sources require no authentication), export the new symbol, and add documentation pages for all new methods. jira: TRIVIAL risk: low --- .../en/latest/data/data-source/_index.md | 8 ++ .../en/latest/data/data-source/analyze_csv.md | 37 ++++++ .../data/data-source/delete_csv_files.md | 37 ++++++ .../en/latest/data/data-source/import_csv.md | 49 ++++++++ .../latest/data/data-source/staging_upload.md | 37 ++++++ .../en/latest/data/data-source/upload_csv.md | 44 +++++++ .../gooddata-sdk/src/gooddata_sdk/__init__.py | 1 + .../data_source/entity_model/data_source.py | 22 ++++ .../catalog/data_source/service.py | 110 ++++++++++++++++++ 9 files changed, 345 insertions(+) create mode 100644 docs/content/en/latest/data/data-source/analyze_csv.md create mode 100644 docs/content/en/latest/data/data-source/delete_csv_files.md create mode 100644 docs/content/en/latest/data/data-source/import_csv.md create mode 100644 docs/content/en/latest/data/data-source/staging_upload.md create mode 100644 docs/content/en/latest/data/data-source/upload_csv.md diff --git a/docs/content/en/latest/data/data-source/_index.md b/docs/content/en/latest/data/data-source/_index.md index 9a8829d31..4a493c7ec 100644 --- a/docs/content/en/latest/data/data-source/_index.md +++ b/docs/content/en/latest/data/data-source/_index.md @@ -37,6 +37,14 @@ See [Connect Data](https://www.gooddata.com/docs/cloud/connect-data/) to learn h * [scan_schemata](./scan_schemata/) * [scan_sql](./scan_sql/) +### CSV Upload Methods + +* [staging_upload](./staging_upload/) +* [analyze_csv](./analyze_csv/) +* [import_csv](./import_csv/) +* [delete_csv_files](./delete_csv_files/) +* [upload_csv](./upload_csv/) + ## Example diff --git a/docs/content/en/latest/data/data-source/analyze_csv.md b/docs/content/en/latest/data/data-source/analyze_csv.md new file mode 100644 index 000000000..4219f51fc --- /dev/null +++ b/docs/content/en/latest/data/data-source/analyze_csv.md @@ -0,0 +1,37 @@ +--- +title: "analyze_csv" +linkTitle: "analyze_csv" +weight: 191 +superheading: "catalog_data_source." +--- + + + +``analyze_csv(location: str)`` + +Analyzes an uploaded CSV file in the staging area. Returns column metadata, detected types, preview data, and a config object that can be passed to import_csv. + +{{% parameters-block title="Parameters"%}} + +{{< parameter p_name="location" p_type="string" >}} +Location string returned by staging_upload. +{{< /parameter >}} + +{{% /parameters-block %}} + +{{% parameters-block title="Returns"%}} + +{{< parameter p_type="AnalyzeCsvResponse" >}} +Analysis result with columns, preview data, and config. +{{< /parameter >}} + +{{% /parameters-block %}} + +## Example + +```python +# Analyze a previously uploaded CSV file +analysis = sdk.catalog_data_source.analyze_csv(location="staging/some-location") +for col in analysis["columns"]: + print(f"{col['name']}: {col['type']}") +``` diff --git a/docs/content/en/latest/data/data-source/delete_csv_files.md b/docs/content/en/latest/data/data-source/delete_csv_files.md new file mode 100644 index 000000000..d8ce004f3 --- /dev/null +++ b/docs/content/en/latest/data/data-source/delete_csv_files.md @@ -0,0 +1,37 @@ +--- +title: "delete_csv_files" +linkTitle: "delete_csv_files" +weight: 193 +superheading: "catalog_data_source." +--- + + + +``delete_csv_files(data_source_id: str, file_names: list[str])`` + +Deletes files from a GDSTORAGE data source. + +{{% parameters-block title="Parameters"%}} + +{{< parameter p_name="data_source_id" p_type="string" >}} +Data source identification string. +{{< /parameter >}} + +{{< parameter p_name="file_names" p_type="list[string]" >}} +List of file names to delete. +{{< /parameter >}} + +{{% /parameters-block %}} + +{{% parameters-block title="Returns" None="yes"%}} +{{% /parameters-block %}} + +## Example + +```python +# Delete specific files from a GDSTORAGE data source +sdk.catalog_data_source.delete_csv_files( + data_source_id="my-gdstorage-ds", + file_names=["my_table.csv"], +) +``` diff --git a/docs/content/en/latest/data/data-source/import_csv.md b/docs/content/en/latest/data/data-source/import_csv.md new file mode 100644 index 000000000..1b0bcf41e --- /dev/null +++ b/docs/content/en/latest/data/data-source/import_csv.md @@ -0,0 +1,49 @@ +--- +title: "import_csv" +linkTitle: "import_csv" +weight: 192 +superheading: "catalog_data_source." +--- + + + +``import_csv(data_source_id: str, table_name: str, location: str, config: Optional[dict] = None)`` + +Imports a CSV file from the staging area into a GDSTORAGE data source. + +{{% parameters-block title="Parameters"%}} + +{{< parameter p_name="data_source_id" p_type="string" >}} +Data source identification string. +{{< /parameter >}} + +{{< parameter p_name="table_name" p_type="string" >}} +Name for the table to create or replace. +{{< /parameter >}} + +{{< parameter p_name="location" p_type="string" >}} +Location string returned by staging_upload. +{{< /parameter >}} + +{{< parameter p_name="config" p_type="Optional[dict]" >}} +Source config dict, typically from analyze_csv response. Optional. +{{< /parameter >}} + +{{% /parameters-block %}} + +{{% parameters-block title="Returns" None="yes"%}} +{{% /parameters-block %}} + +## Example + +```python +# Import a CSV into a GDSTORAGE data source using config from analysis +analysis = sdk.catalog_data_source.analyze_csv(location=location) +config = analysis.to_dict().get("config") +sdk.catalog_data_source.import_csv( + data_source_id="my-gdstorage-ds", + table_name="my_table", + location=location, + config=config, +) +``` diff --git a/docs/content/en/latest/data/data-source/staging_upload.md b/docs/content/en/latest/data/data-source/staging_upload.md new file mode 100644 index 000000000..27ef32105 --- /dev/null +++ b/docs/content/en/latest/data/data-source/staging_upload.md @@ -0,0 +1,37 @@ +--- +title: "staging_upload" +linkTitle: "staging_upload" +weight: 190 +superheading: "catalog_data_source." +--- + + + +``staging_upload(csv_file: Path)`` + +Uploads a CSV file to the staging area and returns a location string that can be used in subsequent calls to analyze_csv and import_csv. + +{{% parameters-block title="Parameters"%}} + +{{< parameter p_name="csv_file" p_type="Path" >}} +Path to the CSV file to upload. +{{< /parameter >}} + +{{% /parameters-block %}} + +{{% parameters-block title="Returns"%}} + +{{< parameter p_type="string" >}} +Location string referencing the uploaded file in staging. +{{< /parameter >}} + +{{% /parameters-block %}} + +## Example + +```python +from pathlib import Path + +# Upload a CSV file to staging +location = sdk.catalog_data_source.staging_upload(csv_file=Path("data.csv")) +``` diff --git a/docs/content/en/latest/data/data-source/upload_csv.md b/docs/content/en/latest/data/data-source/upload_csv.md new file mode 100644 index 000000000..96a105d57 --- /dev/null +++ b/docs/content/en/latest/data/data-source/upload_csv.md @@ -0,0 +1,44 @@ +--- +title: "upload_csv" +linkTitle: "upload_csv" +weight: 194 +superheading: "catalog_data_source." +--- + + + +``upload_csv(data_source_id: str, csv_file: Path, table_name: str)`` + +Convenience method that uploads a CSV file and imports it into a GDSTORAGE data source in a single call. Orchestrates the full flow: staging_upload → analyze_csv → import_csv → register_upload_notification. + +{{% parameters-block title="Parameters"%}} + +{{< parameter p_name="data_source_id" p_type="string" >}} +Data source identification string for a GDSTORAGE data source. +{{< /parameter >}} + +{{< parameter p_name="csv_file" p_type="Path" >}} +Path to the CSV file to upload. +{{< /parameter >}} + +{{< parameter p_name="table_name" p_type="string" >}} +Name for the table to create or replace in the data source. +{{< /parameter >}} + +{{% /parameters-block %}} + +{{% parameters-block title="Returns" None="yes"%}} +{{% /parameters-block %}} + +## Example + +```python +from pathlib import Path + +# Upload a CSV file end-to-end in a single call +sdk.catalog_data_source.upload_csv( + data_source_id="my-gdstorage-ds", + csv_file=Path("data.csv"), + table_name="my_table", +) +``` diff --git a/packages/gooddata-sdk/src/gooddata_sdk/__init__.py b/packages/gooddata-sdk/src/gooddata_sdk/__init__.py index 8313e2c38..426d8a93e 100644 --- a/packages/gooddata-sdk/src/gooddata_sdk/__init__.py +++ b/packages/gooddata-sdk/src/gooddata_sdk/__init__.py @@ -29,6 +29,7 @@ CatalogDataSource, CatalogDataSourceBigQuery, CatalogDataSourceDatabricks, + CatalogDataSourceGdStorage, CatalogDataSourceGreenplum, CatalogDataSourceMariaDb, CatalogDataSourceMotherDuck, diff --git a/packages/gooddata-sdk/src/gooddata_sdk/catalog/data_source/entity_model/data_source.py b/packages/gooddata-sdk/src/gooddata_sdk/catalog/data_source/entity_model/data_source.py index c17201fe4..d3a92a038 100644 --- a/packages/gooddata-sdk/src/gooddata_sdk/catalog/data_source/entity_model/data_source.py +++ b/packages/gooddata-sdk/src/gooddata_sdk/catalog/data_source/entity_model/data_source.py @@ -296,3 +296,25 @@ class MotherDuckAttributes(DatabaseAttributes): class CatalogDataSourceMotherDuck(CatalogDataSource): _URL_TMPL: ClassVar[str] = "jdbc:duckdb:md:{db_name}" type: str = "MOTHERDUCK" + + +class _NoCredentials(Credentials): + """Placeholder credentials for data sources that do not require authentication.""" + + def to_api_args(self) -> dict[str, Any]: + return {} + + @classmethod + def is_part_of_api(cls, entity: dict[str, Any]) -> bool: + return True + + @classmethod + def from_api(cls, entity: dict[str, Any]) -> _NoCredentials: + return cls() + + +@define(kw_only=True, eq=False) +class CatalogDataSourceGdStorage(CatalogDataSource): + type: str = "GDSTORAGE" + schema: str = "" + credentials: Credentials = field(factory=_NoCredentials, repr=False) diff --git a/packages/gooddata-sdk/src/gooddata_sdk/catalog/data_source/service.py b/packages/gooddata-sdk/src/gooddata_sdk/catalog/data_source/service.py index 9be59722e..8126d496c 100644 --- a/packages/gooddata-sdk/src/gooddata_sdk/catalog/data_source/service.py +++ b/packages/gooddata-sdk/src/gooddata_sdk/catalog/data_source/service.py @@ -6,6 +6,14 @@ from typing import Any, Union from gooddata_api_client.exceptions import NotFoundException +from gooddata_api_client.model.analyze_csv_request import AnalyzeCsvRequest +from gooddata_api_client.model.analyze_csv_request_item import AnalyzeCsvRequestItem +from gooddata_api_client.model.analyze_csv_response import AnalyzeCsvResponse +from gooddata_api_client.model.delete_files_request import DeleteFilesRequest +from gooddata_api_client.model.import_csv_request import ImportCsvRequest +from gooddata_api_client.model.import_csv_request_table import ImportCsvRequestTable +from gooddata_api_client.model.import_csv_request_table_source import ImportCsvRequestTableSource +from gooddata_api_client.model.import_csv_request_table_source_config import ImportCsvRequestTableSourceConfig from gooddata_sdk.catalog.catalog_service_base import CatalogServiceBase from gooddata_sdk.catalog.data_source.action_model.requests.ldm_request import ( @@ -504,6 +512,108 @@ def test_data_sources_connection( message.append(f"Test connection for data source id {k} ended with the following error {v}.") raise ValueError("\n".join(message)) + def staging_upload(self, csv_file: Path) -> str: + """Upload a CSV file to the staging area. + + Args: + csv_file (Path): + Path to the CSV file to upload. + + Returns: + str: + Location string referencing the uploaded file in staging. + """ + with open(csv_file, "rb") as f: + response = self._actions_api.staging_upload(file=f) + return response["location"] + + def analyze_csv(self, location: str) -> AnalyzeCsvResponse: + """Analyze an uploaded CSV file in the staging area. + + Returns column metadata, detected types, and a config object + that can be passed directly to import_csv. + + Args: + location (str): + Location string returned by staging_upload. + + Returns: + AnalyzeCsvResponse: + Analysis result with columns, preview data, and config. + """ + request = AnalyzeCsvRequest(analyze_requests=[AnalyzeCsvRequestItem(location=location)]) + responses = self._actions_api.analyze_csv(request, _check_return_type=False) + return responses[0] + + def import_csv( + self, + data_source_id: str, + table_name: str, + location: str, + config: dict[str, Any] | None = None, + ) -> None: + """Import a CSV file from staging into a GDSTORAGE data source. + + Args: + data_source_id (str): + Data source identification string. + table_name (str): + Name for the table to create or replace. + location (str): + Location string returned by staging_upload. + config (Optional[dict[str, Any]]): + Source config dict, typically from analyze_csv response. + Passed as ImportCsvRequestTableSourceConfig kwargs. + + Returns: + None + """ + source_kwargs: dict[str, Any] = {"location": location} + if config: + source_kwargs["config"] = ImportCsvRequestTableSourceConfig(**config) + source = ImportCsvRequestTableSource(**source_kwargs) + table = ImportCsvRequestTable(name=table_name, source=source) + request = ImportCsvRequest(tables=[table]) + self._actions_api.import_csv(data_source_id, request) + + def delete_csv_files(self, data_source_id: str, file_names: list[str]) -> None: + """Delete files from a GDSTORAGE data source. + + Args: + data_source_id (str): + Data source identification string. + file_names (list[str]): + List of file names to delete. + + Returns: + None + """ + request = DeleteFilesRequest(file_names=file_names) + self._actions_api.delete_files(data_source_id, request) + + def upload_csv(self, data_source_id: str, csv_file: Path, table_name: str) -> None: + """Upload a CSV file and import it into a GDSTORAGE data source. + + Convenience method that orchestrates the full flow: + staging_upload → analyze_csv → import_csv → register_upload_notification. + + Args: + data_source_id (str): + Data source identification string for a GDSTORAGE data source. + csv_file (Path): + Path to the CSV file to upload. + table_name (str): + Name for the table to create or replace in the data source. + + Returns: + None + """ + location = self.staging_upload(csv_file) + analysis = self.analyze_csv(location) + config = analysis.to_dict().get("config") + self.import_csv(data_source_id, table_name, location, config=config) + self.register_upload_notification(data_source_id) + # Help methods are listed below @staticmethod From 34d53d0d1c3e2230569cbe71a49c15ce27521f29 Mon Sep 17 00:00:00 2001 From: Jan Kadlec Date: Fri, 13 Mar 2026 11:39:43 +0100 Subject: [PATCH 3/3] fix(gooddata-api-client): restore null-byte regex pattern dropped by OpenAPI Generator OpenAPI Generator v6.6.0 silently drops the \x00 literal from regex patterns in the generated Python code. The DeclarativeColumn model's `name` field has a spec pattern of `^[^\x00]*$` (reject null bytes, important for Postgres TEXT columns), but the generator produced the invalid Python regex `^[^]*$`, causing `re.PatternError: unterminated character set` at runtime. Fix the generated file and add a post-generation sed fixup to the Makefile `api-client` target so future regenerations are patched automatically. jira: TRIVIAL risk: low --- Makefile | 5 +++++ .../gooddata_api_client/model/declarative_column.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4a7d81a4f..307575326 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,11 @@ api-client: download rm -f schemas/gooddata-api-client.json cat schemas/gooddata-*.json | jq -S -s 'reduce .[] as $$item ({}; . * $$item) + { tags : ( reduce .[].tags as $$item (null; . + $$item) | unique_by(.name) ) }' | sed '/\u0000/d' > "schemas/gooddata-api-client.json" $(call generate_client,api) + # OpenAPI Generator drops the \x00 literal from regex patterns like ^[^\x00]*$, + # producing the invalid Python regex ^[^]*$. Restore the null-byte escape. + find gooddata-api-client/gooddata_api_client -name '*.py' -exec \ + sed -i.bak 's/\^\[\^\]\*\$$/^[^\\x00]*$$/g' {} + && \ + find gooddata-api-client/gooddata_api_client -name '*.py.bak' -delete .PHONY: download download: diff --git a/gooddata-api-client/gooddata_api_client/model/declarative_column.py b/gooddata-api-client/gooddata_api_client/model/declarative_column.py index dd2336224..fc5ef7b4b 100644 --- a/gooddata-api-client/gooddata_api_client/model/declarative_column.py +++ b/gooddata-api-client/gooddata_api_client/model/declarative_column.py @@ -71,7 +71,7 @@ class DeclarativeColumn(ModelNormal): ('name',): { 'max_length': 255, 'regex': { - 'pattern': r'^[^]*$', # noqa: E501 + 'pattern': r'^[^\x00]*$', # noqa: E501 }, }, ('description',): {