From 536c7b592f0a6c0882ffcddc1681f8d6809aeac7 Mon Sep 17 00:00:00 2001 From: Jan Kadlec Date: Thu, 31 Oct 2024 12:57:03 +0100 Subject: [PATCH] chore: regenerate API client JIRA: TRIVIAL risk: low --- gooddata-api-client/.openapi-generator/FILES | 24 ++ gooddata-api-client/README.md | 12 + .../docs/AttributeNegativeFilter.md | 13 + .../docs/AttributeNegativeFilterAllOf.md | 13 + .../docs/AttributePositiveFilter.md | 13 + .../docs/AttributePositiveFilterAllOf.md | 13 + gooddata-api-client/docs/AutomationAlert.md | 14 + .../docs/AutomationAlertCondition.md | 14 + gooddata-api-client/docs/AutomationsApi.md | 33 ++ .../docs/CreatedVisualization.md | 1 + .../docs/CreatedVisualizationFiltersInner.md | 17 + .../docs/DateAbsoluteFilter.md | 14 + .../docs/DateAbsoluteFilterAllOf.md | 14 + .../docs/DateRelativeFilter.md | 15 + .../docs/DateRelativeFilterAllOf.md | 15 + .../docs/DeclarativeAutomation.md | 1 + gooddata-api-client/docs/Filter.md | 12 + gooddata-api-client/docs/LayoutApi.md | 99 +++++ .../docs/OrganizationDeclarativeAPIsApi.md | 33 ++ .../docs/WorkspacesDeclarativeAPIsApi.md | 33 ++ .../model/attribute_negative_filter.py | 327 ++++++++++++++++ .../model/attribute_negative_filter_all_of.py | 268 +++++++++++++ .../model/attribute_positive_filter.py | 327 ++++++++++++++++ .../model/attribute_positive_filter_all_of.py | 268 +++++++++++++ .../model/automation_alert.py | 292 ++++++++++++++ .../model/automation_alert_condition.py | 340 ++++++++++++++++ .../model/created_visualization.py | 12 +- .../created_visualization_filters_inner.py | 366 ++++++++++++++++++ .../model/date_absolute_filter.py | 331 ++++++++++++++++ .../model/date_absolute_filter_all_of.py | 272 +++++++++++++ .../model/date_relative_filter.py | 352 +++++++++++++++++ .../model/date_relative_filter_all_of.py | 293 ++++++++++++++ .../model/declarative_automation.py | 6 + .../gooddata_api_client/model/filter.py | 260 +++++++++++++ .../gooddata_api_client/models/__init__.py | 12 + schemas/gooddata-afm-client.json | 152 ++++++++ schemas/gooddata-api-client.json | 189 +++++++++ schemas/gooddata-metadata-client.json | 37 ++ 38 files changed, 4505 insertions(+), 2 deletions(-) create mode 100644 gooddata-api-client/docs/AttributeNegativeFilter.md create mode 100644 gooddata-api-client/docs/AttributeNegativeFilterAllOf.md create mode 100644 gooddata-api-client/docs/AttributePositiveFilter.md create mode 100644 gooddata-api-client/docs/AttributePositiveFilterAllOf.md create mode 100644 gooddata-api-client/docs/AutomationAlert.md create mode 100644 gooddata-api-client/docs/AutomationAlertCondition.md create mode 100644 gooddata-api-client/docs/CreatedVisualizationFiltersInner.md create mode 100644 gooddata-api-client/docs/DateAbsoluteFilter.md create mode 100644 gooddata-api-client/docs/DateAbsoluteFilterAllOf.md create mode 100644 gooddata-api-client/docs/DateRelativeFilter.md create mode 100644 gooddata-api-client/docs/DateRelativeFilterAllOf.md create mode 100644 gooddata-api-client/docs/Filter.md create mode 100644 gooddata-api-client/gooddata_api_client/model/attribute_negative_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/model/attribute_negative_filter_all_of.py create mode 100644 gooddata-api-client/gooddata_api_client/model/attribute_positive_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/model/attribute_positive_filter_all_of.py create mode 100644 gooddata-api-client/gooddata_api_client/model/automation_alert.py create mode 100644 gooddata-api-client/gooddata_api_client/model/automation_alert_condition.py create mode 100644 gooddata-api-client/gooddata_api_client/model/created_visualization_filters_inner.py create mode 100644 gooddata-api-client/gooddata_api_client/model/date_absolute_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/model/date_absolute_filter_all_of.py create mode 100644 gooddata-api-client/gooddata_api_client/model/date_relative_filter.py create mode 100644 gooddata-api-client/gooddata_api_client/model/date_relative_filter_all_of.py create mode 100644 gooddata-api-client/gooddata_api_client/model/filter.py diff --git a/gooddata-api-client/.openapi-generator/FILES b/gooddata-api-client/.openapi-generator/FILES index a7c06ef6..feece814 100644 --- a/gooddata-api-client/.openapi-generator/FILES +++ b/gooddata-api-client/.openapi-generator/FILES @@ -47,8 +47,14 @@ docs/AttributeHeaderOut.md docs/AttributeHeaderOutAttributeHeader.md docs/AttributeHierarchiesApi.md docs/AttributeItem.md +docs/AttributeNegativeFilter.md +docs/AttributeNegativeFilterAllOf.md +docs/AttributePositiveFilter.md +docs/AttributePositiveFilterAllOf.md docs/AttributeResultHeader.md docs/AttributesApi.md +docs/AutomationAlert.md +docs/AutomationAlertCondition.md docs/AutomationSchedule.md docs/AutomationTabularExport.md docs/AutomationVisualExport.md @@ -79,6 +85,7 @@ docs/ComputationApi.md docs/ContextFiltersApi.md docs/CookieSecurityConfigurationApi.md docs/CreatedVisualization.md +docs/CreatedVisualizationFiltersInner.md docs/CreatedVisualizations.md docs/CustomLabel.md docs/CustomMetric.md @@ -99,7 +106,11 @@ docs/DatasetGrain.md docs/DatasetReferenceIdentifier.md docs/DatasetWorkspaceDataFilterIdentifier.md docs/DatasetsApi.md +docs/DateAbsoluteFilter.md +docs/DateAbsoluteFilterAllOf.md docs/DateFilter.md +docs/DateRelativeFilter.md +docs/DateRelativeFilterAllOf.md docs/DeclarativeAnalyticalDashboard.md docs/DeclarativeAnalyticalDashboardExtension.md docs/DeclarativeAnalyticalDashboardIdentifier.md @@ -213,6 +224,7 @@ docs/ExportRequest.md docs/ExportResponse.md docs/FactsApi.md docs/File.md +docs/Filter.md docs/FilterBy.md docs/FilterDefinition.md docs/FilterDefinitionForSimpleMeasure.md @@ -997,7 +1009,13 @@ gooddata_api_client/model/attribute_format.py gooddata_api_client/model/attribute_header_out.py gooddata_api_client/model/attribute_header_out_attribute_header.py gooddata_api_client/model/attribute_item.py +gooddata_api_client/model/attribute_negative_filter.py +gooddata_api_client/model/attribute_negative_filter_all_of.py +gooddata_api_client/model/attribute_positive_filter.py +gooddata_api_client/model/attribute_positive_filter_all_of.py gooddata_api_client/model/attribute_result_header.py +gooddata_api_client/model/automation_alert.py +gooddata_api_client/model/automation_alert_condition.py gooddata_api_client/model/automation_schedule.py gooddata_api_client/model/automation_tabular_export.py gooddata_api_client/model/automation_visual_export.py @@ -1022,6 +1040,7 @@ gooddata_api_client/model/comparison_measure_value_filter.py gooddata_api_client/model/comparison_measure_value_filter_comparison_measure_value_filter.py gooddata_api_client/model/comparison_wrapper.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/custom_label.py gooddata_api_client/model/custom_metric.py @@ -1037,7 +1056,11 @@ gooddata_api_client/model/data_source_table_identifier.py gooddata_api_client/model/dataset_grain.py gooddata_api_client/model/dataset_reference_identifier.py gooddata_api_client/model/dataset_workspace_data_filter_identifier.py +gooddata_api_client/model/date_absolute_filter.py +gooddata_api_client/model/date_absolute_filter_all_of.py gooddata_api_client/model/date_filter.py +gooddata_api_client/model/date_relative_filter.py +gooddata_api_client/model/date_relative_filter_all_of.py gooddata_api_client/model/declarative_analytical_dashboard.py gooddata_api_client/model/declarative_analytical_dashboard_extension.py gooddata_api_client/model/declarative_analytical_dashboard_identifier.py @@ -1146,6 +1169,7 @@ gooddata_api_client/model/execution_settings.py gooddata_api_client/model/export_request.py gooddata_api_client/model/export_response.py gooddata_api_client/model/file.py +gooddata_api_client/model/filter.py gooddata_api_client/model/filter_by.py gooddata_api_client/model/filter_definition.py gooddata_api_client/model/filter_definition_for_simple_measure.py diff --git a/gooddata-api-client/README.md b/gooddata-api-client/README.md index 4a7fccbf..960946a3 100644 --- a/gooddata-api-client/README.md +++ b/gooddata-api-client/README.md @@ -892,7 +892,13 @@ Class | Method | HTTP request | Description - [AttributeHeaderOut](docs/AttributeHeaderOut.md) - [AttributeHeaderOutAttributeHeader](docs/AttributeHeaderOutAttributeHeader.md) - [AttributeItem](docs/AttributeItem.md) + - [AttributeNegativeFilter](docs/AttributeNegativeFilter.md) + - [AttributeNegativeFilterAllOf](docs/AttributeNegativeFilterAllOf.md) + - [AttributePositiveFilter](docs/AttributePositiveFilter.md) + - [AttributePositiveFilterAllOf](docs/AttributePositiveFilterAllOf.md) - [AttributeResultHeader](docs/AttributeResultHeader.md) + - [AutomationAlert](docs/AutomationAlert.md) + - [AutomationAlertCondition](docs/AutomationAlertCondition.md) - [AutomationSchedule](docs/AutomationSchedule.md) - [AutomationTabularExport](docs/AutomationTabularExport.md) - [AutomationVisualExport](docs/AutomationVisualExport.md) @@ -917,6 +923,7 @@ Class | Method | HTTP request | Description - [ComparisonMeasureValueFilterComparisonMeasureValueFilter](docs/ComparisonMeasureValueFilterComparisonMeasureValueFilter.md) - [ComparisonWrapper](docs/ComparisonWrapper.md) - [CreatedVisualization](docs/CreatedVisualization.md) + - [CreatedVisualizationFiltersInner](docs/CreatedVisualizationFiltersInner.md) - [CreatedVisualizations](docs/CreatedVisualizations.md) - [CustomLabel](docs/CustomLabel.md) - [CustomMetric](docs/CustomMetric.md) @@ -932,7 +939,11 @@ Class | Method | HTTP request | Description - [DatasetGrain](docs/DatasetGrain.md) - [DatasetReferenceIdentifier](docs/DatasetReferenceIdentifier.md) - [DatasetWorkspaceDataFilterIdentifier](docs/DatasetWorkspaceDataFilterIdentifier.md) + - [DateAbsoluteFilter](docs/DateAbsoluteFilter.md) + - [DateAbsoluteFilterAllOf](docs/DateAbsoluteFilterAllOf.md) - [DateFilter](docs/DateFilter.md) + - [DateRelativeFilter](docs/DateRelativeFilter.md) + - [DateRelativeFilterAllOf](docs/DateRelativeFilterAllOf.md) - [DeclarativeAnalyticalDashboard](docs/DeclarativeAnalyticalDashboard.md) - [DeclarativeAnalyticalDashboardExtension](docs/DeclarativeAnalyticalDashboardExtension.md) - [DeclarativeAnalyticalDashboardIdentifier](docs/DeclarativeAnalyticalDashboardIdentifier.md) @@ -1041,6 +1052,7 @@ Class | Method | HTTP request | Description - [ExportRequest](docs/ExportRequest.md) - [ExportResponse](docs/ExportResponse.md) - [File](docs/File.md) + - [Filter](docs/Filter.md) - [FilterBy](docs/FilterBy.md) - [FilterDefinition](docs/FilterDefinition.md) - [FilterDefinitionForSimpleMeasure](docs/FilterDefinitionForSimpleMeasure.md) diff --git a/gooddata-api-client/docs/AttributeNegativeFilter.md b/gooddata-api-client/docs/AttributeNegativeFilter.md new file mode 100644 index 00000000..c58e9468 --- /dev/null +++ b/gooddata-api-client/docs/AttributeNegativeFilter.md @@ -0,0 +1,13 @@ +# AttributeNegativeFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exclude** | **[str]** | | +**using** | **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/AttributeNegativeFilterAllOf.md b/gooddata-api-client/docs/AttributeNegativeFilterAllOf.md new file mode 100644 index 00000000..dd0d8887 --- /dev/null +++ b/gooddata-api-client/docs/AttributeNegativeFilterAllOf.md @@ -0,0 +1,13 @@ +# AttributeNegativeFilterAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exclude** | **[str]** | | [optional] +**using** | **str** | | [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/AttributePositiveFilter.md b/gooddata-api-client/docs/AttributePositiveFilter.md new file mode 100644 index 00000000..f0f19fe7 --- /dev/null +++ b/gooddata-api-client/docs/AttributePositiveFilter.md @@ -0,0 +1,13 @@ +# AttributePositiveFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**include** | **[str]** | | +**using** | **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/AttributePositiveFilterAllOf.md b/gooddata-api-client/docs/AttributePositiveFilterAllOf.md new file mode 100644 index 00000000..a272e79e --- /dev/null +++ b/gooddata-api-client/docs/AttributePositiveFilterAllOf.md @@ -0,0 +1,13 @@ +# AttributePositiveFilterAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**include** | **[str]** | | [optional] +**using** | **str** | | [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/AutomationAlert.md b/gooddata-api-client/docs/AutomationAlert.md new file mode 100644 index 00000000..15a95153 --- /dev/null +++ b/gooddata-api-client/docs/AutomationAlert.md @@ -0,0 +1,14 @@ +# AutomationAlert + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**condition** | [**AutomationAlertCondition**](AutomationAlertCondition.md) | | +**execution** | [**AlertAfm**](AlertAfm.md) | | +**trigger** | **str** | 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. | [optional] if omitted the server will use the default value of "ALWAYS" +**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/AutomationAlertCondition.md b/gooddata-api-client/docs/AutomationAlertCondition.md new file mode 100644 index 00000000..74fc9606 --- /dev/null +++ b/gooddata-api-client/docs/AutomationAlertCondition.md @@ -0,0 +1,14 @@ +# AutomationAlertCondition + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comparison** | [**Comparison**](Comparison.md) | | [optional] +**range** | [**Range**](Range.md) | | [optional] +**relative** | [**Relative**](Relative.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/AutomationsApi.md b/gooddata-api-client/docs/AutomationsApi.md index ed243210..b15af49a 100644 --- a/gooddata-api-client/docs/AutomationsApi.md +++ b/gooddata-api-client/docs/AutomationsApi.md @@ -819,6 +819,39 @@ with gooddata_api_client.ApiClient() as api_client: workspace_id = "workspaceId_example" # str | declarative_automation = [ DeclarativeAutomation( + alert=AutomationAlert( + condition=AutomationAlertCondition(None), + execution=AlertAfm( + attributes=[ + AttributeItem( + label=AfmObjectIdentifierLabel( + identifier=AfmObjectIdentifierLabelIdentifier( + id="sample_item.price", + type="label", + ), + ), + local_identifier="2", + show_all_values=False, + ), + ], + aux_measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + filters=[ + FilterDefinition(), + ], + measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + ), + trigger="ALWAYS", + ), analytical_dashboard=DeclarativeAnalyticalDashboardIdentifier( id="dashboard123", type="analyticalDashboard", diff --git a/gooddata-api-client/docs/CreatedVisualization.md b/gooddata-api-client/docs/CreatedVisualization.md index 50923485..3008ed24 100644 --- a/gooddata-api-client/docs/CreatedVisualization.md +++ b/gooddata-api-client/docs/CreatedVisualization.md @@ -6,6 +6,7 @@ List of created visualization objects Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **dimensionality** | [**[DimAttribute]**](DimAttribute.md) | List of attributes representing the dimensionality of the new visualization | +**filters** | [**[CreatedVisualizationFiltersInner]**](CreatedVisualizationFiltersInner.md) | List of filters to be applied to the new visualization | **id** | **str** | Proposed ID of the new visualization | **metrics** | [**[Metric]**](Metric.md) | List of metrics to be used in the new visualization | **title** | **str** | Proposed title of the new visualization | diff --git a/gooddata-api-client/docs/CreatedVisualizationFiltersInner.md b/gooddata-api-client/docs/CreatedVisualizationFiltersInner.md new file mode 100644 index 00000000..8c987848 --- /dev/null +++ b/gooddata-api-client/docs/CreatedVisualizationFiltersInner.md @@ -0,0 +1,17 @@ +# CreatedVisualizationFiltersInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exclude** | **[str]** | | [optional] +**using** | **str** | | [optional] +**include** | **[str]** | | [optional] +**_from** | **int** | | [optional] +**to** | **int** | | [optional] +**granularity** | **str** | | [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/DateAbsoluteFilter.md b/gooddata-api-client/docs/DateAbsoluteFilter.md new file mode 100644 index 00000000..eaadaf3d --- /dev/null +++ b/gooddata-api-client/docs/DateAbsoluteFilter.md @@ -0,0 +1,14 @@ +# DateAbsoluteFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**using** | **str** | | +**_from** | **str** | | [optional] +**to** | **str** | | [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/DateAbsoluteFilterAllOf.md b/gooddata-api-client/docs/DateAbsoluteFilterAllOf.md new file mode 100644 index 00000000..015445d7 --- /dev/null +++ b/gooddata-api-client/docs/DateAbsoluteFilterAllOf.md @@ -0,0 +1,14 @@ +# DateAbsoluteFilterAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_from** | **str** | | [optional] +**to** | **str** | | [optional] +**using** | **str** | | [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/DateRelativeFilter.md b/gooddata-api-client/docs/DateRelativeFilter.md new file mode 100644 index 00000000..651d60b2 --- /dev/null +++ b/gooddata-api-client/docs/DateRelativeFilter.md @@ -0,0 +1,15 @@ +# DateRelativeFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_from** | **int** | | +**granularity** | **str** | | +**to** | **int** | | +**using** | **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/DateRelativeFilterAllOf.md b/gooddata-api-client/docs/DateRelativeFilterAllOf.md new file mode 100644 index 00000000..9697c791 --- /dev/null +++ b/gooddata-api-client/docs/DateRelativeFilterAllOf.md @@ -0,0 +1,15 @@ +# DateRelativeFilterAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_from** | **int** | | [optional] +**granularity** | **str** | | [optional] +**to** | **int** | | [optional] +**using** | **str** | | [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/DeclarativeAutomation.md b/gooddata-api-client/docs/DeclarativeAutomation.md index eb84fdb7..45ffca5a 100644 --- a/gooddata-api-client/docs/DeclarativeAutomation.md +++ b/gooddata-api-client/docs/DeclarativeAutomation.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | +**alert** | [**AutomationAlert**](AutomationAlert.md) | | [optional] **analytical_dashboard** | [**DeclarativeAnalyticalDashboardIdentifier**](DeclarativeAnalyticalDashboardIdentifier.md) | | [optional] **created_at** | **str, none_type** | Time of the entity creation. | [optional] **created_by** | [**DeclarativeUserIdentifier**](DeclarativeUserIdentifier.md) | | [optional] diff --git a/gooddata-api-client/docs/Filter.md b/gooddata-api-client/docs/Filter.md new file mode 100644 index 00000000..736cbd49 --- /dev/null +++ b/gooddata-api-client/docs/Filter.md @@ -0,0 +1,12 @@ +# Filter + +List of filters to be applied to the new visualization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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/LayoutApi.md b/gooddata-api-client/docs/LayoutApi.md index 0f212e9f..779ad20d 100644 --- a/gooddata-api-client/docs/LayoutApi.md +++ b/gooddata-api-client/docs/LayoutApi.md @@ -2338,6 +2338,39 @@ with gooddata_api_client.ApiClient() as api_client: workspace_id = "workspaceId_example" # str | declarative_automation = [ DeclarativeAutomation( + alert=AutomationAlert( + condition=AutomationAlertCondition(None), + execution=AlertAfm( + attributes=[ + AttributeItem( + label=AfmObjectIdentifierLabel( + identifier=AfmObjectIdentifierLabelIdentifier( + id="sample_item.price", + type="label", + ), + ), + local_identifier="2", + show_all_values=False, + ), + ], + aux_measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + filters=[ + FilterDefinition(), + ], + measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + ), + trigger="ALWAYS", + ), analytical_dashboard=DeclarativeAnalyticalDashboardIdentifier( id="dashboard123", type="analyticalDashboard", @@ -3139,6 +3172,39 @@ with gooddata_api_client.ApiClient() as api_client: DeclarativeWorkspace( automations=[ DeclarativeAutomation( + alert=AutomationAlert( + condition=AutomationAlertCondition(None), + execution=AlertAfm( + attributes=[ + AttributeItem( + label=AfmObjectIdentifierLabel( + identifier=AfmObjectIdentifierLabelIdentifier( + id="sample_item.price", + type="label", + ), + ), + local_identifier="2", + show_all_values=False, + ), + ], + aux_measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + filters=[ + FilterDefinition(), + ], + measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + ), + trigger="ALWAYS", + ), analytical_dashboard=DeclarativeAnalyticalDashboardIdentifier( id="dashboard123", type="analyticalDashboard", @@ -4191,6 +4257,39 @@ with gooddata_api_client.ApiClient() as api_client: DeclarativeWorkspace( automations=[ DeclarativeAutomation( + alert=AutomationAlert( + condition=AutomationAlertCondition(None), + execution=AlertAfm( + attributes=[ + AttributeItem( + label=AfmObjectIdentifierLabel( + identifier=AfmObjectIdentifierLabelIdentifier( + id="sample_item.price", + type="label", + ), + ), + local_identifier="2", + show_all_values=False, + ), + ], + aux_measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + filters=[ + FilterDefinition(), + ], + measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + ), + trigger="ALWAYS", + ), analytical_dashboard=DeclarativeAnalyticalDashboardIdentifier( id="dashboard123", type="analyticalDashboard", diff --git a/gooddata-api-client/docs/OrganizationDeclarativeAPIsApi.md b/gooddata-api-client/docs/OrganizationDeclarativeAPIsApi.md index e74f22a9..2400d11a 100644 --- a/gooddata-api-client/docs/OrganizationDeclarativeAPIsApi.md +++ b/gooddata-api-client/docs/OrganizationDeclarativeAPIsApi.md @@ -294,6 +294,39 @@ with gooddata_api_client.ApiClient() as api_client: DeclarativeWorkspace( automations=[ DeclarativeAutomation( + alert=AutomationAlert( + condition=AutomationAlertCondition(None), + execution=AlertAfm( + attributes=[ + AttributeItem( + label=AfmObjectIdentifierLabel( + identifier=AfmObjectIdentifierLabelIdentifier( + id="sample_item.price", + type="label", + ), + ), + local_identifier="2", + show_all_values=False, + ), + ], + aux_measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + filters=[ + FilterDefinition(), + ], + measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + ), + trigger="ALWAYS", + ), analytical_dashboard=DeclarativeAnalyticalDashboardIdentifier( id="dashboard123", type="analyticalDashboard", diff --git a/gooddata-api-client/docs/WorkspacesDeclarativeAPIsApi.md b/gooddata-api-client/docs/WorkspacesDeclarativeAPIsApi.md index 6133d9d0..6104071f 100644 --- a/gooddata-api-client/docs/WorkspacesDeclarativeAPIsApi.md +++ b/gooddata-api-client/docs/WorkspacesDeclarativeAPIsApi.md @@ -553,6 +553,39 @@ with gooddata_api_client.ApiClient() as api_client: DeclarativeWorkspace( automations=[ DeclarativeAutomation( + alert=AutomationAlert( + condition=AutomationAlertCondition(None), + execution=AlertAfm( + attributes=[ + AttributeItem( + label=AfmObjectIdentifierLabel( + identifier=AfmObjectIdentifierLabelIdentifier( + id="sample_item.price", + type="label", + ), + ), + local_identifier="2", + show_all_values=False, + ), + ], + aux_measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + filters=[ + FilterDefinition(), + ], + measures=[ + MeasureItem( + definition=MeasureDefinition(), + local_identifier="metric_1", + ), + ], + ), + trigger="ALWAYS", + ), analytical_dashboard=DeclarativeAnalyticalDashboardIdentifier( id="dashboard123", type="analyticalDashboard", diff --git a/gooddata-api-client/gooddata_api_client/model/attribute_negative_filter.py b/gooddata-api-client/gooddata_api_client/model/attribute_negative_filter.py new file mode 100644 index 00000000..17bf8fe2 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/attribute_negative_filter.py @@ -0,0 +1,327 @@ +""" + 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.attribute_negative_filter_all_of import AttributeNegativeFilterAllOf + from gooddata_api_client.model.filter import Filter + globals()['AttributeNegativeFilterAllOf'] = AttributeNegativeFilterAllOf + globals()['Filter'] = Filter + + +class AttributeNegativeFilter(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 { + 'exclude': ([str],), # noqa: E501 + 'using': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'exclude': 'exclude', # noqa: E501 + 'using': 'using', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AttributeNegativeFilter - a model defined in OpenAPI + + Keyword Args: + exclude ([str]): + using (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 + """AttributeNegativeFilter - a model defined in OpenAPI + + Keyword Args: + exclude ([str]): + using (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': [ + AttributeNegativeFilterAllOf, + Filter, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-api-client/gooddata_api_client/model/attribute_negative_filter_all_of.py b/gooddata-api-client/gooddata_api_client/model/attribute_negative_filter_all_of.py new file mode 100644 index 00000000..5de3703b --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/attribute_negative_filter_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 AttributeNegativeFilterAllOf(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 { + 'exclude': ([str],), # noqa: E501 + 'using': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'exclude': 'exclude', # noqa: E501 + 'using': 'using', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AttributeNegativeFilterAllOf - 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,) + exclude ([str]): [optional] # noqa: E501 + using (str): [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 + """AttributeNegativeFilterAllOf - 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,) + exclude ([str]): [optional] # noqa: E501 + using (str): [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/attribute_positive_filter.py b/gooddata-api-client/gooddata_api_client/model/attribute_positive_filter.py new file mode 100644 index 00000000..41fb58cd --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/attribute_positive_filter.py @@ -0,0 +1,327 @@ +""" + 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.attribute_positive_filter_all_of import AttributePositiveFilterAllOf + from gooddata_api_client.model.filter import Filter + globals()['AttributePositiveFilterAllOf'] = AttributePositiveFilterAllOf + globals()['Filter'] = Filter + + +class AttributePositiveFilter(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 { + 'include': ([str],), # noqa: E501 + 'using': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'include': 'include', # noqa: E501 + 'using': 'using', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AttributePositiveFilter - a model defined in OpenAPI + + Keyword Args: + include ([str]): + using (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 + """AttributePositiveFilter - a model defined in OpenAPI + + Keyword Args: + include ([str]): + using (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': [ + AttributePositiveFilterAllOf, + Filter, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-api-client/gooddata_api_client/model/attribute_positive_filter_all_of.py b/gooddata-api-client/gooddata_api_client/model/attribute_positive_filter_all_of.py new file mode 100644 index 00000000..40a51c1f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/attribute_positive_filter_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 AttributePositiveFilterAllOf(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 { + 'include': ([str],), # noqa: E501 + 'using': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'include': 'include', # noqa: E501 + 'using': 'using', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AttributePositiveFilterAllOf - 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,) + include ([str]): [optional] # noqa: E501 + using (str): [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 + """AttributePositiveFilterAllOf - 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,) + include ([str]): [optional] # noqa: E501 + using (str): [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/automation_alert.py b/gooddata-api-client/gooddata_api_client/model/automation_alert.py new file mode 100644 index 00000000..6c9b2952 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/automation_alert.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.alert_afm import AlertAfm + from gooddata_api_client.model.automation_alert_condition import AutomationAlertCondition + globals()['AlertAfm'] = AlertAfm + globals()['AutomationAlertCondition'] = AutomationAlertCondition + + +class AutomationAlert(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 = { + ('trigger',): { + 'ALWAYS': "ALWAYS", + 'ONCE': "ONCE", + }, + } + + 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 { + 'condition': (AutomationAlertCondition,), # noqa: E501 + 'execution': (AlertAfm,), # noqa: E501 + 'trigger': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'condition': 'condition', # noqa: E501 + 'execution': 'execution', # noqa: E501 + 'trigger': 'trigger', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, condition, execution, *args, **kwargs): # noqa: E501 + """AutomationAlert - a model defined in OpenAPI + + Args: + condition (AutomationAlertCondition): + execution (AlertAfm): + + 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,) + trigger (str): 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. . [optional] if omitted the server will use the default value of "ALWAYS" # 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.condition = condition + self.execution = execution + 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, condition, execution, *args, **kwargs): # noqa: E501 + """AutomationAlert - a model defined in OpenAPI + + Args: + condition (AutomationAlertCondition): + execution (AlertAfm): + + 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,) + trigger (str): 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. . [optional] if omitted the server will use the default value of "ALWAYS" # 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.condition = condition + self.execution = execution + 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/automation_alert_condition.py b/gooddata-api-client/gooddata_api_client/model/automation_alert_condition.py new file mode 100644 index 00000000..b70261b9 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/automation_alert_condition.py @@ -0,0 +1,340 @@ +""" + 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.comparison import Comparison + from gooddata_api_client.model.comparison_wrapper import ComparisonWrapper + from gooddata_api_client.model.range import Range + from gooddata_api_client.model.range_wrapper import RangeWrapper + from gooddata_api_client.model.relative import Relative + from gooddata_api_client.model.relative_wrapper import RelativeWrapper + globals()['Comparison'] = Comparison + globals()['ComparisonWrapper'] = ComparisonWrapper + globals()['Range'] = Range + globals()['RangeWrapper'] = RangeWrapper + globals()['Relative'] = Relative + globals()['RelativeWrapper'] = RelativeWrapper + + +class AutomationAlertCondition(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 { + 'comparison': (Comparison,), # noqa: E501 + 'range': (Range,), # noqa: E501 + 'relative': (Relative,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'comparison': 'comparison', # noqa: E501 + 'range': 'range', # noqa: E501 + 'relative': 'relative', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AutomationAlertCondition - 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,) + comparison (Comparison): [optional] # noqa: E501 + range (Range): [optional] # noqa: E501 + relative (Relative): [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 + """AutomationAlertCondition - 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,) + comparison (Comparison): [optional] # noqa: E501 + range (Range): [optional] # noqa: E501 + relative (Relative): [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': [ + ComparisonWrapper, + RangeWrapper, + RelativeWrapper, + ], + } diff --git a/gooddata-api-client/gooddata_api_client/model/created_visualization.py b/gooddata-api-client/gooddata_api_client/model/created_visualization.py index 28013829..fd8977ce 100644 --- a/gooddata-api-client/gooddata_api_client/model/created_visualization.py +++ b/gooddata-api-client/gooddata_api_client/model/created_visualization.py @@ -31,8 +31,10 @@ def lazy_import(): + from gooddata_api_client.model.created_visualization_filters_inner import CreatedVisualizationFiltersInner from gooddata_api_client.model.dim_attribute import DimAttribute from gooddata_api_client.model.metric import Metric + globals()['CreatedVisualizationFiltersInner'] = CreatedVisualizationFiltersInner globals()['DimAttribute'] = DimAttribute globals()['Metric'] = Metric @@ -99,6 +101,7 @@ def openapi_types(): lazy_import() return { 'dimensionality': ([DimAttribute],), # noqa: E501 + 'filters': ([CreatedVisualizationFiltersInner],), # noqa: E501 'id': (str,), # noqa: E501 'metrics': ([Metric],), # noqa: E501 'title': (str,), # noqa: E501 @@ -112,6 +115,7 @@ def discriminator(): attribute_map = { 'dimensionality': 'dimensionality', # noqa: E501 + 'filters': 'filters', # noqa: E501 'id': 'id', # noqa: E501 'metrics': 'metrics', # noqa: E501 'title': 'title', # noqa: E501 @@ -125,11 +129,12 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, dimensionality, id, metrics, title, visualization_type, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, dimensionality, filters, id, metrics, title, visualization_type, *args, **kwargs): # noqa: E501 """CreatedVisualization - a model defined in OpenAPI Args: dimensionality ([DimAttribute]): List of attributes representing the dimensionality of the new visualization + filters ([CreatedVisualizationFiltersInner]): List of filters to be applied to the new visualization id (str): Proposed ID of the new visualization metrics ([Metric]): List of metrics to be used in the new visualization title (str): Proposed title of the new visualization @@ -198,6 +203,7 @@ def _from_openapi_data(cls, dimensionality, id, metrics, title, visualization_ty self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.dimensionality = dimensionality + self.filters = filters self.id = id self.metrics = metrics self.title = title @@ -222,11 +228,12 @@ def _from_openapi_data(cls, dimensionality, id, metrics, title, visualization_ty ]) @convert_js_args_to_python_args - def __init__(self, dimensionality, id, metrics, title, visualization_type, *args, **kwargs): # noqa: E501 + def __init__(self, dimensionality, filters, id, metrics, title, visualization_type, *args, **kwargs): # noqa: E501 """CreatedVisualization - a model defined in OpenAPI Args: dimensionality ([DimAttribute]): List of attributes representing the dimensionality of the new visualization + filters ([CreatedVisualizationFiltersInner]): List of filters to be applied to the new visualization id (str): Proposed ID of the new visualization metrics ([Metric]): List of metrics to be used in the new visualization title (str): Proposed title of the new visualization @@ -293,6 +300,7 @@ def __init__(self, dimensionality, id, metrics, title, visualization_type, *args self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.dimensionality = dimensionality + self.filters = filters self.id = id self.metrics = metrics self.title = title diff --git a/gooddata-api-client/gooddata_api_client/model/created_visualization_filters_inner.py b/gooddata-api-client/gooddata_api_client/model/created_visualization_filters_inner.py new file mode 100644 index 00000000..8c853b1d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/created_visualization_filters_inner.py @@ -0,0 +1,366 @@ +""" + 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.attribute_negative_filter import AttributeNegativeFilter + from gooddata_api_client.model.attribute_positive_filter import AttributePositiveFilter + from gooddata_api_client.model.date_absolute_filter import DateAbsoluteFilter + from gooddata_api_client.model.date_relative_filter import DateRelativeFilter + globals()['AttributeNegativeFilter'] = AttributeNegativeFilter + globals()['AttributePositiveFilter'] = AttributePositiveFilter + globals()['DateAbsoluteFilter'] = DateAbsoluteFilter + globals()['DateRelativeFilter'] = DateRelativeFilter + + +class CreatedVisualizationFiltersInner(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 = { + ('granularity',): { + 'MINUTE': "MINUTE", + 'HOUR': "HOUR", + 'DAY': "DAY", + 'WEEK': "WEEK", + 'MONTH': "MONTH", + 'QUARTER': "QUARTER", + 'YEAR': "YEAR", + 'MINUTE_OF_HOUR': "MINUTE_OF_HOUR", + 'HOUR_OF_DAY': "HOUR_OF_DAY", + 'DAY_OF_WEEK': "DAY_OF_WEEK", + 'DAY_OF_MONTH': "DAY_OF_MONTH", + 'DAY_OF_YEAR': "DAY_OF_YEAR", + 'WEEK_OF_YEAR': "WEEK_OF_YEAR", + 'MONTH_OF_YEAR': "MONTH_OF_YEAR", + 'QUARTER_OF_YEAR': "QUARTER_OF_YEAR", + }, + } + + 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 { + 'exclude': ([str],), # noqa: E501 + 'using': (str,), # noqa: E501 + 'include': ([str],), # noqa: E501 + '_from': (int,), # noqa: E501 + 'to': (int,), # noqa: E501 + 'granularity': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'exclude': 'exclude', # noqa: E501 + 'using': 'using', # noqa: E501 + 'include': 'include', # noqa: E501 + '_from': 'from', # noqa: E501 + 'to': 'to', # noqa: E501 + 'granularity': 'granularity', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CreatedVisualizationFiltersInner - 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,) + exclude ([str]): [optional] # noqa: E501 + using (str): [optional] # noqa: E501 + include ([str]): [optional] # noqa: E501 + _from (int): [optional] # noqa: E501 + to (int): [optional] # noqa: E501 + granularity (str): [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 + """CreatedVisualizationFiltersInner - 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,) + exclude ([str]): [optional] # noqa: E501 + using (str): [optional] # noqa: E501 + include ([str]): [optional] # noqa: E501 + _from (int): [optional] # noqa: E501 + to (int): [optional] # noqa: E501 + granularity (str): [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': [ + AttributeNegativeFilter, + AttributePositiveFilter, + DateAbsoluteFilter, + DateRelativeFilter, + ], + } diff --git a/gooddata-api-client/gooddata_api_client/model/date_absolute_filter.py b/gooddata-api-client/gooddata_api_client/model/date_absolute_filter.py new file mode 100644 index 00000000..8e46d1ba --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/date_absolute_filter.py @@ -0,0 +1,331 @@ +""" + 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.date_absolute_filter_all_of import DateAbsoluteFilterAllOf + from gooddata_api_client.model.filter import Filter + globals()['DateAbsoluteFilterAllOf'] = DateAbsoluteFilterAllOf + globals()['Filter'] = Filter + + +class DateAbsoluteFilter(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 { + 'using': (str,), # noqa: E501 + '_from': (str,), # noqa: E501 + 'to': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'using': 'using', # noqa: E501 + '_from': 'from', # noqa: E501 + 'to': 'to', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DateAbsoluteFilter - a model defined in OpenAPI + + Keyword Args: + using (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,) + _from (str): [optional] # noqa: E501 + to (str): [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 + """DateAbsoluteFilter - a model defined in OpenAPI + + Keyword Args: + using (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,) + _from (str): [optional] # noqa: E501 + to (str): [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': [ + DateAbsoluteFilterAllOf, + Filter, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-api-client/gooddata_api_client/model/date_absolute_filter_all_of.py b/gooddata-api-client/gooddata_api_client/model/date_absolute_filter_all_of.py new file mode 100644 index 00000000..bb6d2bfa --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/date_absolute_filter_all_of.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 DateAbsoluteFilterAllOf(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': (str,), # noqa: E501 + 'to': (str,), # noqa: E501 + 'using': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + '_from': 'from', # noqa: E501 + 'to': 'to', # noqa: E501 + 'using': 'using', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DateAbsoluteFilterAllOf - 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,) + _from (str): [optional] # noqa: E501 + to (str): [optional] # noqa: E501 + using (str): [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 + """DateAbsoluteFilterAllOf - 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,) + _from (str): [optional] # noqa: E501 + to (str): [optional] # noqa: E501 + using (str): [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/date_relative_filter.py b/gooddata-api-client/gooddata_api_client/model/date_relative_filter.py new file mode 100644 index 00000000..80a05146 --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/date_relative_filter.py @@ -0,0 +1,352 @@ +""" + 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.date_relative_filter_all_of import DateRelativeFilterAllOf + from gooddata_api_client.model.filter import Filter + globals()['DateRelativeFilterAllOf'] = DateRelativeFilterAllOf + globals()['Filter'] = Filter + + +class DateRelativeFilter(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 = { + ('granularity',): { + 'MINUTE': "MINUTE", + 'HOUR': "HOUR", + 'DAY': "DAY", + 'WEEK': "WEEK", + 'MONTH': "MONTH", + 'QUARTER': "QUARTER", + 'YEAR': "YEAR", + 'MINUTE_OF_HOUR': "MINUTE_OF_HOUR", + 'HOUR_OF_DAY': "HOUR_OF_DAY", + 'DAY_OF_WEEK': "DAY_OF_WEEK", + 'DAY_OF_MONTH': "DAY_OF_MONTH", + 'DAY_OF_YEAR': "DAY_OF_YEAR", + 'WEEK_OF_YEAR': "WEEK_OF_YEAR", + 'MONTH_OF_YEAR': "MONTH_OF_YEAR", + 'QUARTER_OF_YEAR': "QUARTER_OF_YEAR", + }, + } + + 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 { + '_from': (int,), # noqa: E501 + 'granularity': (str,), # noqa: E501 + 'to': (int,), # noqa: E501 + 'using': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + '_from': 'from', # noqa: E501 + 'granularity': 'granularity', # noqa: E501 + 'to': 'to', # noqa: E501 + 'using': 'using', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DateRelativeFilter - a model defined in OpenAPI + + Keyword Args: + _from (int): + granularity (str): + to (int): + using (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 + """DateRelativeFilter - a model defined in OpenAPI + + Keyword Args: + _from (int): + granularity (str): + to (int): + using (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': [ + DateRelativeFilterAllOf, + Filter, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-api-client/gooddata_api_client/model/date_relative_filter_all_of.py b/gooddata-api-client/gooddata_api_client/model/date_relative_filter_all_of.py new file mode 100644 index 00000000..82bace8d --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/date_relative_filter_all_of.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 DateRelativeFilterAllOf(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 = { + ('granularity',): { + 'MINUTE': "MINUTE", + 'HOUR': "HOUR", + 'DAY': "DAY", + 'WEEK': "WEEK", + 'MONTH': "MONTH", + 'QUARTER': "QUARTER", + 'YEAR': "YEAR", + 'MINUTE_OF_HOUR': "MINUTE_OF_HOUR", + 'HOUR_OF_DAY': "HOUR_OF_DAY", + 'DAY_OF_WEEK': "DAY_OF_WEEK", + 'DAY_OF_MONTH': "DAY_OF_MONTH", + 'DAY_OF_YEAR': "DAY_OF_YEAR", + 'WEEK_OF_YEAR': "WEEK_OF_YEAR", + 'MONTH_OF_YEAR': "MONTH_OF_YEAR", + 'QUARTER_OF_YEAR': "QUARTER_OF_YEAR", + }, + } + + 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': (int,), # noqa: E501 + 'granularity': (str,), # noqa: E501 + 'to': (int,), # noqa: E501 + 'using': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + '_from': 'from', # noqa: E501 + 'granularity': 'granularity', # noqa: E501 + 'to': 'to', # noqa: E501 + 'using': 'using', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DateRelativeFilterAllOf - 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,) + _from (int): [optional] # noqa: E501 + granularity (str): [optional] # noqa: E501 + to (int): [optional] # noqa: E501 + using (str): [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 + """DateRelativeFilterAllOf - 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,) + _from (int): [optional] # noqa: E501 + granularity (str): [optional] # noqa: E501 + to (int): [optional] # noqa: E501 + using (str): [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/declarative_automation.py b/gooddata-api-client/gooddata_api_client/model/declarative_automation.py index 8bfa52ff..4252cc65 100644 --- a/gooddata-api-client/gooddata_api_client/model/declarative_automation.py +++ b/gooddata-api-client/gooddata_api_client/model/declarative_automation.py @@ -31,6 +31,7 @@ def lazy_import(): + from gooddata_api_client.model.automation_alert import AutomationAlert from gooddata_api_client.model.automation_schedule import AutomationSchedule from gooddata_api_client.model.automation_tabular_export import AutomationTabularExport from gooddata_api_client.model.automation_visual_export import AutomationVisualExport @@ -39,6 +40,7 @@ def lazy_import(): from gooddata_api_client.model.declarative_notification_channel_identifier import DeclarativeNotificationChannelIdentifier from gooddata_api_client.model.declarative_user_identifier import DeclarativeUserIdentifier from gooddata_api_client.model.json_node import JsonNode + globals()['AutomationAlert'] = AutomationAlert globals()['AutomationSchedule'] = AutomationSchedule globals()['AutomationTabularExport'] = AutomationTabularExport globals()['AutomationVisualExport'] = AutomationVisualExport @@ -140,6 +142,7 @@ def openapi_types(): lazy_import() return { 'id': (str,), # noqa: E501 + 'alert': (AutomationAlert,), # noqa: E501 'analytical_dashboard': (DeclarativeAnalyticalDashboardIdentifier,), # noqa: E501 'created_at': (str, none_type,), # noqa: E501 'created_by': (DeclarativeUserIdentifier,), # noqa: E501 @@ -166,6 +169,7 @@ def discriminator(): attribute_map = { 'id': 'id', # noqa: E501 + 'alert': 'alert', # noqa: E501 'analytical_dashboard': 'analyticalDashboard', # noqa: E501 'created_at': 'createdAt', # noqa: E501 'created_by': 'createdBy', # noqa: E501 @@ -229,6 +233,7 @@ def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + alert (AutomationAlert): [optional] # noqa: E501 analytical_dashboard (DeclarativeAnalyticalDashboardIdentifier): [optional] # noqa: E501 created_at (str, none_type): Time of the entity creation.. [optional] # noqa: E501 created_by (DeclarativeUserIdentifier): [optional] # noqa: E501 @@ -335,6 +340,7 @@ def __init__(self, id, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + alert (AutomationAlert): [optional] # noqa: E501 analytical_dashboard (DeclarativeAnalyticalDashboardIdentifier): [optional] # noqa: E501 created_at (str, none_type): Time of the entity creation.. [optional] # noqa: E501 created_by (DeclarativeUserIdentifier): [optional] # noqa: E501 diff --git a/gooddata-api-client/gooddata_api_client/model/filter.py b/gooddata-api-client/gooddata_api_client/model/filter.py new file mode 100644 index 00000000..160e2d9f --- /dev/null +++ b/gooddata-api-client/gooddata_api_client/model/filter.py @@ -0,0 +1,260 @@ +""" + 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 Filter(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 { + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Filter - 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,) + """ + + _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 + """Filter - 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,) + """ + + _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/models/__init__.py b/gooddata-api-client/gooddata_api_client/models/__init__.py index 604d8d1b..7fb5f89c 100644 --- a/gooddata-api-client/gooddata_api_client/models/__init__.py +++ b/gooddata-api-client/gooddata_api_client/models/__init__.py @@ -50,7 +50,13 @@ from gooddata_api_client.model.attribute_header_out import AttributeHeaderOut from gooddata_api_client.model.attribute_header_out_attribute_header import AttributeHeaderOutAttributeHeader from gooddata_api_client.model.attribute_item import AttributeItem +from gooddata_api_client.model.attribute_negative_filter import AttributeNegativeFilter +from gooddata_api_client.model.attribute_negative_filter_all_of import AttributeNegativeFilterAllOf +from gooddata_api_client.model.attribute_positive_filter import AttributePositiveFilter +from gooddata_api_client.model.attribute_positive_filter_all_of import AttributePositiveFilterAllOf from gooddata_api_client.model.attribute_result_header import AttributeResultHeader +from gooddata_api_client.model.automation_alert import AutomationAlert +from gooddata_api_client.model.automation_alert_condition import AutomationAlertCondition from gooddata_api_client.model.automation_schedule import AutomationSchedule from gooddata_api_client.model.automation_tabular_export import AutomationTabularExport from gooddata_api_client.model.automation_visual_export import AutomationVisualExport @@ -75,6 +81,7 @@ from gooddata_api_client.model.comparison_measure_value_filter_comparison_measure_value_filter import ComparisonMeasureValueFilterComparisonMeasureValueFilter from gooddata_api_client.model.comparison_wrapper import ComparisonWrapper 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.custom_label import CustomLabel from gooddata_api_client.model.custom_metric import CustomMetric @@ -90,7 +97,11 @@ from gooddata_api_client.model.dataset_grain import DatasetGrain from gooddata_api_client.model.dataset_reference_identifier import DatasetReferenceIdentifier from gooddata_api_client.model.dataset_workspace_data_filter_identifier import DatasetWorkspaceDataFilterIdentifier +from gooddata_api_client.model.date_absolute_filter import DateAbsoluteFilter +from gooddata_api_client.model.date_absolute_filter_all_of import DateAbsoluteFilterAllOf from gooddata_api_client.model.date_filter import DateFilter +from gooddata_api_client.model.date_relative_filter import DateRelativeFilter +from gooddata_api_client.model.date_relative_filter_all_of import DateRelativeFilterAllOf from gooddata_api_client.model.declarative_analytical_dashboard import DeclarativeAnalyticalDashboard from gooddata_api_client.model.declarative_analytical_dashboard_extension import DeclarativeAnalyticalDashboardExtension from gooddata_api_client.model.declarative_analytical_dashboard_identifier import DeclarativeAnalyticalDashboardIdentifier @@ -199,6 +210,7 @@ from gooddata_api_client.model.export_request import ExportRequest from gooddata_api_client.model.export_response import ExportResponse from gooddata_api_client.model.file import File +from gooddata_api_client.model.filter import Filter from gooddata_api_client.model.filter_by import FilterBy from gooddata_api_client.model.filter_definition import FilterDefinition from gooddata_api_client.model.filter_definition_for_simple_measure import FilterDefinitionForSimpleMeasure diff --git a/schemas/gooddata-afm-client.json b/schemas/gooddata-afm-client.json index fdd732ac..ead5bfcf 100644 --- a/schemas/gooddata-afm-client.json +++ b/schemas/gooddata-afm-client.json @@ -634,6 +634,58 @@ ], "type": "object" }, + "AttributeNegativeFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "properties": { + "exclude": { + "items": { + "type": "string" + }, + "type": "array" + }, + "using": { + "type": "string" + } + }, + "type": "object" + } + ], + "required": [ + "exclude", + "using" + ], + "type": "object" + }, + "AttributePositiveFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "properties": { + "include": { + "items": { + "type": "string" + }, + "type": "array" + }, + "using": { + "type": "string" + } + }, + "type": "object" + } + ], + "required": [ + "include", + "using" + ], + "type": "object" + }, "AttributeResultHeader": { "description": "Header containing the information related to attributes.", "properties": { @@ -950,6 +1002,26 @@ }, "type": "array" }, + "filters": { + "description": "List of filters to be applied to the new visualization", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AttributeNegativeFilter" + }, + { + "$ref": "#/components/schemas/AttributePositiveFilter" + }, + { + "$ref": "#/components/schemas/DateAbsoluteFilter" + }, + { + "$ref": "#/components/schemas/DateRelativeFilter" + } + ] + }, + "type": "array" + }, "id": { "description": "Proposed ID of the new visualization", "example": "revenue_by_country", @@ -983,6 +1055,7 @@ }, "required": [ "dimensionality", + "filters", "id", "metrics", "title", @@ -1057,6 +1130,31 @@ }, "type": "object" }, + "DateAbsoluteFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "using": { + "type": "string" + } + }, + "type": "object" + } + ], + "required": [ + "using" + ], + "type": "object" + }, "DateFilter": { "description": "Abstract filter definition type for dates.", "oneOf": [ @@ -1069,6 +1167,56 @@ ], "type": "object" }, + "DateRelativeFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "properties": { + "from": { + "format": "int32", + "type": "integer" + }, + "granularity": { + "enum": [ + "MINUTE", + "HOUR", + "DAY", + "WEEK", + "MONTH", + "QUARTER", + "YEAR", + "MINUTE_OF_HOUR", + "HOUR_OF_DAY", + "DAY_OF_WEEK", + "DAY_OF_MONTH", + "DAY_OF_YEAR", + "WEEK_OF_YEAR", + "MONTH_OF_YEAR", + "QUARTER_OF_YEAR" + ], + "type": "string" + }, + "to": { + "format": "int32", + "type": "integer" + }, + "using": { + "type": "string" + } + }, + "type": "object" + } + ], + "required": [ + "from", + "granularity", + "to", + "using" + ], + "type": "object" + }, "DependsOn": { "allOf": [ { @@ -1548,6 +1696,10 @@ }, "type": "object" }, + "Filter": { + "description": "List of filters to be applied to the new visualization", + "type": "object" + }, "FilterBy": { "description": "Specifies what is used for filtering.", "properties": { diff --git a/schemas/gooddata-api-client.json b/schemas/gooddata-api-client.json index 4b779583..c9fad9d1 100644 --- a/schemas/gooddata-api-client.json +++ b/schemas/gooddata-api-client.json @@ -850,6 +850,58 @@ ], "type": "object" }, + "AttributeNegativeFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "properties": { + "exclude": { + "items": { + "type": "string" + }, + "type": "array" + }, + "using": { + "type": "string" + } + }, + "type": "object" + } + ], + "required": [ + "exclude", + "using" + ], + "type": "object" + }, + "AttributePositiveFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "properties": { + "include": { + "items": { + "type": "string" + }, + "type": "array" + }, + "using": { + "type": "string" + } + }, + "type": "object" + } + ], + "required": [ + "include", + "using" + ], + "type": "object" + }, "AttributeResultHeader": { "description": "Header containing the information related to attributes.", "properties": { @@ -870,6 +922,40 @@ ], "type": "object" }, + "AutomationAlert": { + "properties": { + "condition": { + "oneOf": [ + { + "$ref": "#/components/schemas/ComparisonWrapper" + }, + { + "$ref": "#/components/schemas/RangeWrapper" + }, + { + "$ref": "#/components/schemas/RelativeWrapper" + } + ] + }, + "execution": { + "$ref": "#/components/schemas/AlertAfm" + }, + "trigger": { + "default": "ALWAYS", + "description": "Trigger behavior for the alert.\nALWAYS - alert is triggered every time the condition is met.\nONCE - alert is triggered only once when the condition is met.\n", + "enum": [ + "ALWAYS", + "ONCE" + ], + "type": "string" + } + }, + "required": [ + "condition", + "execution" + ], + "type": "object" + }, "AutomationSchedule": { "properties": { "cron": { @@ -1454,6 +1540,26 @@ }, "type": "array" }, + "filters": { + "description": "List of filters to be applied to the new visualization", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AttributeNegativeFilter" + }, + { + "$ref": "#/components/schemas/AttributePositiveFilter" + }, + { + "$ref": "#/components/schemas/DateAbsoluteFilter" + }, + { + "$ref": "#/components/schemas/DateRelativeFilter" + } + ] + }, + "type": "array" + }, "id": { "description": "Proposed ID of the new visualization", "example": "revenue_by_country", @@ -1487,6 +1593,7 @@ }, "required": [ "dimensionality", + "filters", "id", "metrics", "title", @@ -1837,6 +1944,31 @@ ], "type": "object" }, + "DateAbsoluteFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "using": { + "type": "string" + } + }, + "type": "object" + } + ], + "required": [ + "using" + ], + "type": "object" + }, "DateFilter": { "description": "Abstract filter definition type for dates.", "oneOf": [ @@ -1849,6 +1981,56 @@ ], "type": "object" }, + "DateRelativeFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "properties": { + "from": { + "format": "int32", + "type": "integer" + }, + "granularity": { + "enum": [ + "MINUTE", + "HOUR", + "DAY", + "WEEK", + "MONTH", + "QUARTER", + "YEAR", + "MINUTE_OF_HOUR", + "HOUR_OF_DAY", + "DAY_OF_WEEK", + "DAY_OF_MONTH", + "DAY_OF_YEAR", + "WEEK_OF_YEAR", + "MONTH_OF_YEAR", + "QUARTER_OF_YEAR" + ], + "type": "string" + }, + "to": { + "format": "int32", + "type": "integer" + }, + "using": { + "type": "string" + } + }, + "type": "object" + } + ], + "required": [ + "from", + "granularity", + "to", + "using" + ], + "type": "object" + }, "DeclarativeAnalyticalDashboard": { "properties": { "content": { @@ -2265,6 +2447,9 @@ }, "DeclarativeAutomation": { "properties": { + "alert": { + "$ref": "#/components/schemas/AutomationAlert" + }, "analyticalDashboard": { "$ref": "#/components/schemas/DeclarativeAnalyticalDashboardIdentifier" }, @@ -5506,6 +5691,10 @@ "namespace": "urn:oasis:names:tc:xliff:document:2.0" } }, + "Filter": { + "description": "List of filters to be applied to the new visualization", + "type": "object" + }, "FilterBy": { "description": "Specifies what is used for filtering.", "properties": { diff --git a/schemas/gooddata-metadata-client.json b/schemas/gooddata-metadata-client.json index 8e64bde8..258810f6 100644 --- a/schemas/gooddata-metadata-client.json +++ b/schemas/gooddata-metadata-client.json @@ -536,6 +536,40 @@ ], "type": "object" }, + "AutomationAlert": { + "properties": { + "condition": { + "oneOf": [ + { + "$ref": "#/components/schemas/ComparisonWrapper" + }, + { + "$ref": "#/components/schemas/RangeWrapper" + }, + { + "$ref": "#/components/schemas/RelativeWrapper" + } + ] + }, + "execution": { + "$ref": "#/components/schemas/AlertAfm" + }, + "trigger": { + "default": "ALWAYS", + "description": "Trigger behavior for the alert.\nALWAYS - alert is triggered every time the condition is met.\nONCE - alert is triggered only once when the condition is met.\n", + "enum": [ + "ALWAYS", + "ONCE" + ], + "type": "string" + } + }, + "required": [ + "condition", + "execution" + ], + "type": "object" + }, "AutomationSchedule": { "properties": { "cron": { @@ -1407,6 +1441,9 @@ }, "DeclarativeAutomation": { "properties": { + "alert": { + "$ref": "#/components/schemas/AutomationAlert" + }, "analyticalDashboard": { "$ref": "#/components/schemas/DeclarativeAnalyticalDashboardIdentifier" },